Jump to content
  • Advertisement
Sign in to follow this  
ChristianFrantz

Hit a roadblock

This topic is 2134 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

I've gone through books and books of xna and c# these past few months and I feel like I've hit a bump. I understand mostly all of the code thats been given throughout these books, but whenever I try to create a tetris or snake clone I get stuck.

 

Is there something I'm doing wrong with the way I'm learning? My process is to write the code, read the explanation, and reread and recode anything I don't understand. Before I move forward any further I want to make sure that I can create a simple game like tetris from scratch

 

I've tried learning c++ with opengl and directx, but my heart belongs to xna for some reason. I thought that learning new libraries would help but thats not the case

Edited by burnt_casadilla

Share this post


Link to post
Share on other sites
Advertisement

You have learned all the syntax, you just need to learn how to use it now. Try designing Tetris as pseudo code and class diagrams. I am guessing that you are getting stuck at splitting up each part of your game into different classes. You should probably try and come up with a few very simple programs that have an OOP architecture. My first experiment with OOP was a simple program called "plants". There was a "Plant" class, and a Flower and a Tree class, both which inherit the Plant class. The flower and the tree are instantiated in a main "Garden" class, in which the amount of sunlight and water for both plants is controlled. I added a simple user interface that controls those parameters of the garden. I suggest doing something similar.

 

Even if it isn't OOP your having trouble with, you can do similar mini projects for different things you may be unclear about. Make small applications that do simple things like draw and move shapes around the screen, do simple collision detection etc.

Edited by minibutmany

Share this post


Link to post
Share on other sites

I think the advice given by Mr. minibutmany over me here is great, and I have to admit I should be doing the same thing myself more often.

I'm working on something insanely complicated, (but then again aren't we all!) and there are many times where I really should be doing a smaller version of the problem area, if not only to help myself understand it better, but also to have something that you know works :)

Share this post


Link to post
Share on other sites

Well, libraries will help with the implementation details, but you still have to work out the relevant algorithms.

 

The difficulty depends on what you already know, and the tools you're using. I wrote an OpenGL Tetris game in pure C, and while not overly difficult, it could have been much easier with a higher-level language, and better tools.

 

If you want to look at the source, it's on my github: https://github.com/GoranM/wtetris

 

A video of how it plays:

 

 

 

I'm working on something insanely complicated, (but then again aren't we all!)

 

 

That's why so few of us actually finish anything. smile.png

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!