Jump to content
  • Advertisement
Sign in to follow this  
Mafioso

Need simple game source code

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey, can someone link to simple 2D game like snake, tetris made with c++ and DirectX, source code? I need it for learning purposes. Tried google, but cant find it [depressed]

Share this post


Link to post
Share on other sites
Advertisement
Thanks, I'm trying to make snake, can someone link to snake source code, made with c++ and DirectX ? Maybe someone made snake and can share, because I googled 7 pages and can't find it [depressed]

[Edited by - Mafioso on July 15, 2010 4:51:16 AM]

Share this post


Link to post
Share on other sites
why are you only asking to see other people's source?
first you ask tetris, now you ask snake, why?
You won't learn anything from using the source code of others.

assainator

Share this post


Link to post
Share on other sites
Quote:
Original post by assainator
why are you only asking to see other people's source?
first you ask tetris, now you ask snake, why?
You won't learn anything from using the source code of others.

assainator
Um... Not entirely true.
A lot can be learned from big open source projects, but it's true: not snake and tetris.

Anyone who wants to be a programmer should make these games for his own.

But people are lazy as hell nowadays (I would say ignorant prick, but I won't...).

Share this post


Link to post
Share on other sites
Quote:
Original post by assainator
why are you only asking to see other people's source?
first you ask tetris, now you ask snake, why?
You won't learn anything from using the source code of others.

assainator


why are you only asking to see other people's source?

because I want to learn from their code, know how to make things done, what way is best to make things, what need to know making game, in conclusion learn form them

first you ask tetris, now you ask snake, why?

I wrote tetris/snake, but I trying to make snake game and I didn't found things above.



Share this post


Link to post
Share on other sites
Quote:
Original post by szecs
Quote:
Original post by assainator
why are you only asking to see other people's source?
first you ask tetris, now you ask snake, why?
You won't learn anything from using the source code of others.

assainator
Um... Not entirely true.
A lot can be learned from big open source projects, but it's true: not snake and tetris.

Anyone who wants to be a programmer should make these games for his own.

But people are lazy as hell nowadays (I would say ignorant prick, but I won't...).


People are not lazy they are smart [smile] trying to learn from others an
d why not snake or tetris? I'm still beginner only, no one gives you big open source projects as you said

Share this post


Link to post
Share on other sites
Quake III is big enough for you? Okay, it's C.

As I stated, it's good to learn from other's code (very good thing), but you have to struggle through these simple programs yourself once. Or you will only ask for codes and solutions.

Make these programs first (even if there won't be bright ideas in it, or it's not the most optional code), THEN you can take a look at other's code for comparison.

IMHO

Share this post


Link to post
Share on other sites
Mafioso - the problem with starting with someone else's code is that you do not get to learn from the iterative process of building a program.

The only way to learn is to build the program in stages, and fully understand each stage as you do so. Starting with a finished program and playing with the source will teach you very little.

The trick is to break things down into smaller sections, then research each section.

For example, to write snake, I can break it down into:

a) create a window or initialise whatever graphics device I am drawing to
b) create a game loop
c) load images
d) draw images to the screen
e) respond to input
f) decide how to represent the snake internally
g) figure out the logic for converting input into changes to the snakes representation each loop
h) etc

Once you have broken down your problem into smaller chunks, you can then research how to achieve each stage.

Yes, you can learn from other people's code, but you will learn far more by breaking things into bits and researching each bit.

Share this post


Link to post
Share on other sites
Quote:
Original post by Aardvajk
Mafioso - the problem with starting with someone else's code is that you do not get to learn from the iterative process of building a program.

The only way to learn is to build the program in stages, and fully understand each stage as you do so. Starting with a finished program and playing with the source will teach you very little.

The trick is to break things down into smaller sections, then research each section.

For example, to write snake, I can break it down into:

a) create a window or initialise whatever graphics device I am drawing to
b) create a game loop
c) load images
d) draw images to the screen
e) respond to input
f) decide how to represent the snake internally
g) figure out the logic for converting input into changes to the snakes representation each loop
h) etc

Once you have broken down your problem into smaller chunks, you can then research how to achieve each stage.

Yes, you can learn from other people's code, but you will learn far more by breaking things into bits and researching each bit.


So that is what I'm trying to say, I want source code too make steps what I need to learn (as you wrote above) and I will go to tutorials how to make these steps, understand every function used to create them. I want to learn from good example, not trying to make my own mess.

So if someone have snake source code, I will be thankful [smile]

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!