Author Topic: Unamed text-based RPG in VS2010 C++  (Read 12573 times)

0 Members and 1 Guest are viewing this topic.

Offline piexil

  • LV2 Member (Next: 40)
  • **
  • Posts: 36
  • Rating: +2/-0
  • Guys, we have a weenie hut jr. over here
    • View Profile
Unamed text-based RPG in VS2010 C++
« on: May 21, 2012, 10:49:43 pm »
Hey guys, a while back over april break. To kill time, I started working on a text based RPG engine,
I feel like turning it into a full-blown text based RPG.
The engine/system still needs some work
Suggestions would be excellent!

V: A.55

http://pastebin.com/8pe9HDZc

Readme:
http://pastebin.com/zcREcwjY
« Last Edit: May 22, 2012, 08:05:08 pm by piexil »
<a href="http://www.nerdtests.com/ft_nt2.php">
<img src="http://www.nerdtests.com/images/badge/nt2/d9b48a7b7395142b.png" alt="NerdTests.com says I'm a Highly Dorky Nerd King.  Click here to take the Nerd Test, get geeky images and jokes, and talk to others on the nerd forum!">
</a>

Offline Juju

  • Incredibly sexy mare
  • Coder Of Tomorrow
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 5730
  • Rating: +500/-19
  • Weird programmer
    • View Profile
    • juju2143's shed
Re: Unamed text-based RPG in VS2010 C++
« Reply #1 on: May 22, 2012, 12:11:20 am »
We can have a help file? That would be helpful.

Other than that, it's pretty nice :P Oh wait *gasp* you're using tons of gotos. (Not that I hate gotos but they are considered bad practice in C++.)

Remember the day the walrus started to fly...

I finally cleared my sig after 4 years you're happy now?
THEGAME
This signature is ridiculously large you've been warned.

The cute mare that used to be in my avatar is Yuki Kagayaki, you can follow her on Facebook and Tumblr.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Unamed text-based RPG in VS2010 C++
« Reply #2 on: May 22, 2012, 02:54:40 am »
Interesting. Is it in the same style as old MUD-like RPGs in command prompt?

Offline Juju

  • Incredibly sexy mare
  • Coder Of Tomorrow
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 5730
  • Rating: +500/-19
  • Weird programmer
    • View Profile
    • juju2143's shed
Re: Unamed text-based RPG in VS2010 C++
« Reply #3 on: May 22, 2012, 03:02:52 am »
I think it's kinda like Zork, Colossal Cave Adventures or the like.

