Jump to content

  • Log In with Google      Sign In   
  • Create Account

Hit a roadblock


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 burnt_casadilla   Members   -  Reputation: 443

Like
0Likes
Like

Posted 09 September 2013 - 10:18 AM

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, 09 September 2013 - 10:20 AM.

If you see a post from me, you can safely assume its C# and XNA :)


Sponsor:

#2 minibutmany   Members   -  Reputation: 1676

Like
3Likes
Like

Posted 09 September 2013 - 11:48 AM

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, 09 September 2013 - 11:52 AM.

Stay gold, Pony Boy.

#3 Kaptein   Prime Members   -  Reputation: 2179

Like
0Likes
Like

Posted 09 September 2013 - 12:19 PM

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 :)



#4 Goran Milovanovic   Members   -  Reputation: 1104

Like
0Likes
Like

Posted 10 September 2013 - 09:03 PM

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


+---------------------------------------------------------------------+

| Game Dev video tutorials  ->   http://www.youtube.com/goranmilovano |
+---------------------------------------------------------------------+




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS