Need guidance on side-scroller: c++

Started by
7 comments, last by GearTreeEntertaiment 10 years, 1 month ago
I know the basics of the c++ language, but I need help on implementing graphics, hit boxes, etc... If you could please post a list of sites, tutorials, books, or articles that can help expand my knowledge of c++, that would be very much appreciated. Thanks for your time!

~GTE

Advertisement

You will first want to start by selecting an engine or api framework that supports the graphics that you are looking to do. Many people on here will suggest SDL or SFML as good starting points. How you go from there (eg the implementation of the technology supplied by the engine / framework) will matter entirely on the suggested process of the engine or framework. Or in other words, find what you want to use and then read how they tell you to use it.

http://www.libsdl.org/

http://www.sfml-dev.org/

You can of course find whatever suits your needs or likes as well. You are not limited to these or any frameworks less the requirements of your project.

Dan Mayor

Professional Programmer & Hobbyist Game Developer

Seeking team for indie development opportunities, see my classifieds post

Thank you for the help. I'll look into these engines and tutorials.

~GTE

If you decide upon SDL I recommend LazyFoo's tutorials. I personally prefer SDL over SFML because I've used it longer, but it's really whatever floats-your-boat.

Both SDL and SFML have bindings for OpenGl if you would like to use that further down the road. LazyFoo has recently added openGL tutorials with sdl (although I would stay away from OpenGL for a while).

Link to LazyFoo SDL Tutorials: Lazy Foo' Productions

Link to LazyFoo SDL and 7 OpenGL Tutorials (Incase you want to take a peek): Lazy Foo' Productions - OpenGL Tutorials

Fly Safe 7o

Thanks you guys for the advice.

~GTE

this is the base of the hit tests system I used in multiple of my 2D games:

http://carnage-engine.git.sourceforge.net/git/gitweb.cgi?p=carnage-engine/carnage-engine;a=blob;f=carnage-engine/tools/geometry.hpp;h=93a5fbc2a37e241fa97efdac2efa863398c8e3cc;hb=HEAD

with corresponding cpp:

http://carnage-engine.git.sourceforge.net/git/gitweb.cgi?p=carnage-engine/carnage-engine;a=blob;f=carnage-engine/tools/geometry.cpp;h=5135cef77280ade56fed912501ef62ec1f1e3a7c;hb=HEAD

and the whole code folders:

http://carnage-engine.git.sourceforge.net/git/gitweb.cgi?p=carnage-engine/carnage-engine;a=tree;f=carnage-engine;h=c204143f834fcbbb558da5e156d1ba47c95188e2;hb=HEAD

the geometry stuff is in tools, but you get interesting binary tree partitionning acceleration in that folder if you need.

you also have a demo to show how "simple" the usage is from a client perspective, here:

http://sourceforge.net/projects/carnage-engine/

If you do decide to use SDL as your API I would suggest checking out Tim's tutorials at http://www.sdltutorials.com/

His tutorials will take you through the basics of the game loop, rendering images, receiving player input, collision detection, and more. The tutorials are graded, so at first you'll start with programming a simple game - Tic-Tac-Toe, and you'll move onto something more complex - the basic elements of a side-scroller.

Do yourself a favor and do not limit yourself to C++ game programming tutorials only. The most difficult part of making a game is proper game design, the translation of that design into an executable code is not as difficult (if your are fairly proficient in the language/api you are using). I have learned many amazing design tricks and code snippets from many different tutorials of varying languages and libraries.

SFML and SDL aren't really game engines or even game libraries per se - you yourself will have to build your own game engine using SFML/SDL. If you were to check out libraries of other languages that are specifically made to create games (such as Slick2D or LÖVE) you might be able to learn quite nifty tricks that you can then implement in your C++ code.

Thanks guys now I started learning SDL... I already know how to program a simple game.

~GTE

This topic is closed to new replies.

Advertisement