Beginning Game Development Path - Need Opinions
#1 Members - Reputation: 126
Posted 02 April 2012 - 02:46 PM
1. Text-Based RPG
a. Accepting simplified user input. "Which way do you wish to travel? N, S, E, W? "
b. Accepting advanced user input. "travel north", "attack goblin with sword"
c. Save states. (I'm assuming this would entail writing and reading from a file to retrieve the states, which is my intention)
d. AI. "You hit goblin with sword. Goblin blocks your attack; Goblin flees." vs. "You hit goblin with sword. Goblin dies."
e. Audio.
2. Text-Based ->> 2D RPG
a. Simple graphics display.
c. Sprite display and movement.
b. Collision detection.
3. 2D RPG ->> 3D
... I'm going to stop here for now.
I just want to be able slowly progress from the complete bottom to the top.
If anyone has any ideas on how to do this more effectively, or any tips, tricks, things to avoid, etc. for a beginner, please post them.
Thanks, and looking forward to all the comments!
EDIT: A few questions as well...
I'm wanting to make this really organized, easy-to-read, easy-to-alter code.
I want a main loop that pretty much initializes the game and manages its state, but doesn't interact with the user. I want all interaction to be done on a more intimate level. I know how I could do this is in Java, but what about C++?
... and a few programming inquiries -
How would I store area data in an easy and accessible way such as the game knows where you are and based on your location can send you to the appropriate area depending on the direction you choose to take? I was thinking something like a grid coordinate system. But then I'm not sure how I could reference the areas' coordinates...
Those who say, "It's not possible!" should look at where games started and where games are today. I'm sure they once thought that millions of players playing and interacting at once was not possible, yet we play games that match that description everyday.
Never tell me that something isn't possible; it will only make me more determined to prove you wrong.
#2 Members - Reputation: 523
Posted 02 April 2012 - 03:21 PM
If not it looks fine, although perhaps you can move the audio part to 2d (you mixed up the order btw
#3 Members - Reputation: 289
Posted 02 April 2012 - 09:56 PM
#4 Members - Reputation: 448
Posted 04 April 2012 - 10:54 PM
I see a lot of new programmers asking question about advanced data structures and algorithms. I think this is a bad idea. Things are called 'advanced' for a reason. A new writing student doesn't start with learning the structure of an essay, but the structure of a sentence. Similarly, a new piano student doesn't start learning things like syncopation until they've practiced enough to at least hit the right keys at the right times. New programmers need to start the same way. If you're a new programmer, I would recommend just writing a bunch of programs in the simplest way you can think of. Don't worry at first if you're using the 'right' structures or the 'best' algorithms. Right now you just need to practice writing code. After you've written some things you'll start to notice that you're writing similar code blocks over and over again. This is when you can step back and ask yourself, "self, how could I write this in a more generic way so I can apply it to more than one problem?" In this way you'll start to build up your own library of functionality that you will actually use. At the same time, you'll train yourself to think about how to abstract away problems.
One of the main reasons for this approach is that it lets you make mistakes. You've already considered using a grid for your text RPG; that's good! Now try it. See how it works. Figure out what problems it has. Then think about how to solve those problems. This will train you to think critically about your architecture instead of just using whatever everyone else says is the 'right answer.' One of the other key points to this is that you actually work at it instead of getting paralyzed wondering if you're doing it the "right" way. Because there is no right way. There are just ways that work better than others in certain situations. Another benefit is that you'll understand through experience the things that others just know by rote (and therefore don't really know at all): why globals should be treated carefully, why goto should be avoided, the importance of commenting your own code, etc.
Now that I'm done with my soapbox, I think your overall plan is good. I would just recommend approaching each step in at least two different ways before moving on. Again, this will help you improve your problem solving skills and will train you to write good code. The only other thing I could recommend right now is to get away from C++ as soon as possible. There's still a huge misconception that you have to write games in C++. It's absolutely not true. You're years away from needing to worry about the few milliseconds that C++ might gain you. You should be worried about the hours you'll waste dealing with C++ features that are easier or complete non-issues in other languages.
#5 Members - Reputation: 126
Posted 10 April 2012 - 06:29 PM
BTW, I will release each step as it achieves completion!
Those who say, "It's not possible!" should look at where games started and where games are today. I'm sure they once thought that millions of players playing and interacting at once was not possible, yet we play games that match that description everyday.
Never tell me that something isn't possible; it will only make me more determined to prove you wrong.
#6 Members - Reputation: 206
Posted 13 April 2012 - 10:23 PM
You're years away from needing to worry about the few milliseconds that C++ might gain you. You should be worried about the hours you'll waste dealing with C++ features that are easier or complete non-issues in other languages.
You don't waste hours working with c++ if you learn it. It is also a much more elegant language if used properly, and cannot only save you "milliseconds" if used correctly, but can save you much more than that by being low enough to skip a lot of unneeded steps.
#7 Members - Reputation: 128
Posted 15 April 2012 - 11:54 AM
You're years away from needing to worry about the few milliseconds that C++ might gain you. You should be worried about the hours you'll waste dealing with C++ features that are easier or complete non-issues in other languages.
You don't waste hours working with c++ if you learn it. It is also a much more elegant language if used properly, and cannot only save you "milliseconds" if used correctly, but can save you much more than that by being low enough to skip a lot of unneeded steps.
Agreed, those hours "wasted" on C++ will be hours gained on game development in the months to come, with every hour you "waste" dealing with C++ problems you gain knowledge, you research and you may even stumble upon stuff that make you think in ways you never would have thought if you did everything by the book. Also, I may be weird, but sometimes I get enjoyment from dealing with C++ problems, at least the end result gives me more a feeling of satisfaction like nothing else can.
If you learn C++ you will gain enough knowledge to do programming in mostly any major language used for the purpose of game development, as they are all quite similar (also majorly different at some points), but all in all C/C++ is the core of all game development, and whatever you do you will probably run into it one day no matter how much you try to avoid it.
But enough about that. Your plan looks good overall, also about the audio, you are likely to use SDL/SFML for that, so you would be all set for graphics and all the other stuff too, you can use both SDL and SFML components without having a window created by them, meaning - you can have audio in your text-based RPG.
#8 Members - Reputation: 126
Posted 13 September 2012 - 08:52 PM
Then again.. maybe not. XD
Edited by MichaelRPennington, 15 September 2012 - 08:12 PM.
Those who say, "It's not possible!" should look at where games started and where games are today. I'm sure they once thought that millions of players playing and interacting at once was not possible, yet we play games that match that description everyday.
Never tell me that something isn't possible; it will only make me more determined to prove you wrong.
#9 Members - Reputation: 551
Posted 15 September 2012 - 07:57 PM
So you're just starting C++? Hahahahaha! </end-evil-laugh> Get ready for your brains to feel like mush, your eyes to glaze over and your girlfriend to leave you lol. Starting C++ is not easy, and it takes a long time just to get over the initial learning curve in which you struggle to get the language to do anything for you, much less write a working game. However, there is nothing like the satisfaction of finally "getting it", after months and months of struggling.
I strongly suggest you listen to our friend Suspense and all of our other programming veterans and don't try to go from no C++ knowledge to writing video games. You couldn't have picked anything harder, except maybe developing an operating system or drivers. You won't even know where to begin, and it will most likely turn you off to programming altogether. Start small... write console applications and learn basic C++! Then step it up a notch, and learn to write a DLL, link it and consume it in your own console applications. Write your own libraries to handle hard and time-consuming things for you. Just whatever you do, don't give up or stop practicing. One day you will suddenly have a "revelation", of sorts, and things will begin to make sense and get easier and easier. It is then that you will be within reach of writing your first simple game or a usable application.
But for now, start small with stuff like this:
int main() {
int lbs = 0;
cout << "Enter weight in pounds: ";
cin >> lbs;
int kg = (int)((float)lbs * 2.2F);
cout << endl;
cout << "Weight in kilograms: " << kg << endl;
return 0x00;
}
Try to figure out what problems that code has and how it could be improved. Try writing your own stuff and do the same. One step at a time is the path to victory! :-)
Edited by ATC, 15 September 2012 - 08:02 PM.
CEO & Lead Developer at ATCWARE™
"Project X-1"; a 100% managed, platform-agnostic game & simulation engine
Please visit our new forums and help us test them and break the ice!
___________________________________________________________________________________
#10 Members - Reputation: 126
Posted 15 September 2012 - 08:12 PM
Basic input would be interesting, I was wondering how I should catalog and reference commands...
Should I do a string of if statements, or store them in an array, list or dictionary?
My basic command structure should end up being something simple, such as '[action] [target]' like Attack Goblin, or Open Inventory, or Open Door. This seems simple enough. We can just take the input string and split it by a delimiter, such as a space or '>', so the input could look like 'attack>goblin', and then reference it with the list of commands and functions to call...
My question is, what method to go about call the functions once the game realizes what command you have given...
Oof, why does C++ make everything so complicated? Even something as simple as splitting a string is drawn out to an unreasonable extent... It makes me miss Java.
Edited by MichaelRPennington, 15 September 2012 - 08:25 PM.
Those who say, "It's not possible!" should look at where games started and where games are today. I'm sure they once thought that millions of players playing and interacting at once was not possible, yet we play games that match that description everyday.
Never tell me that something isn't possible; it will only make me more determined to prove you wrong.
#11 Crossbones+ - Reputation: 3558
Posted 15 September 2012 - 08:35 PM
Typically this is done by parsing the input string and looking for keywords, such as "attack" which will perhaps fire an attack() method, and the second parameter says "goblin" so the method looks for a goblin near you and throws the dice to get the total damage done. You can get away with splitting the string and feeding the substrings into arrays and methods for simple commands, but once you get to more complicated syntax it gets messy quickly. Perhaps using a scripting language would be worthwhile when you reach that point.Basic input would be interesting, I was wondering how I should catalog and reference commands...
Should I do a string of if statements, or store them in an array, list or dictionary?
My basic command structure should end up being something simple, such as '[action] [target]' like Attack Goblin, or Open Inventory, or Open Door. This seems simple enough. We can just take the input string and split it by a delimiter, such as a space or '>', so the input could look like 'attack>goblin', and then reference it with the list of commands and functions to call..
Scripting languages would solve this, but another method could be a huge switch case associating each main command with its function (or you could create a lookup table mapping command strings to the correct function pointers). There are many ways.My question is, what method to go about call the functions once the game realizes what command you have given...
Well, how do you think Java does it under the hood? It just hides all that stuff from you, but it doesn't mean it isn't thereOof, why does C++ make everything so complicated? Even something as simple as splitting a string is drawn out to an unreasonable extent... It makes me miss Java.
#12 Members - Reputation: 551
Posted 15 September 2012 - 09:32 PM
Well, I know basic C++, but I just don't know how to apply it to my situation. I'd really like to use C++ rather than Python... Working with Python makes me realize that I'm not a big fan of blank space. I like encapsulation... Give me the good ol' curly brackets any day Posted Image
Basic input would be interesting, I was wondering how I should catalog and reference commands...
Should I do a string of if statements, or store them in an array, list or dictionary?
My basic command structure should end up being something simple, such as '[action] [target]' like Attack Goblin, or Open Inventory, or Open Door. This seems simple enough. We can just take the input string and split it by a delimiter, such as a space or '>', so the input could look like 'attack>goblin', and then reference it with the list of commands and functions to call...
My question is, what method to go about call the functions once the game realizes what command you have given...
Oof, why does C++ make everything so complicated? Even something as simple as splitting a string is drawn out to an unreasonable extent... It makes me miss Java.
The questions you're asking are basic C++. So you don't know basic C++ quite yet! :-)
However, you do show some knowledge and initiative. That's a major ++2 on your chances to succeed. So don't be discouraged. Keep learning the basics. Try, toil and struggle with a game if you must and your mind is set on it. You'll still learn, it will just take a long time to feel successful and recieve any gratification for your efforts. If you're not the type of guy who lets that stop him then go ahead and keep trying to write a game and don't slow down.
To answer your C++ question, if you're using an [action][target] structuring for your command inputs, then you'll want to learn to write your own class. I'll show you what I mean in C++-ish pseudo-code so you still have the challenge of doing it yourself:
[source lang="csharp"] class Command { public Command(string action, string target) { this->action = action; this->target = target; } public string action; public string target; }; int Main(string[] args) { PrintHelpMenu(); Command cmd = getCmd(); // This is how you use if/else if (cmd.action == "close") { if (cmd.target == "game") Exit(); else if (cmd.target == "menu") CloseMenu(); else ; // whatever... } // This is how you use case/switch if (cmd.action == "open") { switch (cmd.target) { case "help": PrintHelpMenu(); break; case "items" ShowItems(); break; // blah, blah, blah... You get it now! [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img] default: break; } } return 0x00; }[/source]
Don't try to compile and run that code, because it's not valid C++. Though it is quite similar in syntax and style. Read it and take the concept it expresses and learn to do such things in C++. Programming, after all, is learning to turn concepts in your head into code!
Edited by ATC, 15 September 2012 - 09:36 PM.
CEO & Lead Developer at ATCWARE™
"Project X-1"; a 100% managed, platform-agnostic game & simulation engine
Please visit our new forums and help us test them and break the ice!
___________________________________________________________________________________
#13 Members - Reputation: 126
Posted 16 September 2012 - 09:28 AM
Those who say, "It's not possible!" should look at where games started and where games are today. I'm sure they once thought that millions of players playing and interacting at once was not possible, yet we play games that match that description everyday.
Never tell me that something isn't possible; it will only make me more determined to prove you wrong.






