source code examples for RPGs

specific examples of player stats like attack and defense; functions u

Page 1 of 1

10 Replies - 49641 Views - Last Post: 20 August 2009 - 11:35 AM Rate Topic: -----

#1 torenlynch  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 27-September 07

source code examples for RPGs

Post icon  Posted 08 October 2007 - 05:20 PM

Sorry I dont have any code now ...not at my computer. I was wondering though, have started to learn C++ and want to develop an RPG similar to Lufia or FF4 with the 2d overhead perspective. I wanted to know if there are any sites that have examples of RPg source code for like player stats, the battle sequence, magic, experience, increasing stats, etc. i am guessing it takes abunch of defined variables and functions along with random number generators and variable modifiers. However, I wanted to be sure that this is what am going to be seeing.

Is This A Good Question/Topic? 0
  • +

Replies To: source code examples for RPGs

#2 Martyr2  Icon User is online

  • Programming Theoretician
  • member icon

Reputation: 4359
  • View blog
  • Posts: 12,178
  • Joined: 18-April 07

Re: source code examples for RPGs

Posted 08 October 2007 - 06:32 PM

Well you are definitely right about the random number generators and variables. After all attack percentages are probabilities at the very heart. The chance you hit someone in battle is never 100% certain unless they are not moving... or dead! hehe

But I do want to give you an piece of advice. If you are brand new to C++ or even a novice, the math and C++ wizardry behind any type of game, especially RPG, is going to be quite cryptic and foreign. The good games will be very complicated. You may see a function for attack hit probability and may not understand half of it. So take it slowly.

As for source code you can look at, go to a site like sourceforge.net which has a ton of RPG's in development with open access to their source (open source project site after all). You could try looking at something that would be a bit more simplistic and more straight forward like a console RPG game. This could give you the idea of what is in store for you. Below is a link to one such game on sourceforge called... what else... console RPG.

Console RPG at sourceforge (written in C++)

Hope this helps! Look around for more projects there. Do a search for RPG to find hundreds more.

Enjoy! :)
Was This Post Helpful? 0
  • +
  • -

#3 TylerMoyer  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 27
  • Joined: 09-October 07

Re: source code examples for RPGs

Posted 10 October 2007 - 08:04 PM

Any made for C#? I looked on there for C#, but didn't find any.
Was This Post Helpful? 0
  • +
  • -

#4 WolfCoder  Icon User is offline

  • Isn't a volcano just an angry hill?
  • member icon


Reputation: 786
  • View blog
  • Posts: 7,618
  • Joined: 05-May 05

Re: source code examples for RPGs

Posted 01 November 2007 - 10:27 PM

View PostTylerMoyer, on 10 Oct, 2007 - 08:04 PM, said:

Any made for C#? I looked on there for C#, but didn't find any.

That's because for video games you should use C++.

And for RPGs in particular, C++ is a must. I keep seeing how C++ is so low level yet bends to my design nicely with my hybrid object and flat code.

This post has been edited by WolfCoder: 01 November 2007 - 10:28 PM

Was This Post Helpful? 0
  • +
  • -

#5 gene  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 26-February 08

Re: source code examples for RPGs

Posted 26 February 2008 - 08:57 PM

thank you for the advice [size=6][color=#FFCC33]:D
:^:
Was This Post Helpful? 0
  • +
  • -

#6 Ferrin  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 23
  • Joined: 18-August 09

Re: source code examples for RPGs

Posted 19 August 2009 - 11:52 AM

View PostMartyr2, on 8 Oct, 2007 - 05:32 PM, said:

Well you are definitely right about the random number generators and variables. After all attack percentages are probabilities at the very heart. The chance you hit someone in battle is never 100% certain unless they are not moving... or dead! hehe

But I do want to give you an piece of advice. If you are brand new to C++ or even a novice, the math and C++ wizardry behind any type of game, especially RPG, is going to be quite cryptic and foreign. The good games will be very complicated. You may see a function for attack hit probability and may not understand half of it. So take it slowly.

As for source code you can look at, go to a site like sourceforge.net which has a ton of RPG's in development with open access to their source (open source project site after all). You could try looking at something that would be a bit more simplistic and more straight forward like a console RPG game. This could give you the idea of what is in store for you. Below is a link to one such game on sourceforge called... what else... console RPG.

Console RPG at sourceforge (written in C++)

Hope this helps! Look around for more projects there. Do a search for RPG to find hundreds more.

Enjoy! :)

hey, i tried that source. downloaded it and opened it in code::blocks, but it isn't showing the code at all. just "ELF"
it seems useful-- how does one open it to see the code?
Was This Post Helpful? 0
  • +
  • -

#7 YamNad  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 9
  • View blog
  • Posts: 120
  • Joined: 11-July 09

Re: source code examples for RPGs

Posted 19 August 2009 - 12:01 PM

Just googled "C++ Text Based RPG" and found this.

It's got a 14 part video tutorial with the source code and executable for a C++ text-based RPG.

A nice place to start.

Quote

i've tried to download that from sooo many sites. a lot of the videos were gone or corrupt (they've been around since 2002).

but i'll try that one.


It's fine...

This post has been edited by YamNad: 19 August 2009 - 03:49 PM

Was This Post Helpful? 1

#8 Ferrin  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 23
  • Joined: 18-August 09

Re: source code examples for RPGs

Posted 19 August 2009 - 12:06 PM

View PostYamNad, on 19 Aug, 2009 - 11:01 AM, said:

Just googled "C++ Text Based RPG" and found this.

It's got a 14 part video tutorial with the source code and executable for a C++ text-based RPG.

A nice place to start.

i've tried to download that from sooo many sites. a lot of the videos were gone or corrupt (they've been around since 2002).

but i'll try that one.
Was This Post Helpful? 0
  • +
  • -

#9 NeoTifa  Icon User is offline

  • Whorediot
  • member icon





Reputation: 2728
  • View blog
  • Posts: 15,806
  • Joined: 24-September 08

Re: source code examples for RPGs

Posted 19 August 2009 - 12:44 PM

View PostWolfCoder, on 1 Nov, 2007 - 09:27 PM, said:

View PostTylerMoyer, on 10 Oct, 2007 - 08:04 PM, said:

Any made for C#? I looked on there for C#, but didn't find any.

That's because for video games you should use C++.

And for RPGs in particular, C++ is a must. I keep seeing how C++ is so low level yet bends to my design nicely with my hybrid object and flat code.



Crimson Cadre's being done in C#... :(
Was This Post Helpful? 0
  • +
  • -

#10 Tom9729  Icon User is offline

  • Segmentation fault
  • member icon

Reputation: 180
  • View blog
  • Posts: 2,641
  • Joined: 30-December 07

Re: source code examples for RPGs

Posted 20 August 2009 - 11:19 AM

View PostWolfCoder, on 2 Nov, 2007 - 12:27 AM, said:

That's because for video games you should use C++.

And for RPGs in particular, C++ is a must. I keep seeing how C++ is so low level yet bends to my design nicely with my hybrid object and flat code.

Ahahahah I'm sorry, I almost fell out of my chair after reading this.
Was This Post Helpful? 0
  • +
  • -

#11 Theaegd  Icon User is offline

  • Hater & Lover

Reputation: -125
  • View blog
  • Posts: 944
  • Joined: 15-August 09

Re: source code examples for RPGs

Posted 20 August 2009 - 11:35 AM

c++ is discusting i rather code using bcpl or bliss.
Was This Post Helpful? -1
  • +
  • -

Page 1 of 1