Jump to content

  • Log In with Google      Sign In   
  • Create Account

EpicWally

Member Since 04 Sep 2012
Offline Last Active Nov 19 2012 12:46 PM

#4999319 TDD development / examples

Posted by EpicWally on 09 November 2012 - 09:42 AM

I asked this same question not too long ago. Rather than ramble off the advice passed to me, I'll link you to the post here so you can read it. There's a project linked there for a TDD Tetris project that I found very useful. (Re-linked here so you don't have to dig for it.)


#4998247 Motivation

Posted by EpicWally on 06 November 2012 - 05:21 PM

I have to agree with Ashaman73. Think small goals. Feel good when you accomplish them. Try to think as little as possible about your finished game as far as mechanics go. Usually this leads me down the path of "Oh, I want this to work like this, which means I'll need this object, which will need to communicate with such, and oh I should make this interface..." etc ad infinitum until you're thinking about 100 different things that need done, and you shutdown from overload. I prefer to think along the lines of "Ok, where am I now? What is one thing I can easily add? or, What is the next logical thing to implement?" You add that thing, test it out, refactor, and boom, you just successfully got a little closer to your end goal, and you feel great about it. Sometimes I just have no idea what to work on, so I go back and look at some existing code and ask "Is this as clean, or as efficient as it could be?" and then sit down to clean up that one piece of code, which also improves your program and your ability to look at it and determine next steps.

In a nutshell, think baby steps, and put the blinders on for every step thats past the one that is next to work on. Start from the ground, and build up to the final game, rather than looking at the final game and trying to break it down to it's tiny pieces.


#4997714 What is a (Finite) State Machine? Why are they useful for game dev?

Posted by EpicWally on 05 November 2012 - 02:46 PM

Another user linked me to this a while ago. I think this will help solidify the concept, and show you a state machine in action in a simple game.


#4996659 Rogue-like tile system display question

Posted by EpicWally on 02 November 2012 - 02:28 PM

I hate doing this, but bump? Anyone got thoughts on this one?


#4986992 TDD in game development?

Posted by EpicWally on 04 October 2012 - 08:17 PM

Frob - Thank you for the link to the Tetris by TDD tutorials! I got through the first section, and I'm enjoying it/learning a lot from it. I already did my own Tetris clone a while ago, so to go back through it in a different way like this is pretty neat. I can't wait to get through the rest of it!


#4986902 TDD in game development?

Posted by EpicWally on 04 October 2012 - 03:10 PM

Kind of a random question that might be putting the cart before the horse... I've recently been reading Clean Code - A Handbook of Agile Software Craftsmanship at the suggestion of another user on this site in another post. One thing that is mentioned is unit-testing. Being somewhat new to programing (only having programed Tetris, Breakout, a Maze game, and starting on a Gradius-type clone) I had no idea what this even was. So, I did some reading on the concept, and ultimately learned of Test Driven Design (TDD) and conceptually it seems like a good idea.

My two questions:

1.) Is TDD applicable to game development? I'm guessing the answer is yes for large projects/teams, but I don't know about small project games like what I've mentioned I've done/am working on.

2.) If it is, what kinds of tests would one run?

This is probably a case of "If you have to ask, you don't know enough to use it yet" but I want to get an idea if I should spend time learning/practicing the concept, or if it's something I can skip-over.

Thanks in advance for the feedback!


#4981226 Project Planning? (UML?)

Posted by EpicWally on 18 September 2012 - 06:31 AM

I am pretty new to programming (I have programmed 3 basic games, tetris, breakout, and a maze with enemies) and am looking to start on a slightly bigger project. Not entirely sure what yet, probably some kind of side-scroller. (Possibly a platformer, or maybe a Gradius clone.) Either of these options would be big enough that programming-as-I-go will probably set me up for disaster, or having to redo code several times, so I am looking into having at least a rough framework sketched up before I start coding. I am wondering what tools or strategies other devs use/have used that might be helpful. I have read a little bit on UML, but everything I have read about it has been mixed reviews. (Also, there are all different kinds of diagrams and charts to it, and it sounds fairly complicated, so I don't know if it's worth the time investment to just learn a diagraming method, especially when reviews are mixed.)

