Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Crystal Quest
#31
Yeah. Actually, Toonsk, I was thinking of something slightly less complicated, to avoid making PJ have to spend a full day on just parsing the script.
More like what I said...if he needs it more complicated, okay, here:
Quote:USES EvilScientist, GoodHero, PrincessToRescue
WALK EvilScientist SOUTH 7
RUN PrincessToRescue SOUTH
DELAY 3
RUN GoodHero EAST 10
SPEAK GoodHero: Leave her alone!
SPEAK EvilScientist: Never!
SPEAK PrincessToRescue: Ahhh! Help me!
FIGHT GoodHero GUN
SHOOT GoodHero @ EvilScientist
WAIT 3
SPEAK EvilScientist: Arrrrrgh!!!
WAIT 2
SPEAK PrincessToRescue: Thank you, GoodHero!
f only life let you press CTRL-Z.
--------------------------------------
Freebasic is like QB, except it doesn't suck.
Reply
#32
You're all wrong, wrong, WRONG!

toonski: making a script interpreter is the number one way of getting yourself into a corner!

na_th_an: why should you run out of code mem? I don't think that's the case.

Zack: that's a good idea for a start, but then he will quite possibly want to make it more complicated until it is actually BASIC code. And he's writing the interpreter or compiler for it.
Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit www.neobasic.net to see rubbish in all its finest.
Reply
#33
Maybe I am wrong, but scripts are used to make comprobations, make NPCs move and talk, carry the inventory items, code the cutscenes... If you include all this in your BAS files you'll end with a bloated, big, huge amount of code that won't be compilable.

... Until I come out with my new tutorial Wink (thanks to Jonathan Simpson), so stay tuned Wink
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#34
Why would it be bloated?

Uncompilable?

?????
Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit www.neobasic.net to see rubbish in all its finest.
Reply
#35
Aga, RPG cutscenes are the 2d equivalent of cinematic sequences. You're talking about doing those on top of the limits of QB. In a good 20-hour RPG, this is going to be a huge amount of code. And since when has modularizing and creating open-ended code been an undesirable thing?

Zack: That's exactly what I was thinking of, if you can make that work for cutscenes, great. My only suggestion there was to compile it into a bytecode for easier interpretation:

WALK EvilScientist SOUTH 7
RUN PrincessToRescue SOUTH "4"
DELAY 3
RUN GoodHero EAST 10
SPEAK GoodHero: Leave her alone!

->

Code:
W*S*                      <- "*" = ascii for "EvilScientist" ID and "7"
R*S*                      <- "*" = ascii for "PrincessToRescue" ID and "4"
D*                        <- "*" = ascii for "3"
R*E*                      <- "*" = ascii for "GoodHero" ID & "10"
S*Leave Her her alone!    <- "*" = ascii for "GoodHero" ID & "10"

(just ignore the stuff after "<-")

But you really do need a way for events to happen, a way to create and receive objects and a way to do simple math with stats.

GoodHero DROP HEALTH 5

or for instance, in the "Objects" file:

NAME: Elixor
CLASS: Item
PRICE: 40
GoodHero GAIN HEALTH 30

etc... Scripting ain't easy Smile
i]"I know what you're thinking. Did he fire six shots or only five? Well, to tell you the truth, in all this excitement, I've kinda lost track myself. But being as this is a .44 Magnum ... you've got to ask yourself one question: 'Do I feel lucky?' Well, do ya punk?"[/i] - Dirty Harry
Reply
#36
This is the first time I've seen this thread, so sorry for barging in a little late Big Grin

For an excellent platform/RPG, take a look at Cadash by Taito. It was an arcade game at first, then Taito wrote a PC Engine port which Working Designs picked up a US license for and brought it to the US for the TurboGrafx 16. There is also a less spectacular port for the Sega Genesis. (I have all the versions of all the ports as well as the original arcade builds). They're often called "Action RPGs". Popful Mail is another one (Sega CD and TurboGrafx 16 again). Reaching way back into the day, I believe there was one based on AD&D rules called "Curse Of The Azure Bonds" or something similar to that on the C64 and (I beileve) the PC. In addition, people familiar with the TurboGrafx 16 console might think of Exile and Exile: Wicked Phenomenon as similar Action RPGs (although they used traditional RPG-like overhead scrolling between action scenes).

As far as scripting goes...scripting your game requires a little more work to start with, but the extra work is well worth the effort. By writing a good scripting engine and setting up general routines, you can greatly reduce the amount of code and data used by your game, allowing you to make enhancements you wouldn't otherwise have the space for. If I had hardcoded all of WOS' scripts, the EXE would probably be about 6MB in size (I'm basing this figure on data storage) and needless to say...it'd never even compile, let alone run. Just as we tend to put graphics outside the EXE, so should you put scripting outside the EXE. Your program should always be as small and efficient as possible, and anytime you can move something out of the EXE, do it. You'll thank yourself later, trust me. Big Grin
I'd knock on wood, but my desk is particle board.
Reply
#37
And adding variable names, labels, IF...THEN...ELSE statements, and arrays of course is just a walk in the park to add to a scripting game, and it's just soooooo much easier and sooooo much faster than COMPILING IT, especially when you can link up the exes (especially in windows) ?

Toonski, why would hard coded stuff be more code than scripting? Even in your example, the special tags can be converted to code and then compiled.

........
Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit www.neobasic.net to see rubbish in all its finest.
Reply
#38
Aga: You certainly try to think differently. :*)

Yeah, scripting as Joe said would make your life easier in the long run. :*)
y smiley is 24 bit.
[Image: anya2.jpg]

Genso's Junkyard:
http://rel.betterwebber.com/
Reply
#39
Agamemnus, facts:

Old RPG I made, 200 KB Exe file, 3 levels. Each level with around 1000 lines of IFs to check everything.

Better made RPG with scripting engine: Barely 60 KB Exe file, as many levels as you want as they are in separate script files.

What's better?
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#40
You're still not understanding me.

Sure, scripts themselves are fine, but they have to be converted to code and then compiled for better efficiency.....

Argh...
Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit www.neobasic.net to see rubbish in all its finest.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)