The Daily Click ::. Forums ::. Klik Coding Help ::. Your opinions on customizable control setups for a game made with MMF1.5?
 

Post Reply  Post Oekaki 
 

Posted By Message

Del Duio

Born in a Bowling Alley

Registered
  29/07/2005
Points
  1078

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!Evil klikerHasslevania 2!The OutlawSanta Boot
11th December, 2007 at 11:12:56 -

Hi, I know there are probably places that list examples, but I wanted to get what you guys think is the best way to have a customizable player control setup for a game made with MMF1.5?

The only game I've ever made that had any sort of option like that was Necropolis Rising's Keyboard or Joystick option, and then that was very basic like "Set player control to Joystick 1" or whatever it was because the necro had a default 8 direction movement to him.

What I wanted to do with Hasslevania 2 is to have it so that the player can either use a gamepad or a keyboard, and if he uses a keyboard he can map the controls out however he wants at the beginning. I'm guessing an .ini file is pretty manditory for this, which is cool, but what would you have to do- load that same .ini file up at the start of each frame to see what keypress does what?

Sorry I don't know the best way myself, but the good news is that I am trying to make people's lives controlling the game easier later on.


 
--

"Del Duio has received 0 trophies. Click here to see them all."

"To be a true ninja you must first pick the most stealthy of our assorted combat suits. Might I suggest the bright neon orange?"

DXF Games, coming next: Hasslevania 2- This Space for Rent!

DaVince

This fool just HAD to have a custom rating

Registered
  04/09/2004
Points
  7998

Game of the Week WinnerClickzine StaffHas Donated, Thank You!Cardboard BoxDos Rules!
11th December, 2007 at 11:26:20 -

Use a custom controller object like Control X (is this even available for MMF2?), I'd say.

 
Old member (~2004-2007).

DeadmanDines

Best Article Writer

Registered
  27/04/2006
Points
  4758
11th December, 2007 at 11:44:26 -

My favourite system was halflife's. It had a table of all the keystrokes in-game, and you could click one, and it would flash, and you'd press a buton. That button would then be logged.

Using Control X is your best bet.

Additionally, Control X has names for all the keys, so you can customise the tutorials and text. For instance, suppose a character called Dave says:

"And you can double-jump off walls! Jump up to this wall with :JUMPKEY: and tap it again to push away from it!"

You can make a system which looks for text like :JUMPKEY: in the current paragraph of a string object and replaces it with the assigned key, such as 'SHIFT'. So the text would show up as:

"And you can double-jump off walls! Jump up to this wall with SHIFT and tap it again to push away from it!"


And yes, you're spot on with the INI. I used to do this:

[controls]
up = 31
down = 33
shoot = 69

that kinda thing, using the values from Control X (note: those above values aren't real, i typed any old thing).


Image Edited by the Author.

 
191 / 9999 * 7 + 191 * 7

Del Duio

Born in a Bowling Alley

Registered
  29/07/2005
Points
  1078

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!Evil klikerHasslevania 2!The OutlawSanta Boot
11th December, 2007 at 13:41:23 -

Well then, Control X it is!

That's cool about the whole :JUMPKEY: thing for texts, that would come in handy I'll bet.

Your number you made up for your .ini file look like ASC values Dines, like "ENTER"'s value is 13 and I think "A" is 65. It's been a long time so I could be off.

Thanks guys!

 
--

"Del Duio has received 0 trophies. Click here to see them all."

"To be a true ninja you must first pick the most stealthy of our assorted combat suits. Might I suggest the bright neon orange?"

DXF Games, coming next: Hasslevania 2- This Space for Rent!

Eternal Man [EE]

Pitied the FOO

Registered
  18/01/2007
Points
  2955

Game of the Week WinnerHero of TimeLOL SignI am an April Fool
11th December, 2007 at 17:25:45 -

Check out Fifth's article, it's the best.

http://www.create-games.com/article.asp?id=1677

 
Eternal Entertainment's Code'n'Art Man

E_E = All Indie


...actually Ell Endie, but whatever.
Image
Image

\/\/olf

Creative Genius

Registered
  06/08/2005
Points
  76

VIP Member
11th December, 2007 at 22:01:16 -

Definitely. The article is the best.

 
Image

www.OldMansTale.net
Sign the Petition! Go go Go!!

Eternal Man [EE]

Pitied the FOO

Registered
  18/01/2007
Points
  2955

Game of the Week WinnerHero of TimeLOL SignI am an April Fool
11th December, 2007 at 22:53:27 -

Theeeeeee b-e-s-t. Yup.

 
Eternal Entertainment's Code'n'Art Man

E_E = All Indie


...actually Ell Endie, but whatever.
Image
Image

ReiKGT



Registered
  09/08/2007
Points
  46
12th December, 2007 at 18:18:56 -

Dont most gamepads come with a button emulator? Like say you could set button 1 on the gamepad to type d on the screen. mine came with one.

 
"last one left to die, please turn out the light."
The human child body template used in my avatar was made by Show Kaizer who can be found on rmxp.org forums.

Del Duio

Born in a Bowling Alley

Registered
  29/07/2005
Points
  1078

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!Evil klikerHasslevania 2!The OutlawSanta Boot
12th December, 2007 at 23:00:25 -

I have both Control X and the Joypad Object.

I'll go check out Fifth's article, and tattoo it to my scrotum.
..Because it can fit a mighty BIG article, mateys!

Did I mention that being put on 3rd shift unexpectedly really sucks?

 
--

"Del Duio has received 0 trophies. Click here to see them all."

"To be a true ninja you must first pick the most stealthy of our assorted combat suits. Might I suggest the bright neon orange?"

DXF Games, coming next: Hasslevania 2- This Space for Rent!

DaVince

This fool just HAD to have a custom rating

Registered
  04/09/2004
Points
  7998

Game of the Week WinnerClickzine StaffHas Donated, Thank You!Cardboard BoxDos Rules!
14th December, 2007 at 04:54:31 -


Originally Posted by ReiKGT
Dont most gamepads come with a button emulator?


Nope. You must have a good gamepad or something for it to come with such an application.

 
Old member (~2004-2007).

\/\/olf

Creative Genius

Registered
  06/08/2005
Points
  76

VIP Member
19th December, 2007 at 01:29:41 -

oh, here:

http://www.electracode.com/4/joy2key/JoyToKey%20English%20Version.htm


 
Image

www.OldMansTale.net
Sign the Petition! Go go Go!!

Knudde (Shab)

Administrator
Crazy?

Registered
  31/01/2003
Points
  5125

Has Donated, Thank You!Clickzine StaffKlikCast StarVIP MemberGhostbuster!Dos Rules!I donated an open source project
19th December, 2007 at 20:07:22 -

\/\/olf just posted one of the best pieces of software ever.

 
Craps, I'm an old man!
   

Post Reply



 



Advertisement

Worth A Click