Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => TI Z80 => Topic started by: XVicarious on July 02, 2011, 12:02:00 am

Title: Rott RPG Engine
Post by: XVicarious on July 02, 2011, 12:02:00 am
As some of you may know, I have been working on an RPG engine in Axe, which will be completely open sourced.  It is ASCII based. I started this engine because 1) I always wanted to do a text-based RPG, and 2) Inspired by DJ_O's Illusiat 6 (and above).

The Rott RPG Engine has the following features planned (suggest more!):
-- Loading of "chapters" from appvars, chapters include maps and strings. And other stuff that I haven't exactly thought of
-- Loading of resources from the external appvar appvROTTDATA. appvROTTDATA includes resources that are constant throughout all of the chapters, such as text sprites, leveling, enemies, and items
-- Menu screen, including items, stats, possibly a map showing your area (just a lit up pixel on a grid).
-- Normal RPG stuff, MAYBE magic. If I have time before the end of summer magic is a must!
-- Levels, but not levels.  You gain EXP but you don't have a level number. You simply get skill points which you put towards skills (Attack, Defence, Quickness, Health Points, and Mana Points). You start off with 2 attack, 1 defence, and the minimum Quickness (actually I think I called it Swiftness in my notes) of 5. No enemy will have below a 5 Quickness just so battles don't take forever.

Stats For Engine
Spoiler For Spoiler:
Attack
Defense
Swiftness
Health Points
Mana Points

Items Planned for Engine
Spoiler For Spoiler:
Consumable Items
Spoiler For Spoiler:
Minor Health Potion
Health Potion
Major Health Potion
Minor Mana Potion
Mana Potion
Major Mana Potion
Scroll of Last Chances
Skill Book
Fruit
Equip-able Items
Spoiler For Spoiler:
Short Sword
Great Sword
King's Sword (or Sword of Kings?)
Leather Armour
Iron Armour
Steel Armour
Wooden Bow
Great Bow
Yew Bow
Magic Staff
Accursed Staff
Staff of Zed (or Zed's Staff?)
Spike Ring
Freeze Ring
Lite Ring

Mockup of Battle Screen
Spoiler For Spoiler:
Code: [Select]
****************
*HP          HP*
*  g        1  *
*              *
****************
*  ATK    ITM  *
*  MAG    RUN  *
****************

Current Bestiary
Spoiler For Spoiler:
Code: [Select]
G  --  Goblin
g  --   Little Goblin
i  --  Imp
R  --  Rouge
S  --  Veteran Soldier
s  --  Novice Soldier

Current Files in RoTTRPG Engine:
Spoiler For Spoiler:
ROTTDMO:
Spoiler For Spoiler:
The main file for the program, the one you compile.  Contains some drawing routines for the player and menu cursors.
ROTTDATA:
Spoiler For Spoiler:
Temporary program to store data for the engine in, will be replaced by an appvar in the future.
ROTTROUT:
Spoiler For Spoiler:
Routines for the game. They are as follows (in no particular order, and not a complete list as of now calculator is acting up):
Code: [Select]
DwMap()  --  draws the map
DwHud()  --  draws the hud
DtCol()  --  collision detection
DwDat()  --  draws the hud data
CMP()  --  clears the map area, the 10x8 area on the left.  Will be renamed to ClrMP().
SlMnu()  --  (I think I got the name right) the selection for the menu
SlSav()  --  need to rewrite, got cleared and it was quite a bitch to write.  Selects the items in the "SAV" part of the menu.
DwMnu()  --  draws the menu
DwInf()  --  draws the "IFO" page of the menu
DwSav()  --  draws the "SAV" part of the menu
ROTTROUX
Spoiler For Spoiler:
Contains yet more routines for the engine, they are as follows:
Code: [Select]
DwBtl()  --  draws the battle screen
SlBtl()  --  selects the menu items on the battle screen

This is programmed with Axe Parser and I started coding on the calc, then moved to tiDE, and now am using TokenIDE, while tiDE solves some issues, because it doesn't even convert the Axe to a source *.8xp yet. But whatever. I hope to do this on my own, so no team. I will probably be asking for help with somethings, and it might take awhile due to my lack of concentration and the attention span of a dog...

(http://xvicario.us/images/rott_rpg_engine.gif)

Please tell me what you think! Code here: http://xvicario.us/git/rott-rpg.git
Code: [Select]
git clone http://xvicario.us/git/rott-rpg.git
It says other open source license, but I may change it. I kinda wrote one of my own. I might just add an SVN repo to my website for simplicity, and kill the project on Google Code. Nothing too impressive right now.

Suggesting are always welcome! I might not add something right away or at all, but after I finish the initial engine and finish the game I am making this for, I probably will be adding most of the suggestions to the engine!
Title: Re: Rott RPG Engine
Post by: DJ Omnimaga on July 02, 2011, 12:08:57 am
That would be awesome and make developement easier. :)

Will it also support sprite maps in the future too or just ASCII?
Title: Re: Rott RPG Engine
Post by: XVicarious on July 02, 2011, 12:10:18 am
I'm thinking just ASCII, but really the tilemapper and movement engine would really be the only things that need to be tweaked to make it compatible with normal sprites, since all the text is, is letter and symbol shaped sprites.
Title: Re: Rott RPG Engine
Post by: XVicarious on July 03, 2011, 06:37:46 pm
First post edited,
source uploaded to Google Code for time being.
Title: Re: Rott RPG Engine
Post by: XVicarious on July 09, 2011, 11:11:28 pm
Rott RPG Engine updated. Tilemapper working. Thank you A TON Runer112! Moving forward!
Changes to the repository, no .txt files, only no extension text files, and added in the tokenized 8xp files as well.

edit: quick note, the sprites right now are NOT in an appvar just for testing purposes right now, when I get farther into the engine, with room switching and things, the info will be in an appv!
Title: Re: Rott RPG Engine
Post by: XVicarious on September 08, 2011, 05:39:23 pm
Wow. Its been quite a while since I posted here.

Since then, I have added a menu and the HUD has some information in it (its a little "off" at the moment, just shifted 6 pixels).

I have moved to a git repository on my website, and the link to git (hehe) it is in the first post.
Title: Re: Rott RPG Engine
Post by: shmibs on September 08, 2011, 06:27:19 pm
cool! do you have any screenies for us yet?
Title: Re: Rott RPG Engine
Post by: leafy on September 08, 2011, 06:33:42 pm
Excellent work! I demand screenies >:)
Title: Re: Rott RPG Engine
Post by: XVicarious on September 08, 2011, 06:55:59 pm
Yeah, sure just give me maybe 5 mins and your request will be granted.

