Sign in to follow this  
darkhaven3

Newbie with questions!

Recommended Posts

Hey all.

As a quick introduction before getting into the meat of my questions, I'd like to begin by saying I'm by no means a newbie programmer, and I program almost exclusively in C and occasionally some assembly depending on the platform. After tinkering with consoles like the Wii using devkitPPC and the Gameboy Advance among others, I'd like to get to the down-and-dirty of programming my first videogame from scratch, engine and all. I'm sure people will at some point get on my case about not using C++ or some other language, and to stimy this, let's just leave it that I have my reasons for not having a strong desire to use C++. I'm not all against the language itself or anything, but I'd rather not deal with the additional overhead it comes hand-in-hand with, personally.

I have some experience with some of the more low-level concepts after years of poring over the Doom and id Tech 3 source, and I think I have a pretty good idea how I'm going to go about designing the engine in itself and all the memory management stuff (simple 2D sprite-and-tile-based engine, [i]maybe[/i] support for scaled/rotated sprites if I find that I am competent enough to implement the feature cleanly), but I'd like a little help on things like libraries and maybe some open-source projects that have been completed in the past.

I concern myself first and foremost, of course, with getting a working model that behaves the way I want it to, but I am also very concerned with how efficient my resulting engine will be. I know this isn't some AAA studio I have with 200 other programmers to write professional, clean, fast code with me, but I'd also like to not end up having to statically link 200MB of libraries with my 4MB game. [img]http://public.gamedev.net//public/style_emoticons/default/tongue.png[/img]

My questions, basically, are:

1) Are there any particularly amazing 2D sidescroller engines I could look at the source for, preferably if it was written in C or C++?
2) I'm considering using SDL for my humble project. Can anyone tell me if it'd come with more overhead than it's worth? Is there a lighter-weight library I could use opposed to SDL?
3) I know my ins-and-outs of trig and matrix-multiplication, but the last time I dealt with sprite effects is feeding the Gameboy Advance and SNES arbitrary values that the hardware would deal with for me to modify sprites. Are there any awesome tutorials out there I could use to better understand how to implement sprite scaling and rotation using, say, SDL? Edited by darkhaven3

Share this post


Link to post
Share on other sites
2) SDL have enough features to your project. I'm not sure if the other libraries that I know are "better" to your purposes.
3) SDL doesn't have native scaling/rotation functions... But you can use SDL_rotozoom. it's a extension of SDL (not sure if this is the correct definition).
All the SDL_rotozoom functions are to rotate and scaling images.

Share this post


Link to post
Share on other sites
Thanks for the tip for SDL_rotozoom, I will certainly look into it. As for SDL "not having enough features", it's not really about the featureset in and of itself -- I know that SDL is fairly nice as-is, but I was wondering if there was anything I could consider that is a lighter-weight option as far as performance is concerned. I don't necessarily agree with the idea of calling, for example, some nebulous DirectX function that I don't know what does any more than I like the idea of recompiling SDL with my own custom functions that do exactly what I want them to do down to the inline assembly, especially for a project so simple as this one.

In other words, if SDL is perfectly capable of meeting my requirements (it seems to meet those requirements well enough) and if it doesn't require much more overhead than calling a function I might have written myself, then by all means, SDL sounds perfect. But if there are candidates that are even less expensive to use in the long run than SDL, I'd love to know if such a thing exists so I can at least look at it as a candidate.

Share this post


Link to post
Share on other sites
At least look at [url="http://sfml-dev.org"]SFML[/url]. It has a C++ interface, for your rendering needs, it is built on top of OpenGL (and OpenAL for Audio), and it handles all sprite manipulations (scaling, rotating, drawing) in Hardware (SDL, last I checked, did not).

Good luck and have fun with it.

Share this post


Link to post
Share on other sites
I almost suggested SFML, but I haven't experience, so, I think is better keep myself neutral about it...

[quote name='BeerNutts' timestamp='1355505050' post='5010661']
At least look at SFML. It has a C++ interface, for your rendering needs, it is built on top of OpenGL (and OpenAL for Audio), and it handles all sprite manipulations (scaling, rotating, drawing) in Hardware (SDL, last I checked, did not).
[/quote]

What you want to mean when you say this? This is new to me.(SDL doesn't handling sprites in hardware.) Edited by ptrrf

Share this post


Link to post
Share on other sites
SDL 2 has rotation in it, it also has SDL_Texture which is hardware accelerated (instead of SDL_Surface which is done by software). If you're running Visual Studio, downloading and building SDL 2.0 is easy (I wrote a [url="http://sednihp.wordpress.com/2012/12/13/sdl-2-0/"]blog post [/url] on it the other day in fact)

If you're not interested in that though and just want to get going, SDL 1.2 is excellent. For help with getting started, [url="http://lazyfoo.net/SDL_tutorials/"]Lazy Foo's tutorials[/url] are a must read. Edited by sednihp

Share this post


Link to post
Share on other sites
I must recommend sfml. I love it, it's easy to set up and use and you can do a lot with it. SDL always gave me a headache when I used it but with sfml everything is so straightforward.

It also got an easy to use system for sound and networking.

Share this post


Link to post
Share on other sites
Well, SDL and SFML are multimedia frameworks, not full-fletched game engines.
You might take a look at Orx ( C ), Allegro ( C ) or even Cocos2d-x (C++/JavaScript/C#, used by Zynga). Edited by b615421998

Share this post


Link to post
Share on other sites
At this point it's looking like I'm going to go SFML. It works pretty spectacularly for my purposes, and there doesn't seem to be a lot of overhead involved.

As far as actually USING a third-party engine as-is, I'd rather not; that would defeat the purpose of my project. But I'll definitely take a look at the source for Orx and Cocos2d. Allegro as a whole has been a headache for me in the past - both DOS and Windows - and I'd like to stay far away from using it. [img]http://public.gamedev.net//public/style_emoticons/default/tongue.png[/img] Edited by darkhaven3

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this