Omnimaga

General Discussion => Technology and Development => Computer Projects and Ideas => Topic started by: piexil on May 21, 2012, 10:49:43 pm

Title: Unamed text-based RPG in VS2010 C++
Post by: piexil 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
Title: Re: Unamed text-based RPG in VS2010 C++
Post by: Juju 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++.)
Title: Re: Unamed text-based RPG in VS2010 C++
Post by: DJ Omnimaga on May 22, 2012, 02:54:40 am
Interesting. Is it in the same style as old MUD-like RPGs in command prompt?
Title: Re: Unamed text-based RPG in VS2010 C++
Post by: Juju 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)")
Title: Re: Unamed text-based RPG in VS2010 C++
Post by: piexil 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 :$
Title: Re: Unamed text-based RPG in VS2010 C++
Post by: TIfanx1999 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.
Title: Re: Unamed text-based RPG in VS2010 C++
Post by: flyingfisch on May 22, 2012, 09:13:41 am
You can do C++ on prizm...
Title: Re: Unamed text-based RPG in VS2010 C++
Post by: piexil 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
Title: Re: Unamed text-based RPG in VS2010 C++
Post by: alberthrocks 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.
Title: Re: Unamed text-based RPG in VS2010 C++
Post by: piexil 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
Title: Re: Unamed text-based RPG in VS2010 C++
Post by: piexil 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)