Jump to content

  • Log In with Google      Sign In   
  • Create Account

Master thief

Member Since 01 Oct 2006
Offline Last Active Jul 22 2014 10:01 AM

Topics I've Started

Needing some quick tips on how to organize my code

15 March 2014 - 04:37 PM

I've been learning C++ from a book lately and I've been making something of a console game/thingy, and a map editor for it... Whatever it is I'm just coding and it's being fun and interesting, but I've coded it all in one file, both because I wasn't expecting to get so far with it, and because I don't know any better. At some point I moved all the declarations into a header file to make it easier to tweak things without as much hassle, but it's still being a huge hassle, it's becoming too much to cope with. I'm well over 2000 lines of code (on the map editor alone, including comments and garbage), and I'm finding it too confusing. An example of a side effect I found was that I was assigning values to the same variable from three different functions during the initialization. But I'm finding it hard to detect and fix stuff like this in all of this mess.


So I need to separate my code into more files, but I haven't learned anything about classes or even header files yet. I "know" what they are and what they're for, but I can't make them on my own yet. So what I need is a quick (and maybe dirty) way to just break up the code and make it bearable, because if I stop working on it I'll eventually lose motivation to keep learning. It doesn't matter if it's a cheap thing to do, the project isn't important, it's just a way to get my hands dirty and learn from mistakes. Like my father said once, analogously, your first car is for you to break.


So if anyone could give me some hints or thoughts on how to go about separating the code into more .cpp or .h files I'd really appreciate it. My biggest problem is with avoiding calling the same header file from several files, I think. But I also feel confused on things like, should I just create header files, should I just create cpp files, should I create both as needed, and how do I determine if they're needed, and how exactly do I make the code from one file interact with the code from the other...


Any help is greatly appreciated. Thanks.

In what ways can a text adventure have combat?

10 December 2013 - 11:38 AM

I've been planning a text adventure for a long time now, and combat is the part that's been giving me some trouble. I'm trying to avoid "dice rolls" in my game, which makes matters worse, and I don't know if I can actually avoid it.


To give you a better idea of what I'm trying to achieve, this is not your ordinary text adventure but rather a more... graphical one, with actual buttons and maps, inventory, item icons, etc, and I'm even considering having some sort of NPC graphics for encounters and dialogues. Otherwise every feedback the player gets is text as usual.


In essence, my goal with the combat system would be, ideally, to provide the player with a chance to be skillful at it. But... again, I'm a bit at a loss on how to do such a thing in this type of game. So for now I'm trying to figure out in what ways can a text based game have combat, so that I can take as much into consideration as I can, and hopefully come up with something. Or if someone has any great ideas I'd be happy with that too. :)


Any help or insights would be greatly appreciated.

Trying to find an old DOS game, but don't know its name...

04 October 2013 - 05:32 PM

I've tried this in the past to find other games and it worked, so I thought I may as well try again.


Unfortunately I remember very little of the game, so what I'm about to describe won't be much and may be wrong or distorted memories, but maybe someone knew the game and remembers it by reading this.


To start off, the game was either a sort of an Adventure Game like Myst (but with many characters and dialogues) or Point&Click like Kings Quest 7 (I'm more inclined to the latter), quite low resolution, and somewhat colorful, I think. Might be a game from somewhere between 1991-94.


Now if I remember correctly, the game was a fable and it reminded me of Robin Hood children's fable version (and I think the main character was a fox too). I have a vague picture memory of a place that was either at the very beginning or very close to the it, and there were lots of characters. I'm not sure but I think it was some kind of party, I think it involved the King (even if indirectly and not with his presence) or some royal figures or authorities. The characters were all kinds of animals, but I do think it involved pigs. smile.png And I think it was in a forest. This may be far off, but nowadays when I think of that vague memory, it reminds me of that moment in the children's version of Robin Hood where he is in a bow and arrows competition with lots of people, some of them from the royal family.


Googling it didn't do much since the word fable just bombards me with... you know... Fable (II), and the descriptions don't really do much... If anyone recognizes anything like this, please throw in a name if you know it. Even if it's not exactly what is described, it may still be it (or it may be another great game worth reminding smile.png)



Do I (really) need openGL?

20 September 2013 - 06:44 AM

I was following some tutorials on C++ with SDL and openGL, and as I was listening to the guy he mentioned what may be a key point for me: "openGL is an interface to your video card, so you can do 3D things".


So I was wondering, is this entirely true? Would I ever need openGL for 2D games?


I'm not planning on doing anything 3D and I guess I won't be for quite some time. So if this is true I may just skip openGL learning for now and focus on what I actually need.

How do I aquire Unreal Engine 3?

19 September 2009 - 03:57 PM

I came across this question while searching for engines to try out, and a friend of mine said I could buy a game that was made in it and it most likelly would bring some engine (modding) tools. Now, I would like to know any game that could bring it along. I have Bioshock and that one is out of the question since not only doesn't bring anything with it, but it even has no modding possibilities whatsoever. I'd also like to know if it«s possible to get the engine as a stand alone sdk, rather than in a set of modding tools. Thx in advance.