I don't do much game related code, outside of various plugins .... however I did use Pygame ( go ahead and laugh ) to create a 2D RPG engine.
Unfortunately I no longer have the code, probably loosing it along with my last laptop.
Did you succeed in building a game from a Game Engine?
Shippou, do you remember the time and resource that you put in the game?
The code was done just me, and the time spent to put it together was 3 or 4 hours.
Pygame is good for simple classic 2D style games, but lacks the power for large scale / modern games http://www.pygame.org
What was involved was creating four 2D lists ( arrays ), and populating them from files.
[source lang="python"]
# create 2d list
map_dimensions = 20,20
Map = [[0 for x in range(map_dimensions[0])]
for y in range(map_dimensions[1])]
[/source]
The first layer was the ground, second layer background objects, third layer foreground objects, forth layer was zones
Very easy to "paint" to canvas.
A separate program was used to create map files.
Map files themselves were just pickled ( serialize ) text files.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement