new game (need loop fix)
Moderators: Mug UK, Silver Surfer, Moderator Team
new game (need loop fix)
so, this is the commented Demo for Chaos in L.A
2 problems:
1: i need a way to allow multiple choice through the IF-THEN statements
2: i need a way to STOP the choice and allow another if necessary. my goal is to allow multiple choices, but loop back to start upon death (the Hobbit for example)
e.g (go to house. you have found a gun, use gun on tank etc...)
but all i have is the IF statement and the if f is < > or = statements.
please help
2 problems:
1: i need a way to allow multiple choice through the IF-THEN statements
2: i need a way to STOP the choice and allow another if necessary. my goal is to allow multiple choices, but loop back to start upon death (the Hobbit for example)
e.g (go to house. you have found a gun, use gun on tank etc...)
but all i have is the IF statement and the if f is < > or = statements.
please help
Atari: King
Sega: Queen
Nintendo: squeaky clean
Phillips CDI: Agony beam
Sega: Queen
Nintendo: squeaky clean
Phillips CDI: Agony beam

Re: new game (need loop fix)
this is the Demo
sorry if it's not in CAS form, this site can only allow 4 MB images
sorry if it's not in CAS form, this site can only allow 4 MB images
Atari: King
Sega: Queen
Nintendo: squeaky clean
Phillips CDI: Agony beam
Sega: Queen
Nintendo: squeaky clean
Phillips CDI: Agony beam

Re: new game (need loop fix)
I'd recommend using a state machine for a game
You should have three sub states for each state, init, logic, and exit.
You then call a reentrant function repeatedly and change states when required. The game runs as a tick until the state changes.
You should have three sub states for each state, init, logic, and exit.
You then call a reentrant function repeatedly and change states when required. The game runs as a tick until the state changes.
Re: new game (need loop fix)
um...in english?
Atari: King
Sega: Queen
Nintendo: squeaky clean
Phillips CDI: Agony beam
Sega: Queen
Nintendo: squeaky clean
Phillips CDI: Agony beam

Re: new game (need loop fix)
Google for state machine and game 

Re: new game (need loop fix)
i did. no use
Atari: King
Sega: Queen
Nintendo: squeaky clean
Phillips CDI: Agony beam
Sega: Queen
Nintendo: squeaky clean
Phillips CDI: Agony beam

Re: new game (need loop fix)
MrPixel,
Might help if we could see some code example of what you have that is not working.
You might not be that far along, though. It's OK if you're not.
Might help if we could see some code example of what you have that is not working.
You might not be that far along, though. It's OK if you're not.
Russ Ruark Jr.
Re: new game (need loop fix)
i had deleted it. sorry. i could make an MSX version but the commands for lines and such aren't working. i keep getting an illegal function call for the PSET command
Atari: King
Sega: Queen
Nintendo: squeaky clean
Phillips CDI: Agony beam
Sega: Queen
Nintendo: squeaky clean
Phillips CDI: Agony beam

Re: new game (need loop fix)
i checked the site. that's for C
Atari: King
Sega: Queen
Nintendo: squeaky clean
Phillips CDI: Agony beam
Sega: Queen
Nintendo: squeaky clean
Phillips CDI: Agony beam

Re: new game (need loop fix)
well.... i guess it kind of answers your question in your other thread.MrPixel wrote:i checked the site. that's for C
My Stuff: FB/Falcon CT63 CTPCI ATI RTL8139 USB 512MB 30GB HDD CF HxC_SD/ TT030 68882 4+32MB 520MB Nova/ 520STFM 4MB Tos206 SCSI
Shared SCSI Bus:ScsiLink ethernet, 9GB HDD,SD-reader @ http://phsw.atari.org
My Atari stuff for sale - click here for list
Shared SCSI Bus:ScsiLink ethernet, 9GB HDD,SD-reader @ http://phsw.atari.org
My Atari stuff for sale - click here for list
Re: new game (need loop fix)
The language shouldn't matter. Just focus on the concepts. Writing a game without a state machine will result in a spaghetti mess. I can tell you that from experience 

Re: new game (need loop fix)
let me rephrase: how do i make a state machine in BASIC? preferably for MSX?
Atari: King
Sega: Queen
Nintendo: squeaky clean
Phillips CDI: Agony beam
Sega: Queen
Nintendo: squeaky clean
Phillips CDI: Agony beam

Re: new game (need loop fix)
C is the language infants use to make games.wongck wrote:well.... i guess it kind of answers your question in your other thread.MrPixel wrote:i checked the site. that's for C
are you an infant?
Atari: King
Sega: Queen
Nintendo: squeaky clean
Phillips CDI: Agony beam
Sega: Queen
Nintendo: squeaky clean
Phillips CDI: Agony beam

Re: new game (need loop fix)
I'm sure it's possible. If not perhaps switch to another languageMrPixel wrote:let me rephrase: how do i make a state machine in BASIC? preferably for MSX?

