Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Work in Progress / Procedurally Generated RPG

Author
Message
Daniel TGC
Retired Moderator
15
Years of Service
User Offline
Joined: 19th Feb 2007
Location: TGC
Posted: 20th Jul 2011 01:09 Edited at: 26th Jul 2011 18:35
Hi guys, I've been coding a new Text based procedural RPG game. This will eventually go into a feature length tutorial. For now I'll spend time developing it as a game, as if I was going to try and sell this on the market.

The title - Vanishing Gold.

I'm calling this game Vanishing Gold for the time being, and I'm coming up with a 10 level story, to add on top of the procedurally generated content.

The goal

The goal of this project is to produce a working Text Adventure game featuring procedurally generated content, in addition to this scripted content will also be produced, as will a simple questing system (pre-scripted or scripted, I'm not sure yet).

The game will feature a persistent world, that can be saved at any time, as part of the World(0) array setup.

The area descriptions will be (and are currently) procedurally generated, each area has a possibility of an effect, that apply to the users health, stat's or weapons.

Story mode adds 10 extra zones, each of these zones will feature a guardian, and a staircase to the next level (or next world as stated in game). Upon activating these staircases you'll receive a new part of the main story line.

Game play style:

The game play style will be completely command based. To go north, you'll type in "go north" or just "n" for short. Same applies to west, east and south.

Final result

The final result of this project, is to use this program as a teaching tool for anyone planning to produce an RPG. While the engine is text based, it will also provide a starting point for turn based RPG games, and other styled procedural games. The code is coded with real time graphics in mind. Rather than using wait and sleep commands, instead I delay the code using loops and triggers, in these loops anything could be produced.

This is the 3rd update video. So you can see what the game is like for yourself. I'll post additional updates as progress continues.



You can download the latest code from http://blog.darkprinciples.co.uk

*** Alpha 0.22 Download ***

Updates:

Highlighted item text
Colour Introduction
Fade in and Fade out effect
Reworking of flag code
Main Menu

https://forumfiles.thegamecreators.com/download/2229970

*** Alpha 0.25 Download ***

https://forumfiles.thegamecreators.com/download/2233255

Bugfixes

truncated words appearing
beast's not appearing at staircases

Additions

* Two new stat's, Strength and Magic.
* Formatting function that identifies to program specific word or text colour by inserting symbol before each character. I.E. %T%H%I%S% %T%E%X%T will appear in the GOLD colour as THIS TEXT.
* Weapon requirements added, you can't just pick up any old weapon now you have to earn it.
* Hud layout altered
* Highlighted text for weapons, monsters and items. (should make scanning text easier)
* Six new commands, Fire Spell, Ice Spell, Earth Spell, Air Spell, Point to Strength, Point to Magic
* Land identification data affects spells
– Example, casting fire in enclosed spaces, wood, forest, cabin, sets fire to your surroundings and does both you and your foe damage, if your health is below 10 when you do this, you die. Fire spell in water place such as River, Snow mountains, Ice field, will only deal 25% to monster if over 4 points in health. If under it will deal instant death. Earth places such as flatlands and grasslands (anything with wide open spaces) will get you 75% damage to monsters over 4 points, and air places such as high mountains and hills will get you 33% damage.
* New locations added
* Respawned players get "A ginger root" as a weapon, (just for giggles)

Attachments

Login to view attachments
Rich Dersheimer
AGK Developer
13
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 20th Jul 2011 02:34
Excellent! This is just the kind of game I like to spend all my free time on.

Downloading now...

Daniel TGC
Retired Moderator
15
Years of Service
User Offline
Joined: 19th Feb 2007
Location: TGC
Posted: 20th Jul 2011 20:58
Thanks Rich, the codes moved on since the version you've downloaded.



I've added story elements to it now, and I'm reworking much of the logic because frankly someone of looks like it was written by a squirrel dancing in the keyboard once it's more organised I'll post updated code. Hopefully users will be able to understand it!
Duffer
19
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 21st Jul 2011 00:36
Very interesting, conceptually - particularly interested in how effective a proedurally generated, perhaps non linear?, storyline would be on a text rpg...

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...
Daniel TGC
Retired Moderator
15
Years of Service
User Offline
Joined: 19th Feb 2007
Location: TGC
Posted: 21st Jul 2011 03:37 Edited at: 21st Jul 2011 03:42
Dunno, but I'm going to find out. I'll likely use the Elite original method, trying to form a series of part sentences and words that can be assembled together to form different descriptions. There won't be any NPC's thinking for themselves or anything like that! But having scenes and events driven through random generation should produce some good, and very funny results. Elite developers Braben and Bell had to remove the procedurally generated name 'arse' for decency's sake. (well it was the 80's )

