Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


New First Game need pointers


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
9 replies to this topic

#1 Ares1989   Members   -  Reputation: 137

Like
0Likes
Like

Posted 16 June 2013 - 02:28 PM

I'm sure some of you have seen my thread about the Frank Hunter ACW clone I guess you could call it, that I've been wanting to build for my first game. I have found it, while a good idea and as I was going about it slowly, a workable one. However, I have deemed it too ambitious for my level and have settled with a text-based RPG to start out as I'm more  capable with that (Already created basic input info, output story type text based stuff). Now, for this to work as I'm brand new to C++ , I'll need ideas for the basic coding elements needed (I.E. An array for this, class for that, etc. [FYI: I already know characters and enemies need a class, so don't list that please); I can work from there.

 

Now, I want a drawn out menu module for this game. A start menu for new game/ continue (Selectable only if applicable [ I believe an if function would be necessary for that one] options [Load screen for continue if applicable]), an in-game menu with multiple options in it such as an equip screen, item inventory screen, save option, etc. Yes, the menu module seems reminiscent of a Final Fantasy menu but that's where the idea came from. To me, that's the best menu module out there for any rpg whether text-based, 2d or 3d.

 

I'll also need a battle system and a leveling system for character progression. For those of you more experienced in that, as I have no clue what would control everything in that (I know I'll need separate files for these systems, but that's a given) Please fill me in on the basic c++ elements for this.

 