-
- Disk Imager Supreme
- Posts: 2709
- Joined: Mon Aug 11, 2003 11:53 pm
- Location: just outside bristol
- Contact:
Re: new game (need loop fix)
MrPixel wrote:let me rephrase: how do i make a state machine in BASIC? preferably for MSX?
have you considered posting on an MSX forum ?
-
- Disk Imager Supreme
- Posts: 2709
- Joined: Mon Aug 11, 2003 11:53 pm
- Location: just outside bristol
- Contact:
Re: new game (need loop fix)
MrPixel wrote:C is the language infants use to make games.wongck wrote:well.... i guess it kind of answers your question in your other thread.MrPixel wrote:i checked the site. that's for C
are you an infant?
because with posts like this, people on here probably aren't going to help you.
Re: new game (need loop fix)
Come to think of it, I never wrote any games in C.
The only game I wrote but was not finished was for the Apple ][, while waiting for my Uni results.
It uses High-rez mode for drawing with text on the bottom few lines for user interfacing/status text.
Moves your planes & ships using an array of 8 keys to denote the compass directions plus some other key for action.
Complete until the part of trying to figure out how the battle would be like when you find the enemy.
Since it was the early days, was done in Applesoft Basic with some assembler for sound/graphics.
The only game I wrote but was not finished was for the Apple ][, while waiting for my Uni results.
It uses High-rez mode for drawing with text on the bottom few lines for user interfacing/status text.
Moves your planes & ships using an array of 8 keys to denote the compass directions plus some other key for action.
Complete until the part of trying to figure out how the battle would be like when you find the enemy.
Since it was the early days, was done in Applesoft Basic with some assembler for sound/graphics.
My Stuff: FB/Falcon CT63 CTPCI ATI RTL8139 USB 512MB 30GB HDD CF HxC_SD/ TT030 68882 4+32MB 520MB Nova/ 520STFM 4MB Tos206 SCSI
Shared SCSI Bus:ScsiLink ethernet, 9GB HDD,SD-reader @ http://phsw.atari.org
My Atari stuff for sale - click here for list
Shared SCSI Bus:ScsiLink ethernet, 9GB HDD,SD-reader @ http://phsw.atari.org
My Atari stuff for sale - click here for list
Re: new game (need loop fix)
I've written games in J2ME, 6502 assembler and C. I used a state machine for each. I had to make a fairly complex game front end navigable backwards and forwards on the GBA. It got unwieldy and I replaced it with a state machine. Much easier.
Re: new game (need loop fix)
sorry for the post, i wasn't thinking straight. anyway, how would i implement a state machine in MSX basic? what commands would i need?
Atari: King
Sega: Queen
Nintendo: squeaky clean
Phillips CDI: Agony beam
Sega: Queen
Nintendo: squeaky clean
Phillips CDI: Agony beam

Re: new game (need loop fix)
I don't know basic. You'd need a function which returns a value and a calling routine above it with a switch statement or a load of ifs.MrPixel wrote:sorry for the post, i wasn't thinking straight. anyway, how would i implement a state machine in MSX basic? what commands would i need?
You'd need a global which holds the current state. Depending on the value returned it would call the relevant function. A value of say -1 would mean continue calling the current function over again. The callee can switch states by returning different values. You might want to add sub states for init and finalize. This is an example in basic http://www.protonbasic.co.uk/content.ph ... e-Machines
- FedePede04
- Atari God
- Posts: 1215
- Joined: Fri Feb 04, 2011 12:14 am
- Location: Denmark
- Contact:
Re: new game (need loop fix)
i used to code a lot in basic on the msx, did several games on it, but don't remember any of it :'(
but try look here, this seem like a good place to find information about the MSX
https://www.msx.org/
don't know if it is something like this you are looking for
https://www.msx.org/wiki/ON...GOTO
https://www.msx.org/wiki/ON...GOSUB
but try look here, this seem like a good place to find information about the MSX
https://www.msx.org/
don't know if it is something like this you are looking for
https://www.msx.org/wiki/ON...GOTO
https://www.msx.org/wiki/ON...GOSUB
Atari will rule the world, long after man has disappeared
sometime my English is a little weird, Google translate is my best friend
sometime my English is a little weird, Google translate is my best friend

Re: new game (need loop fix)
i understand how it works but i need an equivalent in Basic. otherwise, it's useless. as we have an atari 800 at school, i'll need to teach this eventually
Atari: King
Sega: Queen
Nintendo: squeaky clean
Phillips CDI: Agony beam
Sega: Queen
Nintendo: squeaky clean
Phillips CDI: Agony beam

Re: new game (need loop fix)
will C basic work?
Atari: King
Sega: Queen
Nintendo: squeaky clean
Phillips CDI: Agony beam
Sega: Queen
Nintendo: squeaky clean
Phillips CDI: Agony beam
