I am having a problem with map at the moment,I will need to either store mover objects pointers in map tile or make collision-test on all objects every frame,apparently the latter sounds a bit stupid,but pointers-in-maptile has its own problem:
In Ocean Horizons,each tile is 32 by 32 pixels big,so in order to represent the 'world' at an acceptable size,I will need tons of them,more precisely 1024x1024+ of them,in a worst case scenario,there might be few hundreds objects overlapping each other in one tile at a time,let's say 200,then there will need to be 1024x1024x200 pointers,in 32bit it's 1024x1024x200x4 bytes or 800MB,in 64bit it's 1024x1024x200x8 bytes or 1.6 GIGABYTE!Now this sounds even more stupid than the collision-test on all objects every frame idea.
Perhaps I should allocate them dynamically,but a pointer pointing to array of pointers on each tile doesn't sound like a good solution either.Hopefully I will get this problem sorted out soon.
Subscribe to:
Post Comments (Atom)
2 comments:
post some mockups!!
Only 2D this game??
no 3D effects??!
Honestly there is nothing to be shown currently,the graphics is only some basic single-color tiles that were made in gimp in a few minutes to test the map.
Yes it will be 2D only rendered with opengl acceleration for the following reasons:
1.Original game is in 2D(top-down,not isometric)
2.2D is easier to code
3.2D contents is easier to create,3D contents(models,textures,animations) are hard to create and exist 3D contents on web are usually non-free(at least not compatible with opensource licenses,so you can't host/distribute them)
Post a Comment