Author Topic: Keyboard Control for sidescrolling game  (Read 137 times)

Indra Anagram

  • Chronic overthinker
Keyboard Control for sidescrolling game
« on: 18 Jun 2019, 15:26 »
Hi guys and girls,

Maybe someone has dealt with the same problem recently. I wonder if there is opportunity to make the game controlled with keyboard keys instead of a mouse. I found some old posts here on the forums about modules for that purpose, but maybe there is an in-built script in AGS? If not, what is the best keyboard control module or plugin that works with AGS 3.4.3? 

As I already wrote in the previous post, my biggest inspiration is The Cat Lady. The character is controlled with keyboard there, so is the interface. Only side movement, left and right. As protagonist encounters hot spots a menu opens with the "UP" key. You can move through this menu options with "UP" and "DOWN" keys and choose an option with "ENTER". The inventory shows up after you press "DOWN". "LEFT" and "RIGHT" arrows are also for looking over the inventory items and "ENTER" - for the item choice. To save or quit one presses "ESC".

Is there any guide for assigning keys?

Thank you!
Did the old man and woman abuse Gingerbread Man?

VampireWombat

  • Not a chupacabra
    • I can help with animation
    • I can help with backgrounds
    • I can help with characters
    • I can help with play testing
Re: Keyboard Control for sidescrolling game
« Reply #1 on: 18 Jun 2019, 15:54 »
Have you learned enough about AGS for this to be a concern for you yet?
Technically you can program movement yourself, but a module would be better.
I suggest this module.

As for the other stuff, give me a day or two and I'll give you a sample game.

Cassiebsg

  • Cavefish
  • Fleeing the Cylon tyrrany...
    • Cassiebsg worked on one or more games that won an AGS Award!
    •  
    • Cassiebsg worked on one or more games that was nominated for an AGS Award!
Re: Keyboard Control for sidescrolling game
« Reply #2 on: 18 Jun 2019, 16:01 »
For keyboard movement I normally just use the template that comes with the Sierra template, and adjust whatever other keys I need/want in Global Script.
Or you can just use Khris's module.  (nod)
There are those who believe that life here began out there...

VampireWombat

  • Not a chupacabra
    • I can help with animation
    • I can help with backgrounds
    • I can help with characters
    • I can help with play testing
Re: Keyboard Control for sidescrolling game
« Reply #3 on: 18 Jun 2019, 18:45 »
The most useful info I've found so far about making an inventory similar to what you want is here.

Indra Anagram

  • Chronic overthinker
Re: Keyboard Control for sidescrolling game
« Reply #4 on: 18 Jun 2019, 21:17 »
To VampireWombat:

Have you learned enough about AGS for this to be a concern for you yet?

Yes, I understand my question looks like I run ahead of my current level of knowledge and skill in AGS. However, while following tutorials and learning the engine I can't help searching for ways to realize what's been on my mind. Even if such solution is advanced. Again, I didn't find information on keyboard control in the manual. But I thought maybe there was either in-built piece of code or some module for that purpose.

I suggest this module.

I knew it. It seemed unlikely that no one has tried to crack the keyboard control thing, especially since I know there are such games made with AGS.

As for the other stuff, give me a day or two and I'll give you a sample game.

Thank you, sugar! This would be marvelous. I'll have to thoroughly study the code anyway, though.

The most useful info I've found so far about making an inventory similar to what you want is here.

I wonder if it is possible to combine Kris' module and this one. Smells like experiment  ;-D

To Cassiebsg:

For keyboard movement I normally just use the template that comes with the Sierra template, and adjust whatever other keys I need/want in Global Script.

Sorry, do you mean there IS key assignment code incorporated in Sierra template? Or do you normally program that yourself?

Thank you for sharing experience, amigo!
Did the old man and woman abuse Gingerbread Man?

Cassiebsg

  • Cavefish
  • Fleeing the Cylon tyrrany...
    • Cassiebsg worked on one or more games that won an AGS Award!
    •  
    • Cassiebsg worked on one or more games that was nominated for an AGS Award!
Re: Keyboard Control for sidescrolling game
« Reply #5 on: 18 Jun 2019, 21:24 »
If you are using the sierra template, it comes with a keyboard module by default (at least the old template did, I'm assuming the new one does too). Sierra games had keyboard control.  ;)
There are those who believe that life here began out there...

Indra Anagram

  • Chronic overthinker
Re: Keyboard Control for sidescrolling game
« Reply #6 on: 18 Jun 2019, 22:35 »
If you are using the sierra template, it comes with a keyboard module by default (at least the old template did, I'm assuming the new one does too). Sierra games had keyboard control.  ;)

Cassiebsg, could you please provide a link to some manual article or tutorial on how to activate this default module and assign keys? If there is the in-built keyboard control for switch from the mouse control, there must have been some guides on that.

Thank you for your reply!
Did the old man and woman abuse Gingerbread Man?

Cassiebsg

  • Cavefish
  • Fleeing the Cylon tyrrany...
    • Cassiebsg worked on one or more games that won an AGS Award!
    •  
    • Cassiebsg worked on one or more games that was nominated for an AGS Award!
Re: Keyboard Control for sidescrolling game
« Reply #7 on: 18 Jun 2019, 22:54 »
uhm?
Open the editor, start a new game using the sierra template, then the script should be right there along global script. You can export it from there and then import it into your game.

Or just use Khris's module, since he wrote it to replace this one, I would guess it's probably better.
There are those who believe that life here began out there...

Indra Anagram

  • Chronic overthinker
Re: Keyboard Control for sidescrolling game
« Reply #8 on: 18 Jun 2019, 23:30 »
uhm?
Open the editor, start a new game using the sierra template, then the script should be right there along global script. You can export it from there and then import it into your game.

Or just use Khris's module, since he wrote it to replace this one, I would guess it's probably better.

Big Thanks for detailed instructions, sunshine!
Did the old man and woman abuse Gingerbread Man?