PDA

View Full Version : My first game in c++



gufide
June 15th, 2011, 05:29 AM
Hi there,

I started to programming since one year, following some tutorials around the internet. I made some utility programs (very basic like 100 lines) or tic-tac-toe terminal like games. While playing the little game chip's challenge (http://en.wikipedia.org/wiki/Chip%27s_Challenge), I got the idea to reproduce it. I take about four month of non-intensive programming, because I have to go to high school :razz: and I finally made a playable version. I made an engine to load level from text file, but it only load it at the launch of the game (only to show a demo of the feature :wink:) real level 1 can be play be reload (using 'r') and the others levels, including the real level one, are compiled with the executable file. I know there's some un-polished functions, I will make a little clean-up next time. In-game controls are:


Move: WASD/arrow keys
Next level: n
Previous level: p
Restart level: r


The tar file contain source, make file, sprite/sounds and executable for linux :smile:

http://www.mediafire.com/?d8b5akg36l569zt
I use this because I can update my project daily.

Please send me feedback and ideas, it will help me to continue!
You can edit and redistribute the source under the terms of GPLv3 license :wink:

Of course, you can contact me at gufide_g@yahoo.ca

Good game :popcorn:

3Miro
June 15th, 2011, 12:12 PM
How do you compile this thing? You did not include a Makefile.

BrokenKingpin
June 15th, 2011, 06:25 PM
What library are you using for the graphics... SDL?

timZZ
June 15th, 2011, 07:50 PM
Chip's Challenge ha ha WOW! Played that on my Atari lynx.

mmsmc
June 15th, 2011, 07:52 PM
how did you compile it?

gufide
June 15th, 2011, 07:54 PM
yes, I am using SDL, just take a look in the source ;)

And I did not give the makefile because the one given by anjuta simply doesn't work outside the IDE. I can send you the configure file, but all function of SDL are 'not defined' when you are using the terminal, but it can be useful with anjuta...

To try it you don't need to compile it, binary is included in the archive, and I give the source because I just want to share it and show up what I did :p

cgroza
June 15th, 2011, 07:54 PM
I would have tried it, but too bad, there is no make file.

collisionystm
June 15th, 2011, 07:58 PM
there is nothing to compile....

collisionystm
June 15th, 2011, 07:59 PM
lol great music in the game.

collisionystm
June 15th, 2011, 08:01 PM
cd game folder

sudo apt-get install libSDL_image1.2

sudo apt-get install libSDL_mixer1.2

./chipper

KoolPenguin
June 15th, 2011, 08:07 PM
Tried it, works great. Good job! :)

Simian Man
June 15th, 2011, 08:23 PM
I like it, but don't have much time to play it right now, I got stuck on the 2nd level.

By the way, makefiles aren't some magical thing that lets you compile code. Just type:


g++ *.cpp -lSDL -lSDL_image -lSDL_mixer -o chipper


To compile it.

gufide
June 15th, 2011, 08:31 PM
*** Update ***
Now the folder contain configure and make file

gufide
June 15th, 2011, 08:34 PM
I like it, but don't have much time to play it right now, I got stuck on the 2nd level.

By the way, makefiles aren't some magical thing that lets you compile code. Just type:


g++ *.cpp -lSDL -lSDL_image -lSDL_mixer -o chipper
To compile it.

Thanks, I think that this will help me ;)

gufide
June 21st, 2011, 04:08 AM
Hey, I'm about to make a level-editor, I need some idea. No one got a little mockup for me?