Sdl & C++ Not Really Working...so Where's The Basic At?


To my knowledge:

C++ and DGE (Da Vinci Game Engine, built-in)
C++ and SDL (built-in)
BennuGD
LOVE

That's about it so far. Pygame and Python haven't been ported yet (and I don't know if it will be, though I would absolutely love it if they were). So far, of the languages available, BennuGD is pretty easy; I disliked LOVE (and Lua) because there isn't really built-in object oriented programming (though there are external object-oriented programming libraries). To do games in LOVE and Lua, you would have to use arrays as lists of objects, where an entry represents an object, like so:

enemies = {{x:0, y:0, hp:5}, {x:128, y:256, hp:10}}

or something like that. Then, you'd run through the array with a function to move and update the enemies. That's not really my cup o' tea. BennuGD also doesn't have object-oriented programming, so that wasn't really an option (for me, anyway), but I think I like it better than Lua. If I were you, I'd go with BennuGD if you don't want to go with SDL.
 
way too frustrated, all i can do is draw sprites and move them,sdl colorkeying makes nosense! cant get caanoo sdk to work!
python would be a little better and bennugd and love are outa my league...and i bought books on c++(c++ through game programming,game coding complete, and one from bjarne)
is this the end? tune in next week to find out!
 
monstercameron said:
way too frustrated, all i can do is draw sprites and move them,sdl colorkeying makes nosense! cant get caanoo sdk to work!
python would be a little better and bennugd and love are outa my league...and i bought books on c++(c++ through game programming,game coding complete, and one from bjarne)
is this the end? tune in next week to find out!

How about you try to explain exactly which parts are not working, SDL Colorkeying works with out a problem, the Caanoo SDK does as well (both windows and linux) given you followed my instructions availible for the windows part, which i assume your probably using...

Further on for each project if you use code::blocks you'll have to readd the used libs, just as you would have to with a makefile

Makeing sprites move is rather good step, i once was there as well (a long time ago) it's the first steps, don't except to run try to walk first ;)

and yes programming is frustrating but that's just the beauty of it, trying to get things to work and learn by doing so.. IMO programming is having a problem and creating a solution for it, and you have a lot of freedom in doing so (one problem, many solutions / outcomes)
 
Last edited by a moderator:
Yeah, the best viable solution at this point is using SDL. Color keying isn't too complex or difficult to implement - if you would rather not use color keying, you could use '.png' files that have transparency built-in. Here's a set of good SDL tutorials:

Lazy Foo's SDL Tutorials

It's useful for learning purposes, but some things I wouldn't implement because it's more complex in a tutorial than to implement in a real game. Also, for pixel-perfect collision detection, sdl_collide is an option that works on the Caanoo (I tested it out; it worked fine).
 
Oh, well then... I find it to be fine for learning some things, though I haven't run through the whole tutorial in any manner. Anywho, if you have problems with color-keying, then go with .PNG files with built-in transparency. However, just a thought about color-keying: Color-keying works by making transparent certain colors - if you're using the EXACT code from the tutorial, the transparent portion of your sprite needs to be the color of the background for the stick figure's sprite in the tutorial (which is an ugly sky blue - 0, 255, 255). They use hexadecimal color format in the tutorial (0xFF), I think, but you can also map the color using SDL_MapRGB.
 
monstercameron, if you are having problems, why not pop into the #wiz or #wizdev IRC channels and ask some questions. I'm usually there during the day (GMT timezone), although not much is going on (probably because no-one has any questions). It is probably better to get questions answered right away when you are developing, and i will try and help any way i can. I am fluent in C++ and SDL.
Now, the funny thing is i don't remember which server the channels are on... anyone can help me out here? I think it was efnet. Or I will edit this post once i get to my computer :)

The server is irc.efnet.net . I use pidgin as an IRC client. See you there ;)

/Uni
 
I tryed BennuGD and could not figure how to compile and get it to work on the cannoo,.
then tried Love, and built a little game that works (CCZap). Lua is very nice, (very good dynamic arrays) and since the engine is pre-built and you just write scripts :. no compiling needed.

Yeah, some less technical systems for building stuff for the Caanoo would be welcome.
I would like to see a port of ZGameEditor, it is a cross-platform (windows tool, that builds games for linux, osx, and win) engine and development tool,. see; http://www.gp32x.de/board/index.php?/topic/56992-zgameeditor-some-porting-considerations/

Since it alread runs on linux and uses just sdl/openGL it should be possible although the gl used would need to be limited to the ES flavor.
 
Last edited by a moderator:
I liked Lua, but the speed wasn't admirable for me (I was getting really low FPS on a very simple sprite and level drawing). It needs to run faster - BennuGD is good for me, but I'm starting to dislike the arrays. All you really need to do to get BennuGD to run on the Caanoo is to put the compiled dcb file on the Caanoo in the same directory as the runtime, and then create a script to execute the compiled file with the interpreter file.
 
Back
Top