125 reputation
6
bio website
location
age 26
visits member for 6 months
seen yesterday
stats profile views 9

Enthusiast. No formal computer science education (yet). Interested in 2D and 3D rendering techniques and shader programming. Actually making own engine for RPG game.


May
17
comment Collision detection problems using AABB's
Warning: you wrote "Then move Y and check collision, if there is a collision, then move along X-Axis?" Its Y-Axis. Probably a typo. Yes, that my current approach. For very large displacements, more than your sprite width or height, you need to divide in smaller steps, and that is what I mean with the L analogy. Beware of not applying a large displacement in y axis and then a large x, you need to divide both in small steps and intercalate to get correct behavior. Something to care only if large displacements are allowed in your game. In mine, I know they will occur. So I prepared for it.
May
16
comment Collision detection problems using AABB's
About the moves component. It represent future displacement, yes, but you do not check if you allow movement or not, you actually apply the movement, by axis, first y, then x, and then see if you collided with something, if you do you use the penetration vector to move back. Why save displacement for later processing differs from actually apply the displacement when there are user input to process or something happened in game world? I will try to put this in images when I edit my answer. Meanwhile lets see if somebody else comes with an alternative.
May
15
answered Collision detection problems using AABB's
May
8
answered Correct utilisation of gameloop (Android)
May
7
revised Collision detection logic
Corrected direction of vector T, I want direction to be from player to platform
May
7
comment How can I update Display settings from an Options screen without restarting?
Even Doom 3 requires restart, so restarting is not so bad. But yes, many games do it without restarting. Some years have passed since I touched Allegro, but if memory serves me well, you should be able to re call video initialization functions while still maintaining game states on memory. I remember have implemented a initVideo function that can be safely called again and again when need adjusting to new video settings. Don't remember names of Allegro functions now but this should be possible with Allegro.
Apr
29
comment Collision detection logic
I'm glad I was of help. Note that the last formula (used to decide direction of penetration vector) had a minor bug. In the original I divided penetration by 2 because I was processing some sprites twice. I noticed it after posting. I've corrected it in the answer.
Apr
29
revised Collision detection logic
edited formula to make it more readable and a bug correction
Apr
28
revised Collision detection logic
Only marked the formulas as code because stackexchange does not preserve spacing and linebreaking otherwise
Apr
27
revised Collision detection logic
Added formulas and demo video of how it is supposed to work
Apr
25
comment Collision detection logic
@user22241 Move back in direction of sprite movement is exactly what I though first and is an option. But now that I think again about it, we are using Axis Aligned to save us from doing more complex calculations. So it may be better to move in the direction of one axis. In the flash animation from metanet it is the violet arrow. The violet arrow is always aligned to x or y axis and they choose always the shorter one to apply to sprite position, not both. AABB is ideal for 2D scrolling games.
Apr
24
answered Collision detection logic
Apr
16
comment How does a 2D game like Zelda handle the character being behind buildings where only part of him is shown?
I'm pretty sure old SNES JRPGs used the same technique. FF2, FF5, etc. The technique is still valid.
Apr
10
comment How to deal with (bad?) player suggestions
+1 I like the reasoning/experience sharing, and how you wrote it. To my bookmarks.
Apr
4
comment Techniques for incorporating physics engines like Box2D into a Component-based Entity System
@Den, because of this "I'd love to hear some input from people that have experience with these things." My comment is a reasoning. I think the OP want an answer from somebody that actually did it.
Mar
29
comment Techniques for incorporating physics engines like Box2D into a Component-based Entity System
You can put the Box2D specific objects into a component. Then a system that uses Box2D to do the physics and updates a separate Position component to be in sync to the position that the Box2D object already have. The reason for having a separate position component is because not necessarily all entities with Position need to have physics.
Mar
29
comment Component based game engine and dependencies - singletons
Inheritance is still useful even in component systems. For example, my LastPosition component inherits from Position component. Because of my design, I need that LastPosition be a different class than Position (cannot use two Positions), by allowing inheritance I saved from having to duplicate the code from Position. Also, after being obsessed to eliminate singletons, I concluded that singletons are preferable than dependency injection everywhere.
Feb
18
comment Xna “Game.Run” method appears to be using up a lot of resources in my game, is this normal?
If you was using fixed timesteps and now you disabled it that may introduce another kind of problems later. For example, if your simulation used constant values, for example to advance player character position, now you have to take into account the delta between frames, that may vary each frame. Only a comment, maybe you are already aware of it.
Jan
29
comment Why do game engines convert models to triangles compared to keeping it as four side polygon
+1 Because is an answer I can safely use as reference when somebody ask me the same thing, to my bookmarks. Only say that, I always have thought that the reason triangles are the small possible primitive is because with the imprecision of float point arithmetic, tris are the only safe polygon you can guarantee to be planar in all cases, with quads you cannot guarantee they will be planar all the time. Modeling software probably show objects as quads or n-gons as convenience to the modeler but apply transforms/render dividing polygons as two or more triangles.
Jan
29
comment Why do game engines convert models to triangles compared to keeping it as four side polygon
+1. I think triangles being the only polygon you can guarantee to be planar is the main technical reason to make apis and hardware that requires triangles. Modeling software probably show meshes as quads as convenience to the modeler.