intfiction.org

The Interactive Fiction Community Forum
It is currently Wed Nov 22, 2017 3:27 pm

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: [I7] Coding a forklift
PostPosted: Sat Sep 09, 2017 11:42 pm 
Offline
User avatar

Joined: Tue Jan 26, 2016 12:37 am
Posts: 30
I want to implement a forklift in my game. The vehicle part has been no problem and I've defined it as laden or unladen to provide a check to stop it being used to pick something up when already in use.

Code:
The forklift can be heavily laden, laden or unladen.
The forklift is unladen.


(The three different load types also allow me to tailor some of the text, e.g. you either zip around the place or slowly trundle from X to Y.)

I'm having trouble working out how to define the actually "lifting" mechanism. I'm also concerned that if I define "raise" as equivalent to "take", it will interfere with a "raise" action I'm using elsewhere in the game.

I want the player to be able to move a heavy object into place to block a door. It would be fun to allow the player to move other things around too but I think the simplest course would be to describe the heavy object as being on a pallet, and then tell the player that nothing else can be lifted because it isn't palletised.

Any suggestions are welcome.


Last edited by The One-Armed Badger on Sun Sep 10, 2017 12:15 am, edited 2 times in total.

Top
 Profile Send private message  
Reply with quote  
PostPosted: Sat Sep 09, 2017 11:58 pm 
Offline

Joined: Fri Oct 18, 2013 10:13 am
Posts: 2469
Location: The Midwest
Code:
A thing can be heavy or light. A thing is usually light. Instead of taking a heavy thing: say "It's far too heavy for you to lift unaided."
The arms are part of the forklift. The arms are a supporter. Definition: the forklift is laden rather than unladen if something is on the arms.
Instead of taking a heavy thing when the player is in the unladen forklift: say "You lift [the noun] with the forklift."; now the noun is on the arms.

_________________
Daniel Stelzer


Top
 Profile Send private message  
Reply with quote  
PostPosted: Sun Sep 10, 2017 12:04 am 
Offline
User avatar

Joined: Tue Jan 26, 2016 12:37 am
Posts: 30
Wow, thanks Draconis.


Top
 Profile Send private message  
Reply with quote  
PostPosted: Sun Sep 10, 2017 8:45 pm 
Offline

Joined: Tue Nov 08, 2011 8:11 am
Posts: 2231
Location: US - Central
I'd definitely try to use TAKE as your verb, but only allow the taking of "heavy" items when the player is in the forklift. That would probably be the most intuitive control scheme. I believe the synonyms like LIFT/CARRY resolve to TAKE. If the player exits the forklift, move heavy items from their inventory to a supporter on the vehicle that represents the fork. That way, it's really easy to imagine commands like PUT THE CRATE ON THE PLATFORM. You might just need to adjust scope with a "Rule for reaching outside the forklift when taking: if the noun is heavy: allow access; if the second noun is the platform: allow access."

Don't worry about verbs involving raising and lowering the fork...just imagine it like the wearable loader bot Ripley used in ALIENS. Describe taking an item in the fork to describe the fork doing what it does. The fewer moving parts, the less troubleshooting hassle later.

_________________
http://hanonondricek.wixsite.com/pyramidif
https://pyramidif.itch.io


Top
 Profile Send private message  
Reply with quote  
PostPosted: Tue Sep 12, 2017 7:12 am 
Offline
User avatar

Joined: Tue Jan 26, 2016 12:37 am
Posts: 30
The power loader is closer to the truth. I was trying to code a futuristic fork lift with a tractor beam, hence the need to raise and lower things.


Top
 Profile Send private message  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: Bing [Bot] and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group