Re: [Super-tux-devel] Leveleditor first release -> Ricardo Cruz, Bill & Tobias
Brought to you by:
wkendrick
From: Ricardo C. <ri...@ae...> - 2003-12-28 20:22:04
|
(the dumb kmail was replying only to the person that send the mail to the=20 list, so i am resending this mail to the all list) Hi, Em S=E1bado, 27 de Dezembro de 2003 10:49, o Duong-Khang NGUYEN escreveu: > > 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. > > As Bill, I prefer a seperate level editor ! Any different vote for this ? > This game will be played by very little children, so a built-in editor wou= ld=20 be much easier to use for those. > > 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'll declare war to anyone who want to turn SuperTux into C++ ! Originall= y, > SuperTux is written in C by Bill, and he thought it in C. If anyone want = to > write SuperTux in C++, he must start from scratch and think in C++ way. > We're going to vote for this (ah long life to the Democracy). However, if > you guys really want to write things in C++, I suggest to break the curre= nt > CVS tree into 2 different CVS trees: the C++ and the old C one. And I'll = be > voluntary to maintain the so old C source tree of course. IMHO, in order = to > program WELL in C++, we need a lot of work ! Well, I just asked this because the world.h, badguy.h and player.h have a= =20 line saying 'C++ Interface:'. I've also found some comments using //. Is this already ANSI C and/or can = I=20 use it (/* */ are annoying :P)? Em S=E1bado, 27 de Dezembro de 2003 12:07, o Duong-Khang NGUYEN escreveu: > I've just tried out the leveleditor codes and I have some kind of BAD > impression! I don't want to be harmful but I seriously think that your > works will be more appreciable as a stand-alone leveleditor. > What do you think Tobias & Bill ? > > Duong-Khang NGUYEN (who looks like an evil devil at the moment >:-( ) Did you find the code to be too straight? If you didn't like this, you=20 probabily had an heart attack when looking at the old gameloop function. ;P I could put the key events in a different function, I just didn't because = I=20 don't like global variables that much. I'm also not very used to write in C. I think the code is too simple and at the same time it outputs a very easy= to=20 use level editor. A mouse-driven interface is obviously needed, I could wor= k=20 on this, but I would like you guys to suggest the layout... I also didn't like (neither understood) the identation you have used in th= e=20 game. Firstly, I think tabs should be used at the beggining of the line, since=20 everyone can setup tabs (mine is settuped to be 2 spaces) and so it doesn't= =20 make as much mess as spaces do (you don't have to care). I'm also very used to this type of identation: if(bad_guy.alive) <TAB>{ <TAB>kill_the_bastard(); <TAB>if(screen.update =3D=3D false) <TAB><TAB>refresh(); <TAB>} Of course, I will use the identation you find more appropriate... I almost forgot to mention (you will notice! :)) that there is a bug: when= =20 pressing some keys, the screen scrolls back. I think it is being caused by the mouse keys code: x =3D event.motion.x; if(x < MOUSE_LEFT_MARGIN) pos_x -=3D MOUSE_POS_SPEED; else if(x > MOUSE_RIGHT_MARGIN) pos_x +=3D MOUSE_POS_SPEED; Is this wrong or isn't SDL giving event.motion.x right... Cya, Ricardo =2D-=20 In 1880 the French captured Detroit but gave it back ... they couldn't get parts. |