[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[pygame] wish list for ultimate tile combie



Hello,

I've been thinking of making a really kick arse tile combie for a while now, and have come up with a big feature/implementation ideas list.

Any features for a tile engine not listed here?


= Features wanted =
* Different tile sizes.
* different sizes on the same map.

* Can be used for different game types. At least platformers, shooters, and rts type games.

* When not moving it can take only update parts of the screen.
* update(dirty_rects) can be used to speed up drawing.
* by only updating areas which are dirty.
* if the map is not moving we can make it lots speedier.

* Offscreen buffer. Blit all smaller tiles to an offscreen buffer then blit
one big image to the screen. This can be faster on some screens/computers.
* Join maps together easily.
* Different drawable sizes. Ie different camera views.
* Massive maps possible, with smallish memory/cpu requirements.
* Supporting incremental load/unloading of tile/map data.
* different uses of the map can mean different memory usage. * Eg a platformer where you can only go up compared to an rts which needs all the map visible at once.
* Different camera modes:
* jump scrolling,
* jump the map in blocks. Like ten pixels at a time.
* smooth scrolling,
* every pixel the camera moves the tiles move.
* smooth-jump scrolling. * Mostly the screen stays still. When the character nears the edge
everything stops moving while the maps scrolls over a little way.
* centered camera.
* Can center the camera on
* Looping Map Edges
* Paralax scrolling.
* Moving layers at different speeds.
* Multiple views of the map.
* miniview of the map. Perhaps using a scaled version or one pixel per tile.

* minimize overdraw.
* using dirty rectangles.
* for alpha images precalculate 'full rects'. * That is like a bounding box in the middle where the area is full. Most alpha images are transparent around the edges only.
* think about using a coverage buffer.
* animated tiles will probably always need to be redrawn(unless it's the same frame).
* maybe use a coverage buffer.

* Overlapping tiles.
* As well as overlapping whole maps. For joining maps together.
* Layers/Z ordering.
* draw characters by descending y value on same layer.
* for certain types of games: see for explanation:
* http://www.gamedev.net/reference/programming/features/gpgenesis9/page7.asp

* line of sight tests between tiles and pixels/rects.
* collision detection between tiles and pixels/rects.
* some tiles may be pass through.
* tiles on different layers may be collidable, others not.

* fog of war.
* darkening/lightening of areas.

* Rotatable tiles.
* scalable tiles? Other transforms needed? stretching?

* animated tiles.
* probably just using pygame.sprites.

* Easy layer toggling.
* So eg when you go inside a building the roof comes off and you can see inside.

* Automatic shadowing for sprites ontop of the tiles.



= Implementation ideas =

* Use pygame sprites and sprite groups.
* could then reuse lots of code... optimize in one place. Speed development.
* think of camera movement as simply moving a sprite group in a certain way.
* At least make using pygame.sprites with it easy to do.

* Use a quad tree for the collision detection.
* Could use it for moving, and non moving.

* Left to right, or top to bottom scrollers can be optimized in different ways.
* Build in runtime reconfiguration from the start.

* should work well/ok with sdl and an opengl mode. With optional extra features available in the different modes.
* eg shadowing, lighting, and rotation of tiles will be much easier/faster with opengl.


= Some map editors =

The tile combie(or engine if you want) should have most of the features that these map editors contain.

http://tilestudio.sourceforge.net/
http://www.tilemap.co.uk/
Goal