One site I have found and dabbled around with (it's not programming specific) is www.exobrain.co, which seems useful for mental mapping. In its simplicity though, and having only just started with this, I don't know if it will provide everything I need. I have attached a picture of a section of my longer term project that I have started planning on here. My scheme was to pick a color for Class, Interface, Member, and Method, so for each class, I could create all the members and methods I thought it would need, and keep them clear by color coding. I don't think this is a bad method, but I'm curious what strategies other people use.

Thank you,
-Wally

Exobrain.png


#4979742 Opinion on new boston

Posted by EpicWally on 13 September 2012 - 09:06 AM

...So often, you get someone shoe-horning one or two useful things into a 28 minute video, but those two useful things are buried in 26 minutes of elementary basics, non-sequiturs, and other crap. Video tutorials are at their finest when they are focused with laser-like precision on a single, relatively simple topic, rather than these gigantic rambling monstrosities you see so often.


While this isn't off-topic, it's a bit too general for the question posed by the OP. To bring it back to the topic of TheNewBoston, if you have watched any of his videos (I'm assuming you haven't due to your hatred of the format) all of them are 5-10 minutes in length, and are about a single concept. These wouldn't fit the trend of "gigantic rambling monstrosities" you described.


#4979709 Opinion on new boston

Posted by EpicWally on 13 September 2012 - 08:08 AM

First, to qualify my opinion, I will say I am very new to programming (I picked up Java < 6 months ago, though I had some procedural experience before, basic, vb, etc.) My first instruction into the language was a text-book. Very dry, though comprehensive. Part way through it, I discovered TheNewBoston. I watched all of his Java videos, and while I can appreciate that his explanations aren't perfect (even at my level I noticed a number of mistakes, and I agree with thok that this is indicative of his level of competancy) overall I found the videos very helpful for a beginner, and have recommended them to others just getting started here. Were he to put out an "expert" series of tutorials, I don't think I would value them particularly highly.

What I belive it boils down to is a debate I've recently been having with my girlfriend (an 8th grade math teacher) on teaching the "how" vs teaching the "why." Ultimately, if you know the "why", the "how" can generally follow quite easily. Unfortunately, for most students, learning the theory behind the "why" without the "how", is a very daunting task. For that reason, it is often best to teach the "how" first, and once that's understood, show the "why" that's behind it to solidify the concept. I think Bucky (TheNewBoston) does a good job explaining the "how" but having a limited understanding of the subject matter himself, falls short of properly explaining the "why." It is for this reason that I advocate supplementing his videos with a textbook, or other more complete resource. The textbook by itself, is a painful way to learn, and while it can teach the "why" very well, I think it falls short of explaining the "how" the way a person can. Watching his videos (which can be entertaining) and then going back to the book to make connections, prevents it from being a dry learning experience, and develops a more complete understanding of the subject matter. Think about it, in college (or wherever you took classes to learn programming) you first listened to a lecture by a professor, then went back to the text book for homework/reading between classes. Same idea.

My $0.02.
-Wally


#4979286 Good tutorials for learning Java?

Posted by EpicWally on 12 September 2012 - 06:46 AM

I'll second Uzumakis comment above. TheNewBoston (you can find him on YouTube, or at www.thenewboston.org) is a great beginners guide to the language. He has ~150 5-10 minute tutorials on just Java, and then another ~25 or so pertaining to game design. He also has C++, C#, python, and tutorials for other languages, so if you're looking to be well versed in programming, you can learn the basics of a lot of languages in one place. I have been through all of the Java ones, and in conjunction with a textbook I've been reading (Thinking in Java by Bruce Eckel) I feel I have learned the basics pretty quickly.

Another site set up in almost the same way is www.mybringback.com. I only watched the first couple (as I had already gone through the whole new boston series) so I can't comment on the entirity of the tutorials, but from the first couple they had a very similar style to the new boston. My advice: take a look at the first couple of each, and see whose style you like better.

Another recomendation I would have is to pick up a book on design patterns at some point (I haven't seen any good tutorials on these, but I haven't really looked.) One thing I noticed in going through all the tutorials, and my other text book was that I found myself understanding Java, at least the syntax of it, but not having a clue what objects I needed, or how to structure them, etc. I felt reading up on design patterns (and generic Object Oriented principles) in conjunction with learning the language made things a lot easier to conceptualize and understand.


#4977309 checking for end of game in hex

Posted by EpicWally on 06 September 2012 - 12:31 PM

I think A* is a good place to start, but since you don't really care what the shortest way across is (only that there is a complete path across) it could be somewhat simplified (you don't need any heuristic values, parents, distances, or anything like that.) Have each hex have a list of hexes called neighbors. Then, when a hex is set to a player, have it check the six hexes around it to see if they are set to the same player, and if so, add that hex to its neighbor list, and add itself to that hex's neighbor list. Then, for the check win condition, have it add the most recently added hex to an open list. Then take the first hex in your open list, move it to the closed list, and have it add all of its neighbors not already in the open or closed list to the open list, and repeat. When it is done, it will have a list (closed) of everything in the chain connected to the most recently placed tile. You can then quickly search that chain to see if it has a tile at the x=0 and a tile at the x=10 (or whatever your coordinates are) and if it finds both in that list, it knows it's a win. If not, it clears the lists, and passes the turn.


PARTNERS