an example of a simple game

This topic is 4908 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

i don't know if this can help anyone, but i have been seeing requests for a good example of a game on here and decided to put it up. My open source platform game. about a year ago a friend came to me and said he wanted to get into game programming, but wanted to do something simple, like a 2D scoller type. so i wrote up a quick little game remenicent of "Donkey Kong". i even later went in and added some old NES graphics to illustrate animation (i am no pixel artist, so ripped Mario will have to do). he never really went on to write a game though, so i guess i'll put it up and hope someone here benefits from it. [Edited by - anist on September 17, 2004 7:45:39 PM]

Share on other sites
Oh hey this is great for us newbees!
I will take a look at it!

1000+ rating points for you!!!!

Share on other sites
OK make that 10,0000 points!
Of course if you could please include like the .sln or .dsw so I can stop messing up the compile.

This code is awsome, and love what you have done...

Share on other sites
hey, thanks. i fixed the .dsw problem to. should load up and go now.

Share on other sites
nice...100% rate..i mean 100.000 rate..good 4 use newbs..

Share on other sites
Oh this is soooo awsome!
You have made it so I can understand.

I wish i could give you a million rating points.

Any more stuff like that is very much accepted here.

Share on other sites
Very good, especially for beginners. Keep up the good work.

Mind if I port it to .NET using my own graphics library, as sort of a tutorial for new users?

Share on other sites
Quote:
 Original post by SijmenVery good, especially for beginners. Keep up the good work.Mind if I port it to .NET using my own graphics library, as sort of a tutorial for new users?

not at all. you guys can feel free to make any modifications you like, please post them here, i'd like to see what you've done.

Share on other sites
OMG!!! That is EXACTLY what I've been looking for since I began game programming! Thankyou!!

Share on other sites
After I beat the third level, it pops up, "Cannot load level 4", "cannot load level 5", etc. until I terminate the program.

Other than that, it's good. And the problem is solved easily.

Share on other sites
OK I can answer that one.
Look at the files leve1.txt etc.

change this:
			player.level++;			char buffer[256];			wsprintf(buffer, "level%i.txt", player.level);			loadLevel(buffer);			return;

to have a while loop

Oh I hope you have other stuff just laying around like this.

Share on other sites
Or even Lemmings!
I have always wanted to learn how to make one of those.

Share on other sites
There is a .net version of loderunner on gotdotnet called coderunner.

Share on other sites
Thank you so much I've been lokking for something like this forever.

Share on other sites
i'm glad this was so well recieved. for the first time ever my rating > 1000 :P

the level thing is no bug. i never knew how many would be made, though i stopped at 3. a simple check would keep it from doing that.

i don't know about loadrunner, but i have a simular blackjack game i may post, and was thinking of doing a simple "Legend of Zelda" type game if anyone was interested. the real challenge here would to be to keep it simple and illustrate the concepts, as opposed to putting in too much and making it useless for newbs to learn from.

Share on other sites
Hey this is cool. Of course it's great you kept the source to about 500 lines and it's all in one file! Makes it nice and easy to compile [inlove]

I've never used BitBlt for a game, but it seems amazingly nice and simple. I would like to see pressing escape quit the game.

I glanced through the source file and it looks like it should be a .c not a .cpp

Share on other sites
Nice one, a cool little game.

I'm sure many will benefit from it here at GameDev, it always seems like you can only get so far with programming and then get stuck trying to put it all together.

Rating++

Share on other sites
Nice, too bad it's in C, though. How hard was it to make?

Share on other sites
Great, I've just started C and some sample code would be lovely.
Consider that a ld hl, Ratings \ inc (hl) from me.

Oh, wait, I'm learning C. No more z80 ASM... ratings++;

Share on other sites
Way ta go buddy.[cool]

That's a really cool one.I started with 3D before I did a scroller.

Btw it dont work very well on my comp.It's runs on Windows ME.Here's a screenshot.I ran it a couple of times but there were huge flashes and flickering

But your code is all nicely formated and commented.Very good job on that.I dont really know why it's looking messed up on my comp.

Hey any of you guys want to see a really simple 3D engine?

If anyone wants to try using GDI like mode13h, look into >>>> GCL <<<<<.It provides you with a linear char buffer just like Mode13h, but with any dimesions you like.There are some example programs with it.Also with a small modification you can use the windows API funtions directly.

Share on other sites
It seems to not be drawing the background.. odd o_O

Share on other sites
Mecrenary: it was very easy to make. i get a lot of questions on how long it takes to develop code X, so i have started rating them by the number of 12 packs i drank while writing it. this took about 1.5 12 packs altogether. most of this was looking for and formatting the graphics. the skeletal version was up and going very quickly though.

benryves & Mercanry: if you like game programming you should at least be familiar with C. though assembly is a good skill to IMHO.

Firenet: yes, a friend noticed this glitch way back when i first got this done. i developed it on XP, and GDI works somewhat differently than 98/Me. as a result the 98/Me users may have the non erased background glitch. if i get a chance i may go fix it, but i no longer have anything running those classics to test it on...

Share on other sites
Quote:
 Original post by FireNetWay ta go buddy.[cool]Btw it dont work very well on my comp.It's runs on Windows ME.Here's a screenshot.I ran it a couple of times but there were huge flashes and flickeringBut your code is all nicely formated and commented.Very good job on that.I dont really know why it's looking messed up on my comp.

The same here on Win 98 SE.

Share on other sites
ok, i fixed the non erasing for those of you who have older versions of windows (hopefully, like i said, i can't tell for sure). i'm also working on a classic RPG type example. let me know if you guys have any more problems.

Share on other sites
You get my heart felt thumbs up.[google].