732 reputation
611
bio website
location
age
visits member for 3 years, 1 month
seen Apr 10 at 6:27

Mar
18
comment When entities don't draw themselves, who actually does?
But one thing I'm wondering about: Wouldn't I get to the proper logical separation by simply turning all my entity specific render functions into free functions? Or do you think I can't call my renderer thingie renderer if I don't put something like a RenderObject in the middle?
Mar
18
comment When entities don't draw themselves, who actually does?
Free functions sounds like a good approach - that way I can easily have class-based rendering logic and also put the logic wherever I think it belongs without adding it to the hierarchy.
Mar
17
asked When entities don't draw themselves, who actually does?
Mar
1
awarded  Yearling
Feb
4
comment Where should the collision response/resolution code go?
I ended up doing something similar to what you suggest, however, the most important part of this answer is that collision detection and resolution are not entity-specific, just the logic between the two. That's what I ended up with, and it's as flexible as I need it to be.
Feb
4
accepted Where should the collision response/resolution code go?
Feb
3
asked Where should the collision response/resolution code go?
Jan
15
comment How to implement a tractor beam?
After trying various hacks, this is what got me on track, the result is looking good. The velocity on collision is still a tad bit too high, but I think I can figure that out. Possibly just by not attracting any objects with a high velocity in a different direction.
Jan
15
accepted How to implement a tractor beam?
Jan
5
comment Should widgets be part of a scene in a 2D game?
Thought about it some more and I think I'll just add widgets to my scene, a separate hierarchy. The main menu will then be a scene with only widgets and no entities. Still accepting your answer, since it makes some great points that just don't really apply to my game in particular.
Jan
5
accepted Should widgets be part of a scene in a 2D game?
Jan
4
comment Should widgets be part of a scene in a 2D game?
So, for a HUD, you simply keep updating the position of the touchables as the ship moves to have them stick to their position? It'd work, but it feels wrong somehow. That said, this is not a UI heavy game, maybe it's just fine.
Jan
4
comment Should widgets be part of a scene in a 2D game?
I'm really not sure what to use. It just seems kind of wrong to go with game objects here since widgets should be positioned in screen space, not world space, shouldn't have a velocity etc. I'd have to introduce a thin base class and another base class for "real" entities that actually interact with the game world. Doesn't feel right. But I don't know where else to put widgets, if not in a scene.
Jan
4
comment Should widgets be part of a scene in a 2D game?
So how did you tackle fullscreen menus? Are all items GameObjects? Doesn't it seem weird that widgets have a position in world space, a velocity etc.?
Jan
4
comment Should widgets be part of a scene in a 2D game?
I've stressed above that I'm talking about a 2D game, I guess that simplifies this discussion quite a bit. So if I get that right, you suggest I render the UI onto game objects? So my menu would be a scene with a single entity that's basically a "window" and contains widgets?
Jan
4
comment Should widgets be part of a scene in a 2D game?
@Kikaimaru What, really? The game part of WoW is basically just a "scene window"? That surprises me.
Jan
4
revised Should widgets be part of a scene in a 2D game?
Pointed out that it's a 2D game
Jan
3
asked Should widgets be part of a scene in a 2D game?
Jan
3
comment How can I organise the code for an episodic game?
That's great to hear, I thought option 1 was too naive and would get me into trouble, but if that's the common approach, I'm happy with it. I'll first finish the first episode then. And you're right, I'd be highly surprised if we wouldn't introduce new mechanics with later episodes. I guess it's not as different from a sequel as I thought.
Jan
3
accepted How can I organise the code for an episodic game?