For story aspects, I'm not sure what exactly what I'll need, but I do need a text output of some sort for the story and character dialogue. Again, those experienced in this can point out the basic C++ elements needed for everything inside this (I think this may be a little beyond the basic  cin, cout I've been doing for my small projects).

 

 

Once I get the basic elements, I should be ok and be able to get the game done in good time to show my friends and family as that is the purpose of this (I don't think many people want to play text-based games since 2d and 3d graphics are out) project (Showing them how well I've progressed).

 

If I've missed anything that's crucial, please feel free to add it. This may be text-based, but story wise it should be about as big as a standard Final Fantasy game would be. I'm not a graphics person so that's the reason for the text-based requirement.


Edited by Ares1989, 16 June 2013 - 02:34 PM.


Sponsor:

#2 shadowisadog   Crossbones+   -  Reputation: 2549

Like
0Likes
Like

Posted 16 June 2013 - 10:00 PM

Hello Ares,

 

The entire point of programming is learning to solve problems and to break large problems into smaller chunks. Programming is really mostly problem solving.

 

You could read about the various flow control and data structure options available and decide for yourself which to apply in the context of the program that you are trying to create.

 

I know this sounds like it would be easy to make the wrong choice or to end up with a bad design... and that is exactly the point. You should write the program using what you know now, and then get feedback on it... from that feedback you will learn. You will also learn when you think to yourself  "If I had done it THIS way it would be much better!" That is when you improve as a programmer.

 

Here is some advice anyway though:

 

1. I recommend trying for a data driven design. Define rooms/monsters/items/ect through configuration files. Ideally adding new items to the game should be mostly a matter of editing configuration files and not involve writing much additional c++ code (if any).

 

2. A vector is probably adequate for your inventory purposes.

 

3. Favor references instead of pointers. (If you don't know when to use a pointer, then usually the answer is don't).

 

4. cout and cin are fine for your text output and input. If you really want to get "fancy" you could mess around with ncurses (Although if you are using Windows then you are going to have a headache with this... If you are using Visual Studio than you probably don't even want to bother.). There are highly windows specific ways of manipulating the console, but I really don't wish to suggest them...they can be turned up in a google search.

 

5. Consider using Python instead of C++ (Just my opinion, don't shoot me!). Here is a nice curses module for PyGame that works with windows and linux: Pygcurse.


Edited by shadowisadog, 16 June 2013 - 10:17 PM.


#3 Ares1989   Members   -  Reputation: 137

Like
0Likes
Like

Posted 17 June 2013 - 12:36 AM

I'm a lecture/example type of learner. Ok,  to clarify, I started learning C++ through what ever books I could find at the local library or online tutorials. A lot of them were dry reads, you know detailing the code and showing the code itself. the only one I truly learned anything from on terms of games however was Beginning C++ through Game Programming third edition. Now that actually got me to understand game programming in general to an extent: the examples used in the book. I can clone the examples there no problem with even changing the details of everything. The problem is: the elements of the language that I've learned, I only know how to use in that exact way, limiting me to just repeating the same basic thing. I'm tired of it. I just need an explanation of what elements are used for what in any kind of game and I'm basically set. Unless you can suggest another source of learning.



#4 shadowisadog   Crossbones+   -  Reputation: 2549

Like
0Likes
Like

Posted 17 June 2013 - 09:18 PM

Ares,

 

Not understanding when to use elements of a language is the same as not understanding how the elements of the language works. The answer to your question is to write more programs and to experiment with how each element is used and in what context.

 

No one can tell you in what contexts to use each element of programming to make any kind of game. What elements you use and when is what programming is all about. It is about using those elements to solve small problems which have been broken up from the original larger problem.

 

It is like learning a language. You can learn the vocabulary all day, but how you form a sentence takes practice. You are really missing the grammar of programming. Your question is like "Tell me what words to use for any sort of sentence I want to write and what order to use them in and I will be all set."

 

The source of learning is practice. Write LOTS of code. Write code and write code and write code some more. Write code until you have written lots and lots of code and then write some more. Your code will suck, and you will learn from it, and you will improve. It is really the key to learning how to program.



#5 Ares1989   Members   -  Reputation: 137

Like
0Likes
Like

Posted 17 June 2013 - 10:55 PM

Ok, so I'm just lacking experience with what I know (Still not very much so I don't have all the language learned but it's a smooth process) then. My frustrations should be toward myself and not the authors. This is what I get for taking the hardest way of learning a language but I didn't have a choice. I also noticed your comment on Loxagos_Snake's topic "Writing a text-based game in C++ and need tips!" and was wondering, as I haven't gotten to maps yet, is how useful are they for a Final Fantasy- style inventory (unlimited list of all applicable items in possession and the quantity of each item)? I know I could do a vector or go simple with a regular array, but I feel an inventory setup such as this would need a map for it or if there's a better way that I haven't mentioned, please let me know what it is. I'm still new to the C++ language, although my basic cin-cout usage has been honed so much that if that's all C++ was, I'd be an expert with it. However that isn't the case. I know I can make a good story-telling program If I wanted to, but I want so much more with it and with all those extra features, come so much extra language that I'm seriously running in circles. I decided to hold back on the code first until I finish my concept first (Which is nearly done). I know the combat system will have to be an extra cpp than my main one, and probably most of the others including the inventory. Out of all of those, the Inventory in concept at least, is fully completed. I just need to get the code in, but with what I'm looking for is what seems to be my issue there. Almost everything seems to make limited functionality and that just isn't workable here; at least for me.



#6 Paradigm Shifter   Crossbones+   -  Reputation: 5406

Like
0Likes
Like

Posted 17 June 2013 - 11:04 PM

I'd use a vector since you can sort the vector based on different criteria (alphabetical, weapons first, etc.). You may want to use several different vectors for different types of equipment (armour, weapons, potions, etc.) as well.


"Most people think, great God will come from the sky, take away everything, and make everybody feel high" - Bob Marley

#7 Ares1989   Members   -  Reputation: 137

Like
0Likes
Like

Posted 18 June 2013 - 06:57 AM

ok, thank you Paradigm Shifter. And may I ask if the name was inspired by FFXIII?

 

 

Edit: also, does anybody make heads or tails of this error? It comes up even on programs I know that should work:

 

 

 

         

1>MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup

1>C:\Programming\Dung\Vector_Test\Debug\Vector_Test.exe : fatal error LNK1120: 1 unresolved externals

========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


Edited by Ares1989, 18 June 2013 - 07:30 AM.


#8 Paradigm Shifter   Crossbones+   -  Reputation: 5406

Like
0Likes
Like

Posted 18 June 2013 - 07:03 AM

Nope, I joined in 2001 2002 and FFXIII wasn't out then ;) Something to do with the shift from procedural to object oriented programming perhaps?

 

I've never played a FF game...


Edited by Paradigm Shifter, 18 June 2013 - 07:05 AM.

"Most people think, great God will come from the sky, take away everything, and make everybody feel high" - Bob Marley

#9 shadowisadog   Crossbones+   -  Reputation: 2549

Like
0Likes
Like

Posted 18 June 2013 - 07:30 PM

Did you make a console application or a windows application? This error is related to WinMain not being defined I believe. You should start off making a console application first.



#10 Ares1989   Members   -  Reputation: 137

Like
0Likes
Like

Posted 18 June 2013 - 07:51 PM

Ok. Got so used to console application being automaticI didn't check for that. That's probably what it is.






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