Anyway, here's a new version of the game. It's got a little opening music now, and a nicer intro. It also builds the world for you automatically other features and improvements include:

Save Game
Load Game
Much nicer ext wrapping
Updated content generation code, removing high levels weapons and conditions from lower levels. (still needs a little work)
Player experience has been added, and you can assign points to the hero's vitality
Experience is earned through combat, every time you strike you get 1 point experience, for every 10 experience you get a point you can assign to a player stat. At the moment vitality is the only stat, but this increases your total possible health something you will need for level 9, and when facing the gate keepers.
Also every time you "level up" the requirements for the next level up is increased by one, making earning points harder the longer you play.
I've added a setting's subroutine, so you can adjust the size of the world.
I've removed a lot of the screen width() and screen height() commands, and have replaced them with a single integer each.

Anyway, have a download, have a play.
Code is up on blog.darkprinciples.co.uk again.
The music file included is creative commons licensed.

Video will follow tomorrow or the day after.

Attachments

Login to view attachments
Grog Grueslayer
Valued Member
17
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 21st Jul 2011 09:58 Edited at: 21st Jul 2011 10:01
After a rough start dieing several times from picking up the first weapon I saw. I eventually managed to stay alive enough to kill a whole bunch of badguys till I died from drinking an unknown potion that took all 18 hit points I had.

I like it a lot but kept getting confused because the commands aren't standard. Usually in text adventure games the shortcuts for north, south, east, and west are just n, s, e, and w. One command that would be nice is the repeat the last line which is AGAIN and the shortcut for that is Z. AGAIN/Z would make those long battles of typing in ATTACK over and over again a lot easier.

ATTACK
Z
Z
Z
He's dead!

Also having to fight in almost every single room is a little tiring. Lowering the encounters a bit would give the user a little breathing room.

Daniel TGC
Retired Moderator
15
Years of Service
User Offline
Joined: 19th Feb 2007
Location: TGC
Posted: 21st Jul 2011 17:24 Edited at: 21st Jul 2011 17:26
Tip: You can save the game before drinking an unknown potion now. But because I'm pure evil, I'm thinking of adding "save tokens" that you have to collect before you can do this can't have users saving before they drink each time, it would spoil the risk! (and my practiced evil chuckle).

The world generation and save games are separate, so even if you reload the world will remain exactly the same. A bit weird, but it's for development reasons while I work on both of these separately.

Z for attack? That's just weird! You can use A instead. Eventually I'll add a control setup file where people can replace existing commands with their own weird letters. Perhaps someone can add bbe (bye bye enemy) for fun.

A update with those keys will be released later, right now my code proves that spaghetti definitely belongs in your code. I need to streamline things a bit before I continue adding commands and features.

