• Welcome to PS4Forum - The #1 PlayStation Forum. Why not take a minute to register for your own free account now? Registration is completely free and will enable the use of all site features including the ability to join in or create your own discussions.

I want to make games with C++ and SDL: here's 2 basic sample programs


New Member
My favourite combination is C++ and SDL. C++ being the multiplatform programming language (not controlled by Microsoft or Oracle) and SDL being the library which provides graphics, sound, key input, mouse input. There are other ways but I prefer C++ over Python and Pygame. It took ages but I finally hacked together a program* which demonstrates classes, objects and lists. It's actually pretty easy.

Speaking of easy, Blitz Max is now free (as in beer) and open-source. Blitz Max is made by a New Zealand company, it's a simple games programming environment. A couple of weeks ago I made a Blitz Max program** which creates a "line" or "chain" of brick walls based on a simple function. Basically it's a crude level editor. A proper level editor would write output to a file (and I did make something like that back in 2006). See my wall generator program's output here. I put the text "made by the level lord" as a joke reference to Duke 3d maps where it would say "you're not meant to be here - from the levelord".

* This pastebin file expires in May 2016 and later this year my web host plan may expire so this thread will probably become pointless. Anyway, I just wanted to demonstrate some basics. Eventually I'd like to make my own projects, especially primitive strategy games! Even if I'm only doing gamedev as a hobby, I could achieve enough to be happy.

** A BMX file is plain text - you can view it in your browser.


New Member
I highly recommend programming things from scratch. It's slow and it seems pointless, but you can build skills http://jeff-mitchell.co.nz/code/first_version.zip. All I demonstrate in this project so far, is alpha blend, split the project into multiple files, and handle keyboard input. I actually stole the input.h and input.cpp from a textbook but the rest of it I made myself, with a bit of help. It's very confusing even to do the basics. c++ is serious stuff!

Get Connected With PS4Forum.com

Like PS5 Forum!