🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Game source code for learning

Started by
9 comments, last by webspynner_99 24 years, 3 months ago
Does anyone have any small games with good notes in the source code that you would be willing to give away and let someone edit? I would like to start learning to make games and I think if I see some source code and try to manipulate it I can learn the best that way. Maybe this could be a new section on Gamedev. post a game for newbies to tear apart and learn from. Also, I have some books that I will eventually read. Once I''m done with those, what do you think I should try first? RPG, platformer, FPS, arcade, or what? "YOU APES WANNA LIVE FOREVER?" Starship Troopers by Robert A. Heinlein "Who wants to live forever?" Queen "Never trust a bald barber" me B^)
Advertisement
How about starting out with tetris or pong? Perhaps even pacman if you''re a tough one . Just beware of Hasbro!


"I think, therefore I am...I think"
I made a small game called Eater (stupid name). If you want to the source, e-mail me.

/. Muzzafarath

Edited by - Muzzafarath on 3/26/00 11:52:58 AM
I'm reminded of the day my daughter came in, looked over my shoulder at some Perl 4 code, and said, "What is that, swearing?" - Larry Wall
You sound pretty much like a newbie game programmer. So am I, I''m actually very new to game programming, but for someone who has no past experience in programming to be able to look at a game''s code, understand it and derive a whole new game from it would be a miracle. Every game programmer must follow these steps if they hope to accomplish the completion of their own game:
1) Learn a language! I reccamend C/C++. C++ is C but a whole lote more. It''s powerful, and really felxible. C is cool too. While not as powerful ass C++, most of the tutorials and books use C instead of C++.

2) Learn a Graphics API (such as Direct X or OpenGL). If you want a make a game that goes beyond text-based (and almost eveyone does), you should Learn a graphics API.

Basically, when you have those two steps down, that''s when you''ll be able to bust out some games!

Programming::~Fredric(const Annoy_Ance)
3D Math- The type of mathematics that'll put hair on your chest!
webspynner_99 I made some really simple games like tetris, pacman a while ago, if you would like the source code please email me and I'll send them to you. They were all made using c++ and directX.



Edited by - Chris F on 3/26/00 1:01:04 PM
"I have realised that maths can explain everything. How it can is unimportant, I want to know why." -Me
Check out my TicTacToe game at the Showcase.

Have fun
I have some experience with programming. I do a lot with web pages, so I sometimes experiment with making games in java-script (no, not Java) and HTML. Crazy, huh? I actually was able to make a rather descent tiling enginge for an rpg. I once tried to make a first person shooter also, but I couldn''t quite get it right. So I do have some experience, especially the concepts and thought process.

I''ll try to check some of these out.

"YOU APES WANNA LIVE FOREVER?" Starship Troopers by Robert A. Heinlein
"Who wants to live forever?" Queen
"Never trust a bald barber" me
B^)
You know HTML and JS, and you were able to make an RPG tilling engine? Now THAT is impressive!!! I know HTML... but I suck at it! :p

Programming::~Fredric(const Annoy_Ance)
3D Math- The type of mathematics that'll put hair on your chest!
thank you, thank you (bowing deeply). Actually, it was quite easy. I used a semi 2d array. It was a regular array, with strings of letters as it''s value. The engine took the letter at a certain spot in the string and that defined what tile to use. The only problem was that I had to make it only 5X5 tiles viewable or else I would get major system slowdown. The major advantage of the semi 2d array was that the data for the map actually resembled the map itself, so I was able to easily edit it.
I liked making the JS games because it was a real challenge and took advantage of everything I knew. One of my favorites was a really simple color clicking game like simon. It would speed up as you played and you would earn more points for each click the longer you played. It even gave reaction time data. I also made a deer hunter game that randomly generated trees on a prerendered (read: drawn in MSPaint) background. There were different weapons, like a rifle, a shotgun, a handgun, and a slingshot. The rifle and handgun had small bang noises and the shotgun had a large boom, while the slingshot had a boing.
I couldn''t find the tetris at the showcase. I downloaded the osepong (nice and short, should be able to do this one) and the 3d terrain engine (abviously too advanced for me, and no source code). I couldn''t get the osepong source code to compile. It came with a compiled version of the game, but when I tried to compile the source just straight, it didn''t work. A number of errors came up involveing a break command. I may eventually figure it out.

"YOU APES WANNA LIVE FOREVER?" Starship Troopers by Robert A. Heinlein
"Who wants to live forever?" Queen
"Never trust a bald barber" me
B^)
There is a place, its called the GD Showcase! I have a pong game on there that uses only the windows GDI and requires no header files so its very easy to understand. Check it out, source is included. It''s called OSEpong.
"there is beer coming from the chimney, code 3, I am proceeding on foot,i repeat bring pretzles."

This topic is closed to new replies.

Advertisement