One command I might add though, is POINTS TO ATTACK so if you pick up a Twisted Knife, you can get over the 0 attack point thing (well it's a twisted knife! You expect it to be good?) btw, if you use PICK UP in a room without a weapon you'll find another small stick, so if you're weapon is producing 0 you can revert back to it that way. Though for amusements sake I might add the command "FIND A STICK"

Good idea on the gn series of commands, I'll replace them with n, s, w, e. No point having gn, gs, gw, and ge. The previous command idea has been suggested to me before. I was going to setup the arrow keys to go NSWE but perhaps I'll just task the up key to repeat the previous command.

P.S. feel sorry for me, someone talked me into converting this into C++ after the DarkBASIC Professional version has been done...

Oh I'll also replace that whole "you die, the games over thing." with an automatic load from previous save game. Of course if you have not made any, it will do a world rebuild, and reset your position.
Daniel TGC
Retired Moderator
15
Years of Service
User Offline
Joined: 19th Feb 2007
Location: TGC
Posted: 22nd Jul 2011 07:02 Edited at: 22nd Jul 2011 14:44
Here's the new version. It includes a lot of bug fixes and some code optimisation. It also has far better text wrapping, vitality character stats, and place's with effects. In addition to this the descriptive text has been boosted. The errors where the text vanished have been fixed.

Overall it's the best version yet! And I'm still working on improvements.

*** I moved the video to the first post ***

Attachments

Login to view attachments
Darkzombies
12
Years of Service
User Offline
Joined: 25th Dec 2010
Location: In multiple tabs, most likely youtube.
Posted: 22nd Jul 2011 09:09
didnt dcforemanuk make this?
Daniel TGC
Retired Moderator
15
Years of Service
User Offline
Joined: 19th Feb 2007
Location: TGC
Posted: 22nd Jul 2011 13:19
Yes, that's me. I created that youtube channel long before I started handling The Game Creators customer service and technical support e-mails.
Daniel TGC
Retired Moderator
15
Years of Service
User Offline
Joined: 19th Feb 2007
Location: TGC
Posted: 22nd Jul 2011 17:41
Ok another new version, lots of bug fixes, and an easter egg for those of you that die

Update 5

* Guardians now appear next to stairs
* Reset code, resets to level 1 not 0
* Reset code resets ALL features
* Save game fix
* Guardians increase both attack power and health per level
* Area effects now fully implemented
* Settings.dba added so those who compile can adjust world size and other starting features
* Revamped Introduction code now introduces real time syncing (for later text effects) and new ascii art (because it was fun working out how to make it!)

I've added the project files and source code to this upload, now that they are in a respectable enough condition to upload.

Having said that it's still WIP and I need to do alot of rework until it's presentable as a tutorial.

Click the download button on this post or the link on the first post.

text 10, nl, " _ __ _ __ __ _ _ " : Inc nl, 15
text 10, nl, " | |/ / (_) | \/ | | | | |" : Inc nl, 15
text 10, nl, " | ' / _____ ___ _ __ | \ / | __ _ ___| | ___ ___ __| |" : Inc nl, 15
text 10, nl, " | < / _ \ \ / / | '_ \ | |\/| |/ _` |/ __| | / _ \/ _ \ / _` |" : Inc nl, 15
text 10, nl, " | . \ __/\ V /| | | | | | | | | (_| | (__| |____| __/ (_) | (_| |" : Inc nl, 15
text 10, nl, " |_|\_\___| \_/ |_|_| |_| |_| |_|\__,_|\___|______|\___|\___/ \__,_|" : Inc nl, 15
text 10, nl, " " : Inc nl, 15
text 10, nl, " " : Inc nl, 15
text 10, nl, "Kevin MacLeod" : Inc nl, 15
text 10, nl, "Copyright 2001 - 2011 Kevin MacLeod, released under Creative commons." : Inc nl, 15
text 10, nl, "http://incompetech.com/m/c/royalty-free/" : Inc nl, 15

Attachments

Login to view attachments
hclayton
12
Years of Service
User Offline
Joined: 13th Nov 2010
Location: US
Posted: 25th Jul 2011 08:48
I will be following this, as I am in the process of writing a text based game also. Thank you
Daniel TGC
Retired Moderator
15
Years of Service
User Offline
Joined: 19th Feb 2007
Location: TGC
Posted: 25th Jul 2011 15:25
Thanks, I just put up version 0.22 it features user interface upgrades such as formatted text. Items such as monsters, items and objects now appear in a differently coloured text. The introduction is now in colour, the menu has been created, and I'm working on story element code now. I've also placed variable place holders in the code to deal with other player stats. The latest compiled upload is on the first post if you want to have a look.
Nickydude
Retired Moderator
16
Years of Service
User Offline
Joined: 4th Nov 2006
Location: Look outside...
Posted: 26th Jul 2011 11:09
Looking forward to the tutorial Daniel. Found a couple of things;

I've noticed that when typing 'help', the list gets cut off at the right hand side:

"Build world, save world, load world, attack, go (direction), evade pick up dr"

Also the text wrapping seems to be slightly off:

"The corpse of a victim lays upon the ground a medium healthy restorativ
e clutched in their cold fingers."


I reject your reality and substitute my own...
Daniel TGC
Retired Moderator
15
Years of Service
User Offline
Joined: 19th Feb 2007
Location: TGC
Posted: 26th Jul 2011 17:38
Thanks, I've addressed latter problem in the new version.

Help is going to get an overhaul one day, as I know how to play it it's not a big priority for now users can type in Tutorial to get the gist of the basics.

Alpha 0.25 is now up, you can download it from this post.

Bugfixes

truncated words appearing
beast's not appearing at staircases

Additions

* Two new stat's, Strength and Magic.
* Formatting function that identifies to program specific word or text colour by inserting symbol before each character. I.E. %T%H%I%S% %T%E%X%T will appear in the GOLD colour as THIS TEXT.
* Weapon requirements added, you can't just pick up any old weapon now you have to earn it.
* Hud layout altered
* Highlighted text for weapons, monsters and items. (should make scanning text easier)
* Six new commands, Fire Spell, Ice Spell, Earth Spell, Air Spell, Point to Strength, Point to Magic
* Land identification data affects spells
– Example, casting fire in enclosed spaces, wood, forest, cabin, sets fire to your surroundings and does both you and your foe damage, if your health is below 10 when you do this, you die. Fire spell in water place such as River, Snow mountains, Ice field, will only deal 25% to monster if over 4 points in health. If under it will deal instant death. Earth places such as flatlands and grasslands (anything with wide open spaces) will get you 75% damage to monsters over 4 points, and air places such as high mountains and hills will get you 33% damage.
* New locations added
* Respawned players get "A ginger root" as a weapon, (just for giggles)

Known bugs

* When drinking potions each letter of the word has % before it
* Some item weapon or drink names have % before each letter
* When travelling to next world, the description will read oddly. Something like β€œThe world turns under your feet as you enter a with a loud thud you land on the earth.”
* Sometimes commands just don't work, you need to repeat them several times before they do. (intermittent problem)
* Ice, water, and air spells do nothing but still remove a magic point
* Doesn't announce to player that they have hit the edge of the world

Attachments

Login to view attachments
miso
12
Years of Service
User Offline
Joined: 16th Jun 2010
Location: Budapest, Hungary, 127.0.0.1
Posted: 26th Jul 2011 20:17
That's very nice, procedural content generation is the best

No place like 127.0.0.1 .
Nickydude
Retired Moderator
16
Years of Service
User Offline
Joined: 4th Nov 2006
Location: Look outside...
Posted: 26th Jul 2011 20:55
Cool

"music on / off" might be nice.

I reject your reality and substitute my own...
Daniel TGC
Retired Moderator
15
Years of Service
User Offline
Joined: 19th Feb 2007
Location: TGC
Posted: 27th Jul 2011 02:01
Music On/ Off? I don't think such code exists! Sorry it's way beyond my skill set.
Rich Dersheimer
AGK Developer
13
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 2nd Aug 2011 13:17 Edited at: 2nd Aug 2011 20:55
Never mind. I was posting about the game not accepting commands, but then I ran it as Administrator and it runs fine.

EDIT: When I compile the source code, I get an error about a constant can't have the same name as a reserved word TRUE, also with FALSE. I've seen this before in my programs, but I'm not sure if it's because I'm using a plugin, probably IanM's.

Nickydude
Retired Moderator
16
Years of Service
User Offline
Joined: 4th Nov 2006
Location: Look outside...
Posted: 10th Aug 2011 02:24
Just saw your 'Oblivion' menu, looks great! Can't wait for the tutorial. Will it be available in HD for those who want it?

I reject your reality and substitute my own...
Daniel TGC
Retired Moderator
15
Years of Service
User Offline
Joined: 19th Feb 2007
Location: TGC
Posted: 24th Aug 2011 04:57
It is already up and all my latest videos are HD now.
Manzarth
11
Years of Service
User Offline
Joined: 23rd Aug 2011
Location: TGC
Posted: 24th Aug 2011 07:17
This looks very nice. Keep up the good work.
CumQuaT
AGK Master
12
Years of Service
User Offline
Joined: 28th Apr 2010
Location: Tasmania, Australia
Posted: 24th Aug 2011 07:26 Edited at: 26th Aug 2011 03:02
This is incredible! Very well done! I'm also developing a procedural RPG (it's here in the WIP forum, called Malevolence: The Sword of Ahkranox)

Great to see like minded people on here!

Malevolence: The Sword of Ahkranox
www.msoa-game.com
www.facebook.com/malevolencegame
Nickydude
Retired Moderator
16
Years of Service
User Offline
Joined: 4th Nov 2006
Location: Look outside...
Posted: 25th Aug 2011 21:29
Quote: "It is already up and all my latest videos are HD now. "


Really? Can you provide the link as I can't seem to find the tutorial.

I reject your reality and substitute my own...
Nickydude
Retired Moderator
16
Years of Service
User Offline
Joined: 4th Nov 2006
Location: Look outside...
Posted: 6th Sep 2011 01:56
I take it this is now on the back burner?

I reject your reality and substitute my own...

Login to post a reply

Server time is: 2023-02-08 22:45:15
Your offset time is: 2023-02-08 22:45:15