Author Topic: NSpire Text Based Game Engine  (Read 9833 times)

0 Members and 1 Guest are viewing this topic.

Offline willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
NSpire Text Based Game Engine
« on: April 26, 2010, 12:24:47 pm »
I'm working on a text-based game creator for the nspire. If you've ever played Voodoo castle, Zork, or Thy Dungeonman (Try it on homestarrunner.com) you know what these are.

It will be written in BASIC, using mainly the RequestSTR command. I plan on making a wizard that will make games for you as well. One problem I've encountered is retrieving data from matrices. How do you do it on the nspire?

I hope I get some feedback on this.

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: NSpire Text Based Game Engine
« Reply #1 on: April 26, 2010, 12:41:25 pm »
mhmm interesting, will it also be a bit like MUDs and games like Medieva?

To spice it up I wonder about the Nspire graphics capabilities. It might be nice to add some images to go with the text sometimes since a lot of people aren't really fan of calc text-based games (since in the past, ticalc got flooded with them, making graphical games a chore to find). I would like to see what you'll come up with, though.

Offline bwang

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 634
  • Rating: +30/-11
    • View Profile
Re: NSpire Text Based Game Engine
« Reply #2 on: April 26, 2010, 08:34:42 pm »
I believe matName[row, col] accesses matrix elements.

Offline willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
Re: NSpire Text Based Game Engine
« Reply #3 on: April 26, 2010, 10:33:26 pm »
I hope that's right. Matrices make data storage so much cleaner, having only one save variable instead of 10.

Unfortunately, pictures aren't very available at the moment due to TI's Lack of picture support. It could have fancy title screens hand drawn in the geometry menu, but unless I'm missing something big there's no way to store it.

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: NSpire Text Based Game Engine
« Reply #4 on: April 26, 2010, 10:54:27 pm »
From what i hear about the nSpire, there is very little you can do in the ways of I/O I dont have one though so I cant say x.x Is it true that you cannot store to variables or something?  I thought i heard that somewhere?

Offline tensuke

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 16
  • Rating: +0/-0
  • Crab Nicholson
    • View Profile
Re: NSpire Text Based Game Engine
« Reply #5 on: April 26, 2010, 11:37:48 pm »
No! You can store to variables, with any name you like(well, almost any name I guess). It's pretty good on that front. True, there's not really any real I/O to speak of(actually, I think something was added in 2.0? Because I'm on 1.1 so I dunno...)
And I was working on a text-adventure game which is now inaccessible in 1.1, but once Ndless runs on 1.7/2.x I'll finish it asap!

Offline willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
Re: NSpire Text Based Game Engine
« Reply #6 on: April 27, 2010, 11:23:49 am »
think the 86 for vars, minus the 8 character limit.

The only I/O commands at all, besides program(a,b) a and b being input are request(string,var) and requeststr(string,var) which bring up text boxes. fortunately for me, that is exactly what a text-based game uses. the request commands weren't added until 2.0, though. I had 1.7 until I upgraded and it wasn't there before.

BTW secants, cosecants and cotangents work on the nspire, unlike most other calcs.

Title screens would probably be the only graphics, unless someone writes something like axe. I would definitely switch almost immediately.

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: NSpire Text Based Game Engine
« Reply #7 on: April 27, 2010, 11:54:50 am »
Didn't they add Input commands on the newer OS?

Offline willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
Re: NSpire Text Based Game Engine
« Reply #8 on: April 27, 2010, 12:10:58 pm »
request actually acts exactly like Input. InputStr=RequestStr, just that request comes up in a text box, with OK and cancel at the bottom.

Perhaps ASM hooks could make button-style menus like the System settings screens!

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: NSpire Text Based Game Engine
« Reply #9 on: April 27, 2010, 12:26:18 pm »
Oh right, I remember now. It's a bit like the 68k input command. I disliked it because if you're making a text-based MUD-type RPG it breaks the design x.x

I prefer the command prompt type Input command on the 73 through 86
« Last Edit: April 27, 2010, 12:26:51 pm by DJ Omnimaga »

Offline willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
Re: NSpire Text Based Game Engine
« Reply #10 on: April 28, 2010, 09:05:04 am »
yeah, that's how it works, but personally I like the fact that it sticks out, rather than just appearing next to everything else. It's really annoying not to have menu or getky though.

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: NSpire Text Based Game Engine
« Reply #11 on: April 28, 2010, 10:18:46 am »
well the issue is that it ruins the design of text-only games IMHO. Imagine, you're reading a text, then a Input pop up appears in front of it, asking you if you want to go east, west, down, up. Not very professional-looking by text-games standards. Such games requires that input is done like in Command prompt, under what's displayed, no fancy GUIs appearing.

Illusiat 81 screenshot as example, attached below:

Offline willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
Re: NSpire Text Based Game Engine
« Reply #12 on: April 28, 2010, 09:10:43 pm »
Well, there's no way you can make the "real" games. as long as you use the Text command instead of disp, its got the same effect as using Pause "text here"

By the way, a nice feature I'm implementing. You can customize the directional and action commands.
it looks like this
Engine()
lbl top
Input stuff
if input=Move then
Move()
if acts>=1 then
if input=Act1
Ac1()
else
*this returns a "you can't do that" style error and returns you to the input
text errormsg *you can customize it to be witty, confused, bored. great for dialogue.
goto top
*and that repeats to the maximum command #
*note that in the move command all strings, number of actions, all that stuff will be changed, as defined by a room number on a coordinate grid. for instance, rooms[1,1] refers to the left, top most room. note that the flow scheme for rooms will not have to be laid out as such. any room can access any other.

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: NSpire Text Based Game Engine
« Reply #13 on: April 28, 2010, 10:08:01 pm »
aaaah I see, interesting

Offline willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
Re: NSpire Text Based Game Engine
« Reply #14 on: April 29, 2010, 11:47:10 am »
Yeah, so this will be able to do about anything except live action. With a little work, a battle engine could be implemented, but for now I'll just finish the engine.