Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 31 18:27
    Noofbiz assigned #167
  • Jan 31 14:58
    cos29 forked
    cos29/engo
  • Jan 31 08:31
    blue-bird1 starred EngoEngine/engo
  • Jan 31 04:43
    conmarap starred EngoEngine/engo
  • Jan 30 17:02

    Noofbiz on master

    improve test coverage and fixed… fix js set title Merge pull request #637 from En… (compare)

  • Jan 30 17:02
    Noofbiz closed #637
  • Jan 30 16:56
    Noofbiz synchronize #637
  • Jan 30 16:56

    Noofbiz on improve-test-coverage

    fix js set title (compare)

  • Jan 30 08:14
    Noofbiz opened #638
  • Jan 30 08:08

    Noofbiz on sdl-vulkan-fixes

    (compare)

  • Jan 30 08:06
    Noofbiz opened #637
  • Jan 30 08:06

    Noofbiz on improve-test-coverage

    improve test coverage and fixed… (compare)

  • Jan 28 05:48
    patrickrgaffney starred EngoEngine/engo
  • Jan 28 03:26
    conmarap starred EngoEngine/engo
  • Jan 26 05:45
    Noofbiz closed #180
  • Jan 26 05:43
    Noofbiz commented #636
  • Jan 26 05:43

    Noofbiz on master

    implemented view-culling for ba… speedup `MultiplyMatrixVector` … removed unnecessary map access … and 8 more (compare)

  • Jan 26 05:43
    Noofbiz closed #636
  • Jan 25 06:45
    boombuler commented #636
  • Jan 25 06:43
    boombuler synchronize #636
Igor Palamarchuk
@r3mb00
2.png
So, to fix those errors I had to do:
1.png
I faces with that not once and I'm wondering why the sys.Add complaying?
Is'n it looking for components into my entity file?
It's not critical issue but a bit confuses.
Igor Palamarchuk
@r3mb00
@Noofbiz I have looked through all engo mouse demos and didn't find something that can help me to change the scene by touching the text.
What I have found is a click system with the clickComponent:
11.png
But is MouseComponent and MouseSystem are good anought to touch the text and get another scene or I have to use clickComponent?
Another words can I set in MouseComponent or MouseSystem my scene to have changed after the clicking?
Noofbiz
@Noofbiz
Yeah right now the mouse and touch are the same thing
So your touches will be recorded as mouse clicks
So common.MouseComponent is what you'd use to get touches
Igor Palamarchuk
@r3mb00
@Noofbiz thank you.
I understand that I should use common.MouseComponent to have touches but also I understand I have to create a system for clicks.
I add MouseComponent to my TextEntity but when I copied clickSystem from the Mouse-Click demo I got errors:
error.png
It says syntax erros but the code is exactly the same as in the Mouse-click demo.
@Noofbiz can you advice, please ?
Noofbiz
@Noofbiz
looks like you put them inside a function. They should be top level declarations, not inside anything
Igor Palamarchuk
@r3mb00
Thank you, I fixed that.
It seems like everything is fine.
I added the ClickSystem to my World:
1.png
Fixed all errors but my app is not clicking :( :
2.png
@Noofbiz is there an example how to create a system for changing the scene?
Igor Palamarchuk
@r3mb00
Hi, @Noofbiz.
I try to register MouseLeftButton with engo but got error:
Screenshot at 2019-07-08 14-32-35.png
It's weird because keyF1 works fine, did I do something wrong with registering mouse button ?
Noofbiz
@Noofbiz
Yeah, there’s issues for unifying all this and making it better in that regard.
For now though the mouse buttons are separate from keys, so you’d use something like the following:
switch engo.Input.Mouse.Action {
case engo.Press:
    switch engo.Input.Mouse.Button {
        case engo.MouseButtonLeft:
            // left click stuff
        case engo.MouseButtonRight:
            // right click stuff
    }
    case engo.Release:
        switch engo.Input.Mouse.Button {
        case engo.MouseButtonLeft:
            // left release stuff
        case engo.MouseButtonRight:
            // right release stuff
    }
}
Noofbiz
@Noofbiz
but the mouse system should take care of all that for you, you shouldn’t really need to do it yourself except for really specific cases
Igor Palamarchuk
@r3mb00
I'm just don't know how to handle this.
I have added common.MouseComponent to my Text entity:
1.png
added MouseSystem to the world of my scene:
2.png
declared mouse component:
3.png
and looped it:
4.png
But I don't know what I should do to have another scene after the text link were clicked.
:(
Noofbiz
@Noofbiz
What’s your ClickSystem’s update look like?
So what you wanna do is register the scenes beforehand. Like in hypnic’s main for example https://github.com/Noofbiz/hypnic/blob/master/main.go
Noofbiz
@Noofbiz
Then your update for ClickSystem would be something like this:
func (s *ClickSystem) Update(float32) {
    for _, e := range s.entities {
        if e.MouseComponent.Clicked {
            engo.SetSceneByName(“NewScene", true)
        }
    }
}
Igor Palamarchuk
@r3mb00
@Noofbiz thanks, but still cannot run it because of:
error.png
too few values in clickEntity literal
Zoron
@fralonra
Wrote a simple 2048 game as a try. https://github.com/fralonra/engo-2048. Advice welcomed! I am just a noob.
Inkeliz
@Inkeliz

Hi,

There's a way to create a gradient backgroud and/or gradient rectangle (and basic shapes)? I think about create a image (https://www.varunpant.com/posts/create-linear-color-gradient-in-go) and use the image as a texture. The usage of that "gradient" is for UI (menu and stuff like that).

Terisback
@terisbackno_gitlab
How to change the position of an object on the screen?
Through SpaceComponent