Author Topic: Keyboard/Joystick...etc.  (Read 5058 times)

iii

  • Visitor
  • *
  • Posts: 3
    • View Profile
    • Email
Keyboard/Joystick...etc.
« on: 2006-01-08, 12:09:59 PM »
Well...I just woke up one morning and desided...it would be nice to finally make all those games I've always wanted. So I jumped online and found the Scrolling Game Dev.

I've read the tutorial, I've modified a few aspects of some existing games...to kinda test what I can do and I think I'll grasp the hang of this pretty quick.

I had a couple questions though.

Before I list them though I wanted to say that if you don't have time to type and type and type somemore I am fine with that...by all means if you know a link to a project or thread that implimented it...I am fine with researching my own answers....Its just sometimes you don't exactly know where the card file is or how to use it.

With that said:

1) I see where you define WHAT the keys ARE, but I can't seem to locate WHERE you define what they DO...?

2) I was reading a recent thread on adding additional buttons and I was quite please to note that you can add additional buttons...that will make using a gamepad that much easier...with that said...it seems that it would be possible to make a two player game...is that correct?

3) I was also wondering where do I go to look at the code that I am creating by using the Dev Kit?

4) Also I noticed a few discouraging things about the talking script, and I was hoping that there might be an easy fix (not involving script......I'm not against scripting but if there is an easier way I'll take it):
A) All the pictures and text were centered on the screen...I figure you could just adjust the size of the picture used to create the illusion that it was right justified at the bottom...but is there something already done to justify the text/image to where I want?
 
B) Is there a way to bipass the need to press a key to continue from one phrase to the next? I.e. Lee says "Go Home" <key stroke> Juniper says "I will not" <key stroke> etc. to Lee says "Go Home" < 1 sec delay> Juniper says "I will not"...something along those lines?

C) The timing is kinda sluggish... When I hit a key for a fight sequence the animation is immediate. If I hit the key to run the next line of text...its hit or miss on wether the computer is ready to recieve the key stroke...I end up hitting the darn key like 3 or 4 times before the next line of text loads. I was curious as to why, and how to fix it?


Well thats it for questions...

I would appreciate any help at all.

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: Keyboard/Joystick...etc.
« Reply #1 on: 2006-01-08, 05:47:54 PM »
First of all, in case you don't know already, every window in the program has context sensitive help, so if you have any questions about how to use some of the features mentioned below, just find the window and press F1.

1) Special functions can be activated by different buttons.  A special function's activation parameter, for example, can tell the system the the function should only activate if the player is pressing button 1 (gamepad button 1 or whatever key is mapped to button number 1).

2) There is a sample of a 2-player game at http://gamedevprj.sf.net/files/ (see file GD2Player.zip) and some discussion about it here: http://gamedev.comdel.net/index.php?topic=656.0

3) The kit does not generate code.  It just saves data about the graphics, maps and parameters you have specified.  The GDP file is the top level file and can be viewed in notepad.  The MAP files are binary and contain a lot of the data for the individual maps.  But if you export the project to XML, you can see all the GDP and MAP data in plain text.  The actual code that runs is in GameDev itself (GDPlay.exe or GameDev.exe -- GDPlay is a runtime-only version of GameDev.exe).  If you want to see it you'll have to download the source code package.

4) The recently posted project "Bob the Unlikely" (http://gamedevprj.sf.net/) used sprites to display messages.  The whole message was stored as a graphics and then created as a sprite.  Otherwise, you don't have much control over how messages get displayed unless you use script.  I would have to know more details about what you're doing to explain what's going on with the "sluggish" timing.  Obviously GameDev is responding pretty quickly most of the time, so I don't think it's really "sluggish" but rather some design anomaly that is causing certain keys under certain circumstances not to react at all.  Your message may be ending up in the background buffer and not flipping to the front where it's visible or something.

iii

  • Visitor
  • *
  • Posts: 3
    • View Profile
    • Email
Re: Keyboard/Joystick...etc.
« Reply #2 on: 2006-01-14, 02:49:43 PM »

B) Is there a way to bipass the need to press a key to continue from one phrase to the next? I.e. Lee says "Go Home" <key stroke> Juniper says "I will not" <key stroke> etc. to Lee says "Go Home" < 1 sec delay> Juniper says "I will not"...something along those lines?


Well thats it for questions...

I would appreciate any help at all.

Hey thanks for answering those questions I had from earlier...I was wondering if this one was left out or missed...or maybe you answered and I didn't see?

Either way you have helped a great deal: I had one more question that I thought of...is there a way to limit overall inventory size...meaning that I can only carry 32767 items and nothing more...it doesn't matter what size the items themselves are but the inventory can only have that much?

I'm looking into that multiplayer bit for a multi inventory system...

again I appreciate the point in the right direction. Have a good one.

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: Keyboard/Joystick...etc.
« Reply #3 on: 2006-01-15, 08:20:22 AM »
I guess you have to extrapolate on my answer in number 4 to get your answer for part B.  If you know how to use sprites to display messages, and if you know how to make sprites stay on the screen for a pre-determined amount of time and then disappar (use a path with a 1-second delay, and set the sprite to delete at the end of the path, and to activate a function at the end of the path for the next message), then you can combine those to have a series of timed messages that happen automatically.

There is no built-in way to limit overall inventory count.  Most player inventory definitions have other things like health and hidden variables mixed in so it really wouldn't be useful in most cases.  But you could relatively easily write a script that added up the QuantityOwned property of all inventory items you were interested in limiting, and check the sum to see if it's greater than 32767.  If it is, then you could set the max quantity of all those items to eb equal to the QuantityOwned, and then the player wouldn't be able to pick up any more of those items.  Then you'd also need script to change the MaxQuantity of all those back to a higher number after the player uses or drops something.

iii

  • Visitor
  • *
  • Posts: 3
    • View Profile
    • Email
Re: Keyboard/Joystick...etc.
« Reply #4 on: 2006-01-15, 12:08:46 PM »
etc...

Thanks I'll start looking into the scripting portion of the forum...

Like you said it should be easy enough. Just was curious if there was something built in.

Thanks again. you've been a great help...hope to be posting a project soon.