Reply
Fender Bender
Registered: 05/19/2002
Offline
4307 posts
 

Re: Any C++ Progammers out there?

Dec 27, 2012

Viewtiful_Josh wrote:

njinear2b wrote:

I had a couple of courses in C++ but didn't really care all that much for it - my prof taught junk and I got bored fairly quickly.   What sort of game are you working on?


Same here. My teacher was boring as well, but I am learning it because I want to. Right now I'm reading ahead cuz I'm an inpatient person. Smiley Tongue

 

The game is a simple console application. I think that means that it just shows up in the command window and lines show up, haha. The theme of it is to see how long the player can go with each passing "enemy". You start with a sword and an axe, which you keep getting each turn, and you keep killing foes. The foes have types, so not always will a sword work on them, had to update it like that because my bro said it was too repetitive. It still is since it revolves around a while loop. You can also combine weapons to make new ones, also "buy" weapons or healing potions. I just added the ability for the player to be able to enchant the enemy. So for example you an curse him with a damage-over-time spell or whatnot. And right now I'm working on the "save game" part of the game. Before it was pretty fast, but now since there are more options the player can do, it will take a lot longer for the player to die and I imagine the user will at some point have to turn off his/her PC, so I'm working something out so that the player can save the game and return to it later by using files. (#include<fstream>).

 

So yeah, it's nothing amazing, but it's a project so I can practice coding and use what I am learning. I just find myself wondering some stuff and since i don't have a teacher anymore, then I would like to comment my thoughts with some other programmer. I might look for dedicated programming forums, but I just wanted to ask here since I'm a PlayStation fan.

 

Thanks for reading this whole thing, lol.

 


My prof kept giving out the silliest programs; while I supposed they'd be okay for the first project, after getting similar ones further in the semester, I could tell the course wasn't going to lead to much.  Sad part was he was the only one teaching the classes where I went. 

 

LOL; I'm impatient too.  There's nothing wrong in reading ahead.

 

That's sounds like a good learning game; have you thought about using sqlite instead of files? As your game gets more complex, it may be easier to alter tables.  

Message 11 of 15 (104 Views)
Reply
0 Likes
Fender Bender
Registered: 09/27/2009
Offline
2922 posts
 

Re: Any C++ Progammers out there?

Dec 28, 2012

njinear2b wrote:

Viewtiful_Josh wrote:

njinear2b wrote:

I had a couple of courses in C++ but didn't really care all that much for it - my prof taught junk and I got bored fairly quickly.   What sort of game are you working on?


Same here. My teacher was boring as well, but I am learning it because I want to. Right now I'm reading ahead cuz I'm an inpatient person. Smiley Tongue

 

The game is a simple console application. I think that means that it just shows up in the command window and lines show up, haha. The theme of it is to see how long the player can go with each passing "enemy". You start with a sword and an axe, which you keep getting each turn, and you keep killing foes. The foes have types, so not always will a sword work on them, had to update it like that because my bro said it was too repetitive. It still is since it revolves around a while loop. You can also combine weapons to make new ones, also "buy" weapons or healing potions. I just added the ability for the player to be able to enchant the enemy. So for example you an curse him with a damage-over-time spell or whatnot. And right now I'm working on the "save game" part of the game. Before it was pretty fast, but now since there are more options the player can do, it will take a lot longer for the player to die and I imagine the user will at some point have to turn off his/her PC, so I'm working something out so that the player can save the game and return to it later by using files. (#include<fstream>).

 

So yeah, it's nothing amazing, but it's a project so I can practice coding and use what I am learning. I just find myself wondering some stuff and since i don't have a teacher anymore, then I would like to comment my thoughts with some other programmer. I might look for dedicated programming forums, but I just wanted to ask here since I'm a PlayStation fan.

 

Thanks for reading this whole thing, lol.

 


My prof kept giving out the silliest programs; while I supposed they'd be okay for the first project, after getting similar ones further in the semester, I could tell the course wasn't going to lead to much.  Sad part was he was the only one teaching the classes where I went. 

 

LOL; I'm impatient too.  There's nothing wrong in reading ahead.

 

That's sounds like a good learning game; have you thought about using sqlite instead of files? As your game gets more complex, it may be easier to alter tables.  


sqlite? Hmm, nope, but I'll sure go research it. Yeah, my game is getting way more complex, I mean it is still a bunch of if's, else's, while's, cin, cout and whatnot. Right now I have about 900+ lines of code (some of them are just spaces or comments) and it's getting a bit crouded. Thankfully I have Visual Studio which is way better than BloodShed Dev-C++. One reason is that you can minimize functions. Smiley Happy

 

 

 

Metallica Pinball Sig photo LONG-LIVE-PLAY-METALLICA-PINBALL_zps397a82cb.jpg
Gameplay -> http://www.youtube.com/watch?v=Gzxc59Y6GcA
Message 12 of 15 (94 Views)
Reply
0 Likes
Fender Bender
Registered: 05/19/2002
Offline
4307 posts
 

Re: Any C++ Progammers out there?

Dec 28, 2012

Viewtiful_Josh wrote:

sqlite? Hmm, nope, but I'll sure go research it. Yeah, my game is getting way more complex, I mean it is still a bunch of if's, else's, while's, cin, cout and whatnot. Right now I have about 900+ lines of code (some of them are just spaces or comments) and it's getting a bit crouded. Thankfully I have Visual Studio which is way better than BloodShed Dev-C++. One reason is that you can minimize functions. Smiley Happy


 This brings back memories of an console rpg I was working on some time ago.  I didn't really know c++ well enough to do what I wanted, but I had a viewport and loaded a file representing the "world map" using ascii characters.

 

    typedef std::vector<std::vector<unsigned char> > maps;

    maps viewp(21, std::vector<unsigned char>(61, ' '),

               world(100, std::vector<unsigned char>(300, ' ');

 

something like that; sort of like an old NES game without the graphics.  as the player moved about, the viewp scrolled.  the world map stored the various locations for each area.  Later on, I moved the idea to php and js, which worked out better.  For a while, I actually had something that could be played.

 

900 lines is a lot of code to keep track of.  is it all in one source or have you split up the declarations from the functions and whatnot?

 

dev-c blows; it's a buggy TOOL of a program... I used that back around 2000 and hated every second of it.  Thankfully, M$ now gives away their compilers and with a bit of coaxing from sdks, they are almost as complete as the paid versions.

 

best of luck to you with the game.  Smiley Very Happy

Message 13 of 15 (82 Views)
Reply
0 Likes
Survivor
Registered: 07/20/2008
Offline
2787 posts
 

Re: Any C++ Progammers out there?

Dec 30, 2012

Currently learning as well.

 

C1

Message 14 of 15 (71 Views)
Reply
0 Likes
Fender Bender
Registered: 08/29/2005
Offline
4920 posts
 

Re: Any C++ Progammers out there?

Jan 6, 2013

Let's see. I am currently learning C++ as well, and am enjoying it. I am a decent Java programmer as well as having experience with PHP, Ruby and Python and some C#. It's a lot of fun. 

Message 15 of 15 (58 Views)
Reply
0 Likes