edit: request granted! :D
Title: Re: Rott RPG Engine
Post by: XVicarious on September 12, 2011, 08:01:41 pm
First post updated with a good amount of information.  I haven't been able to work on the actual engine for a couple of days but I have been thinking up other things (like items).

You get a:
weapons slot
armour slot
ring slot
Title: Re: Rott RPG Engine
Post by: XVicarious on September 13, 2011, 07:38:59 pm
Committed new update. Started new routines subprogram (ROTTROUX) in supplementation to (ROTTROUT).

It so far contains the functions:
Code: [Select]
DwBtl()  --  Draws the battle screen.
BtlSl()  --  Menu selection for battle screen.

So far the battle screen doesn't do anything, or show up for that matter.  Hopefully I'll get to work on it more tomorrow.
Title: Re: Rott RPG Engine
Post by: XVicarious on October 26, 2011, 02:57:31 pm
New update! The change has not been committed yet because it is still on my calculator (And I have work in an hour).
It features a completely reworked menu (hell, the original menu wasn't even in the recent builds on the repo).  Its like 99% done, all written today :D. I just need to fix the keys from firing too fast.
I'll submit this tomorrow or Friday after I 1) get it onto the computer, and 2) actually merge it with the engine (right now its a separate program, the engine has no menu right now)

edit: To give an idea of what the initial startup screen looks like I made an OTF screenshot with Homer:
(http://clrhome.tk/resources/homer/?t=%0D%0A+++**Ro%C3%84RPG**%0D%0A++++*Engine*%0D%0A%0D%0A+++++%3EPlay%3C%0D%0A++++++Help%0D%0A++++++Quit)
Title: Re: Rott RPG Engine
Post by: hellninjas on October 26, 2011, 03:05:12 pm
A must play I must say!
Title: Re: Rott RPG Engine
Post by: parserp on October 26, 2011, 05:06:26 pm
Looks epic O.O
can't wait till it's done...
Title: Re: Rott RPG Engine
Post by: XVicarious on October 26, 2011, 08:09:50 pm
Yay! And even better its an engine, built to be super simple to make your own game with.  You don't need to change any of the code in the engine to build your own game! You just need to create your own appvars of "chapters" with my special format to make a game.
Title: Re: Rott RPG Engine
Post by: XVicarious on October 26, 2011, 11:12:34 pm
In case you are interested in the new menu code.  Optimizations welcome.  Except Runer112, because it has to be readable by humans.

Quote from: Axe
.MENU

1→I→M
"**Ro|pRPG**"→Str1
"*Engine*"→Str2

Fix 1:FixFix5

Repeat getKey(15)

If (M=1)
If getKey(1) and (I<3)
I+1→I
End
If getKey(4) and (I>1)
I-1→I
End
If getKey(54)
If (I=1)
1→I+1→M
End
If (I=3)
Goto Exit
End
End
End

If (M=2)
If getKey(1) and (I<6)
I+1→I
End
If getKey(4) and (I>1)
I-1→I
End
If getKey(54)
If (I=6)
1→I→M
End
End
End

.Start drawing the menu
ClrDraw

If (M=1)
Text(18,8,Str1)
Text(24,16,Str2)
Text(36,32,"Play")
Text(36,40,"Help")
Text(36,48,"Quit")
Text(30,(I+3)*8,">")
Text(60,(I+3)*8,"<")
End

If (M=2)
Text(36,8,"Sav1")
Text(36,16,"Sav2")
Text(36,24,"Sav3")
Text(36,32,"Copy")
Text(36,40,"Kill")
Text(36,48,"Back")
Text(30,I*8,">")
Text(60,I*8,"<")
End

End

Lbl Exit
Fix 0:Fix 4
ClrHome:ClrDraw

Generated by the BBify'r (http://clrhome.tk/resources/bbify/ (http://clrhome.tk/resources/bbify/))
Title: Re: Rott RPG Engine
Post by: parserp on October 26, 2011, 11:16:21 pm
Except Runer112, because it has to be readable by humans.
lol readable by humans :)
Title: Re: Rott RPG Engine
Post by: XVicarious on October 30, 2011, 05:13:57 pm
Noone? :(
Well I have started the process of merging the menu and stuff... So expect more monday!
Title: Re: Rott RPG Engine
Post by: chattahippie on October 30, 2011, 05:57:45 pm
Noone? :(
Well I have started the process of merging the menu and stuff... So expect more monday!
Instead of I+1->I, use I++
And where you have, say, Text(36,8,"Sav1"), use Text(36,-28,"Sav1"), where - is subtract, not the negative sign.
For things like If (M=2), use !If M-2
Small optimizations, but they add up :)
Title: Re: Rott RPG Engine
Post by: XVicarious on October 30, 2011, 06:09:07 pm
Wow! Thanks!
Could you give another example on the Text( thing and the !If M-2 will that work with !If M-1 and M-3 etc?
Title: Re: Rott RPG Engine
Post by: chattahippie on October 30, 2011, 07:48:34 pm
Wow! Thanks!
Could you give another example on the Text( thing and the !If M-2 will that work with !If M-1 and M-3 etc?

Yes, the !If M-(#) works for just about anything.
For the Text() optimization, it works like this
The first argument is stored in the "Ans variable of Axe" (36, for example), then you can manipulate it for the second argument (36-28=8).

These optimizations were found here: http://ourl.ca/8520
I'm sure they can explain it better than I can, and there are plenty of other ways to exploit the "Ans" variable :P
Good luck
Title: Re: Rott RPG Engine
Post by: annoyingcalc on October 30, 2011, 07:52:37 pm
an RPG engine cool!
Title: Re: Rott RPG Engine
Post by: XVicarious on November 26, 2011, 03:11:14 pm
Just so you know guys, this isn't dead... I'm just busy with work and stuff.
Title: Re: Rott RPG Engine
Post by: XVicarious on January 04, 2012, 12:15:53 pm
Good news.  Today I started the shop system.  This should also take care of the inventory system and money system as well.

The menu is being integrated to the engine right now so this I expect to be implemented within the next few weeks!

Oh and if you have ideas on how to display the items please help. I right now have them all in one string... Not a great way to do it...
Title: Re: Rott RPG Engine
Post by: Eiyeron on February 19, 2012, 04:21:12 am
You could use the new function stdDev, if you store your strings separated by [00] char
Code: [Select]
"Hello"[00]->Str1
"Worlds"[00]

Text(0,0,stdDev(Str1,0))
Text(0,7,stdDev(Str1,1))

Feel free to test, i'm on iPod, I can't do a screenshot.
Anyone for an iPhone TI emulator?
Title: Re: Rott RPG Engine
Post by: DJ Omnimaga on February 19, 2012, 04:32:09 am
Wow I totally forgot about that. I've been out of the loop for a while on some projects a few months ago. Glad this is still alive. :)

And there are no iPhone TI emulator yet. It will never happen in the appstore since it's against their rules, but I wouldn't be surprised if one day it was made for jailbreaked devices.
Title: Re: Rott RPG Engine
Post by: turiqwalrus on February 20, 2012, 08:35:23 am
cool that this is still going :D
I can see this turning out really well...
Title: Re: Rott RPG Engine
Post by: XVicarious on March 07, 2012, 08:23:04 pm
Sadly it has made no progress lately.  My TI-84+SE has three rows of dead pixels (barable) and refuses to connect to the computer to transfer files, and my Nspire's 84 emulator crashes and resets when I try to edit the programs.
Until I can get a new TI-84+SE, I can no longer continue this project.  I'd love to see someone maybe pick this project up either temporarily or permanently, because it would be nice.  If someone does, just email me (my email should be in my profile) and ill find the newest source I have (Idk, it may be sort of corrupted which might be why it crashes my nspire) and send it to you.  IT would still have to be open sourced though because of why I started this project in the first place (to make making an RPG more accessible to people who aren't great at programming, but still make it difficult enough so too many shit games get released :P).
Title: Re: Rott RPG Engine
Post by: XVicarious on July 22, 2012, 11:51:34 pm
Wow.  It has been a LONG time since I posted here.  I actually got a renewed interest in this project and I started rewriting it from the ground up, KINDA.  I am using some code from the old version, but the tile mapper and movement engine will be completely overhauled using Output and the HOME screen instead of the pseudo ASCII Text Game it was before.
I hope to have a demo release of it out by Saturday, July 28th.  It will be compiled using Axe Fusion because it is only a demo release so you will need Axe installed.  The source will be included since it is an open sourced engine.
I hope you guys are still interested in this engine...  I hope to get more active in the community again, but it has been hard with work and well... Sleep.
Title: Re: Rott RPG Engine
Post by: hellninjas on September 16, 2012, 10:49:37 pm
I'm still quite interested, and excited to see you still interested a bit as well. This project can definently be quite fun when it's finished. And from what i've read about making own chapters and such. If it gets finished, anyone playing the game could post they're own quests. I'm sure this will be great :D
( Unless it's already dead? ): )
Title: Re: Rott RPG Engine
Post by: XVicarious on September 16, 2012, 11:55:23 pm
Nope still going slowly.
And this is just the engine for the game.  Your own chapters are made into your very own game.  I have a game or two (one you guys will LOVE I am sure of it) planned for the engine when it is done.
Title: Re: Rott RPG Engine
Post by: hellninjas on September 16, 2012, 11:56:56 pm
Can't wait for it :)
Title: Re: Rott RPG Engine
Post by: Sorunome on September 16, 2012, 11:57:52 pm
Cool, make sure to remember me to try it out in the case i forget :P