Anyway I got it to compile with GCC :D (Remove line 1 (as it's pretty useless) and modify the _tmain line so it reads "int main(int argc, char** argv)")
« Last Edit: May 22, 2012, 03:06:24 am by Juju »

Remember the day the walrus started to fly...

I finally cleared my sig after 4 years you're happy now?
THEGAME
This signature is ridiculously large you've been warned.

The cute mare that used to be in my avatar is Yuki Kagayaki, you can follow her on Facebook and Tumblr.

Offline piexil

  • LV2 Member (Next: 40)
  • **
  • Posts: 36
  • Rating: +2/-0
  • Guys, we have a weenie hut jr. over here
    • View Profile
Re: Unamed text-based RPG in VS2010 C++
« Reply #4 on: May 22, 2012, 06:30:25 am »
We can have a help file? That would be helpful.
 Oh wait *gasp* you're using tons of gotos. (Not that I hate gotos but they are considered bad practice in C++.)
As for the help file, I did write one up a little while ago. I can put it on pastebin

I'm a beginner at C++ so gotos are all I know how to do some things

Although, when I added in dungeons (There's one in there), it just modified the movement phase by changing placement of items and settings limits to how you can move

\
Anyway I got it to compile with GCC :D (Remove line 1 (as it's pretty useless) and modify the _tmain line so it reads "int main(int argc, char** argv)")

That's great, I heard you can set it up so you can compile C++ for the Nspire instead of C, I wonder if this would compile for it :$
<a href="http://www.nerdtests.com/ft_nt2.php">
<img src="http://www.nerdtests.com/images/badge/nt2/d9b48a7b7395142b.png" alt="NerdTests.com says I'm a Highly Dorky Nerd King.  Click here to take the Nerd Test, get geeky images and jokes, and talk to others on the nerd forum!">
</a>

Offline TIfanx1999

  • ಠ_ಠ ( ͡° ͜ʖ ͡°)
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 6173
  • Rating: +191/-9
    • View Profile
Re: Unamed text-based RPG in VS2010 C++
« Reply #5 on: May 22, 2012, 08:16:41 am »
I don't think you can do C++ on the nSpire yet. I think maybe one person was fooling around with trying to get it to work, but afaik there is no C++ compiler available for nSpire yet.
« Last Edit: May 22, 2012, 08:33:35 am by Art_of_camelot »

Offline flyingfisch

  • I'm 1337 now!
  • Members
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1620
  • Rating: +94/-17
  • Testing, testing, 1...2...3...4...5...6...7...8..9
    • View Profile
    • Top Page Website Design
Re: Unamed text-based RPG in VS2010 C++
« Reply #6 on: May 22, 2012, 09:13:41 am »
You can do C++ on prizm...



Quote from: my dad
"welcome to the world of computers, where everything seems to be based on random number generators"



The Game V. 2.0

Offline piexil

  • LV2 Member (Next: 40)
  • **
  • Posts: 36
  • Rating: +2/-0
  • Guys, we have a weenie hut jr. over here
    • View Profile
Re: Unamed text-based RPG in VS2010 C++
« Reply #7 on: May 22, 2012, 09:53:04 am »
I found this for C++ on nspire, no clue if it still works
http://blog.tangrs.id.au/?p=712
<a href="http://www.nerdtests.com/ft_nt2.php">
<img src="http://www.nerdtests.com/images/badge/nt2/d9b48a7b7395142b.png" alt="NerdTests.com says I'm a Highly Dorky Nerd King.  Click here to take the Nerd Test, get geeky images and jokes, and talk to others on the nerd forum!">
</a>

Offline alberthrocks

  • Moderator
  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 876
  • Rating: +103/-10
    • View Profile
Re: Unamed text-based RPG in VS2010 C++
« Reply #8 on: May 22, 2012, 11:01:48 am »
I found this for C++ on nspire, no clue if it still works
http://blog.tangrs.id.au/?p=712
That is the same guy that is writing the bFLT loader here. You can PM him (tangrs) and ask him about the status. So far, no code (bFLT or experimental C++ support) has been merged with the official ndless tree yet.
Withgusto Networks Founder and Administrator
Main Server Status: http://withg.org/status/
Backup Server Status: Not available
Backup 2/MC Server Status: http://mc.withg.org/status/


Proud member of ClrHome!

Miss my old signature? Here it is!
Spoiler For Signature:
Alternate "New" IRC post notification bot (Newy) down? Go here to reset it! http://withg.org/albert/cpuhero/

Withgusto Networks Founder and Administrator
Main Server Status: http://withg.org/status/
Backup Server Status: Not available
Backup 2/MC Server Status: http://mc.withg.org/status/

Activity remains limited due to busyness from school et al. Sorry! :( Feel free to PM, email, or if you know me well enough, FB me if you have a question/concern. :)

Don't expect me to be online 24/7 until summer. Contact me via FB if you feel it's urgent.


Proud member of ClrHome!

Spoiler For "My Projects! :D":
Projects:

Computer/Web/IRC Projects:
C______c: 0% done (Doing planning and trying to not forget it :P)
A_____m: 40% done (Need to develop a sophisticated process queue, and a pretty web GUI)
AtomBot v3.0: 0% done (Planning stage, may do a litmus test of developer wants in the future)
IdeaFrenzy: 0% done (Planning and trying to not forget it :P)
wxWabbitemu: 40% done (NEED MOAR FEATURES :P)

Calculator Projects:
M__ C_____ (an A____ _____ clone): 0% done (Need to figure out physics and Axe)
C2I: 0% done (planning, checking the demand for it, and dreaming :P)

Offline piexil

  • LV2 Member (Next: 40)
  • **
  • Posts: 36
  • Rating: +2/-0
  • Guys, we have a weenie hut jr. over here
    • View Profile
Re: Unamed text-based RPG in VS2010 C++
« Reply #9 on: May 22, 2012, 11:47:03 am »
I found this for C++ on nspire, no clue if it still works
http://blog.tangrs.id.au/?p=712
That is the same guy that is writing the bFLT loader here. You can PM him (tangrs) and ask him about the status. So far, no code (bFLT or experimental C++ support) has been merged with the official ndless tree yet.

Alright, I will if I ever decide to try to port it

So, now let's get back to the actual game :D

Alright, I added some more stuff (Including doubling space between text so it's not so much of an eyesore to look at)

But before I do that, I want a new way of damage calculation, which is:
((2* lvl  +2) * (atk / mondef) /50 ) + 2 * ((rand() % 100 + 50) ) /10;

Which means:
2 * Your level + 2 times your attack devided by the enemies defense divided by 50 plus 2 times a random number between 50 and 150 (I believe) divided by ten

Any better calculations anyone would know of?

Also, updated OP with latest update
« Last Edit: May 22, 2012, 08:08:55 pm by piexil »
<a href="http://www.nerdtests.com/ft_nt2.php">
<img src="http://www.nerdtests.com/images/badge/nt2/d9b48a7b7395142b.png" alt="NerdTests.com says I'm a Highly Dorky Nerd King.  Click here to take the Nerd Test, get geeky images and jokes, and talk to others on the nerd forum!">
</a>

Offline piexil

  • LV2 Member (Next: 40)
  • **
  • Posts: 36
  • Rating: +2/-0
  • Guys, we have a weenie hut jr. over here
    • View Profile
Re: Unamed text-based RPG in VS2010 C++
« Reply #10 on: May 25, 2012, 12:05:02 pm »
Updated the game:
http://pastebin.com/9WkUzHb6

Fixed the battlesystem and added saving of completed/uncompleted quests (This took me ~2 hours to add in :c)
<a href="http://www.nerdtests.com/ft_nt2.php">
<img src="http://www.nerdtests.com/images/badge/nt2/d9b48a7b7395142b.png" alt="NerdTests.com says I'm a Highly Dorky Nerd King.  Click here to take the Nerd Test, get geeky images and jokes, and talk to others on the nerd forum!">
</a>