[Super-tux-devel] Level editor 1st release
Brought to you by:
wkendrick
From: Ricardo C. <ri...@ae...> - 2003-12-27 03:23:21
|
Hey there, As I told you, I was doing a built-in level editor for SuperTux. I have not been able to develop much (Christmas time ;) ), but I have finally managed to complete a workable version. It basically has support for scrolling use the keyboard or mouse, changing tiles by pressing keys (please, sugest and/or help on an interface) and load/save levels. You are still not able to add a new level, you'll have to create a file and images first. And you can't specify level width, time, background color or music file. Also it is not possible to add Bad Guys (will be done soon), since there is no info regarding this in the LEVELDESIGN file. I noticed, that a file called enemy.h has been added, I advice you to use the same nomenclature, so you should call it badguy.h . And are you thinking in turning SuperTux in C++? I am not a C programmer (i prefer C++) and I've tried to put the code not as much spagheti as the gameloop one (the new gameloop does not look as spagheti anymore ;)) I've tonight (it's 4 am, time to go to bed :Z), put it working with the CVS and even add it to the menu. But, when executed when the game is running and then closed, there is a seg fault. Probabily because I use functions from the gameloop file... Also, when the game is not running and the level editor is executed, after it is closed, the menu background does not update, until we press a key (that's not my fault! :)) The only thing I know to do with CVS is to get data, I've not upload anything for a long time. I also don't know how to use the patch comand. So, forgive me, but I will publish the files in my page and then you can get them and merge with the cvs. Maybe you could also teach me how to upload and patch stuff :) The files need to be added: src/leveleditor.c http://rpmcruz.planetaclix.pt/trash/leveleditor.c src/leveleditor.h http://rpmcruz.planetaclix.pt/trash/leveleditor.h data/images/leveleditor/select.png http://rpmcruz.planetaclix.pt/trash/select.png I've had this data/leveleditor directory, since in the future more images may be putted here, like buttons. I was thinking in using those buttons from TuxPaint. Please, suggest a layout for the level designer. And this select.png file is very ugly. Everyone can draw better than me :P Files I had to change: Makefile http://rpmcruz.planetaclix.pt/trash/Makefile src/menu.c http://rpmcruz.planetaclix.pt/trash/menu.c src/menu.h http://rpmcruz.planetaclix.pt/trash/menu.h I hope you enjoy my work! Hopes of good holidays, Ricardo Cruz -- Where there's a will, there's an Inheritance Tax. |