337 reputation
18
bio website
location
age 28
visits member for 1 year, 11 months
seen 2 days ago

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


Sep
24
awarded  Autobiographer
May
30
comment Retrieving components from game objects (entities)
std::unordered_map is faster than std::map and at the same time saves you from having all those wasted empty pointers, they are still slower than vector I think, so you will have to decide what is more important, a bit more of speed or save memory. Note that I switched to another approach. Now my entities are only an ID and components are singletons that can return their data if you pass them an entity ID (not so efficient as lookups are involved) or let you iterate through all the entities that are associated to that component (what systems do most of the time, and very efficient).
May
13
comment How to achieve cavalier projection using OpenGL fixed pipeline?
I didn't take that matrix as an array. The answer is ok as it is but, believe me, someone may arrive here as result of a web search and simply add the commas, some will realize what just happened when running their programs, others may need to think for a while. OpenGL documentation contains warnings about the elements order because people tend to expect the opposite order, isn't it?
May
13
accepted How to achieve cavalier projection using OpenGL fixed pipeline?
May
13
comment How to achieve cavalier projection using OpenGL fixed pipeline?
Marked as answer. Just note that OpenGL expects arrays representing matrices being in column-major order.
May
12
comment How to achieve cavalier projection using OpenGL fixed pipeline?
I think this is what I'm after. Just let me do a quick test before mark as answer.
May
12
asked How to achieve cavalier projection using OpenGL fixed pipeline?
Jan
18
awarded  Popular Question
Jan
3
comment Do I need multiple perlin noise generators for different features in terrain generation?
Ups, It's more like, tree_type = (int)((value - 0.5) / 0.5 * 3), If less than 1, no tree at that coordinates, from 1 to 3, any of the three tree meshes.
Jan
2
comment How to get pixel coordinates between 0,1 from SV_POSITION
It is an array/structure of 4 elements as an optimization. It is the same as why some APIs represent vectors as arrays of 4 floats even if the last element is not used for anything. Maybe somebody can post a link to a good explanation of why. I could not find one in my bookmarks.
Jan
2
comment Do I need multiple perlin noise generators for different features in terrain generation?
Only add to existing answers that you may want to implement an erode algorithm pass: float4x4.net/index.php/2010/06/… to obtain believable heights distribution. Apply a noise pass to the xz plane (assuming y is up) to obtain areas with more flat terrain was smart too and maybe no need for the erosion pass. Placements of things like trees will require its own pass, for example, anything belows 0.5 means no tree, above that means tree, or different types of tree. If you have 3 tree meshes, tree_type = (int)((value - 0.5) / 3)
Dec
24
comment Xna GraphicsDevice.IsFullScreen causes strange resolution stretching artifacts
If graphics are 2D, do not set PreferredBackBufferWidth/Height when changing to/from full screen. Decide the fixed screen size most convenient to your game graphic assets or target platform, render them to a RenderTarget2D then use SpriteBatch.begin() passing a properly configured scaling matrix (not hard to calculate) to get a "fill preserving aspect ratio" effect, with letter box when the screen aspect ratio is not the same as your game chosen one. You need to implement something like this: david-amador.com/2010/03/…
Nov
21
awarded  Yearling
Oct
14
comment HTML5 2D Game Renderer
It's true that performance differs. That is a point in favor of a renderer interface with different implementations. For a 2D game, write a webgl renderer and a 2D context renderer does not convince me. If the game needs webgl to perform ok, It will probably be too slow in 2D context anyway.
Oct
13
answered Drawing Sprites at Correct Z-Index without A Sprite Map?
Oct
13
answered HTML5 2D Game Renderer
Sep
24
comment How does a single non-artistic programmer make a game?
Games like chess are played for the intellectual challenge, no matter if it is a real chess table or a virtual one. But most video games people touches are chosen thinking in immersion. If you find a way to deliver that without depend on visual assets then all is OK. Looking at the answers people had tried and some had very high level of success with low levels of dependence on visuals and music. I'm aiming for that too. Low cost immersion is not impossible.
Sep
19
answered Should I create generic bitmap/sound/et cetera wrappers for Allegro?
Sep
17
answered When two moving objects collide, which one sends the message, and which one recieves it?
Jul
12
answered Lightweight Simple Fast-Object Collision Detection Algorithm/Logic