Author Topic: Coding Comp: Keyboard Interaction - Winner Announced  (Read 4963 times)

OK, the theme this time round is:
Keyboard Interaction

Yes, we already have the Keyboard Movement Module, but what kind of adventure can you have just walking around?
I want to see code that allows players to look at, talk to and interact with the game world without using their mouses (mice?). Some mouse interaction is OK, but there should be a keyboard equivalent for every mouse action (as far as possible).


Here are the rules:
1. Must be open-source. We can hardly inspect your coding if we can't see it.
2. Must contain instructions for how to add to an existing game, this will obviously be easier if the scripting is done as a module.
3. Only use of the 3D, TCP/IP and maths plugins are allowed.
4. Must provide sample game using your code.
5. Team efforts are allowed, and you're probably expected to get help for sprites, etc from elsewhere.
6. As far as possible, entries will be judged on their scripting and gameplay rather than GFX, SFX, music, etc.
7. Winner will be decided by 1 week of voting at the end.

Competiton runs 18th March to 1st April. (No joke entries, please ;))
Then, a week of voting.
« Last Edit: 08 Apr 2006, 21:22 by Ashen »
I know what you're thinking ... Don't think that.

Re: Coding Comp: Keyboard Interaction 18/3/06 - 1/4/06
« Reply #1 on: 20 Mar 2006, 07:01 »
Well... I have started work on my entry. Watch this space for updates...

EDIT: I have to withdraw from the compo. I have to use more time on my game. It was very similar to KhrisMUC's entry anyway.
« Last Edit: 26 Mar 2006, 17:21 by Dr. Scary »

Re: Coding Comp: Keyboard Interaction 18/3/06 - 1/4/06
« Reply #2 on: 20 Mar 2006, 14:24 »
Done.



Get the (2.72b5) template and example game here.

It's pretty basic. Enjoy :)
(The inventory can't be accessed while it's empty, so pick up stuff to make tab work.)

Kweepa

  • Mutated Guano Deviser
    • Best Innovation Award Winner 2009, for his modules and plugins
    • Kweepa worked on one or more games that won an AGS Award!
    •  
    • Kweepa worked on one or more games that was nominated for an AGS Award!
Re: Coding Comp: Keyboard Interaction 18/3/06 - 1/4/06
« Reply #3 on: 22 Mar 2006, 08:21 »
Here's my entry (demo game + module):
http://www.steporg.com/step/ags/comp/keyinter.zip

It has these features:
 - keyboard movement in 8 directions, including sliding off characters and edges of walkable areas
 - redefinable keys for movement, looking, scrolling through inventory and interacting
 - made with ags272b6 - requires 2.72 at least

The demo game is as basic as possible - there's just a label added to the statusline to identify the object, hotspot or character that can be looked at or interacted with, and some code in game_start to set up the module.

Default keys are: WASD/cursors to move, hold Z to run, press L to look, U to use/talk, I to use current inventory item, [ and ] to scroll through your inventory items.

[EDIT]
Updated to require 2.72
Added code.txt to the zip archive so that you can just look at the script module source (no header)
Added a character to the room
« Last Edit: 23 Mar 2006, 00:50 by SteveMcCrea »
Still waiting for Purity of the Surf II

Re: Coding Comp: Keyboard Interaction 18/3/06 - 1/4/06
« Reply #4 on: 23 Mar 2006, 10:46 »
Two entries and the promise of a third, and it's not even the end of the first week - I think that's got my previous comps beat already. (Don't let that stop anyone else from entering, though...)

Steve:
Are there any major changes between the original 2.71 version and the new 2.72 one? If not, for personal preference I'll stick with the one that doesn't need me to download a beta version.
I know what you're thinking ... Don't think that.

Kweepa

  • Mutated Guano Deviser
    • Best Innovation Award Winner 2009, for his modules and plugins
    • Kweepa worked on one or more games that won an AGS Award!
    •  
    • Kweepa worked on one or more games that was nominated for an AGS Award!
Re: Coding Comp: Keyboard Interaction 18/3/06 - 1/4/06
« Reply #5 on: 23 Mar 2006, 15:17 »
There are no major changes. (I just changed the animation speed when running and added a character to the demo room.)
I think I edited the first version with an earlier beta of 2.72 at one point though because when I tried to load it up on another machine I had to use 2.72.
KhrisMUC's also requires 2.72 so if you're planning to do some judging you don't seem to have much choice! Not that it's particularly tricky to get the beta.
Still waiting for Purity of the Surf II

Akumayo

  • Is Watching You
    • I can help with AGS tutoring
    • I can help with play testing
    • I can help with scripting
    • I can help with story design
    • I can help with voice acting
    • Akumayo worked on one or more games that won an AGS Award!
    •  
    • Akumayo worked on one or more games that was nominated for an AGS Award!
Re: Coding Comp: Keyboard Interaction 18/3/06 - 1/4/06
« Reply #6 on: 23 Mar 2006, 17:02 »
I am also entering this one.  My module is under heavy construction, I just hope I can make the deadline...  (It will NOT be made with the beta)
« Last Edit: 23 Mar 2006, 17:13 by Glacies Akumayo »
"Power is not a means - it is an end."

Re: Coding Comp: Keyboard Interaction 18/3/06 - 1/4/06
« Reply #7 on: 30 Mar 2006, 10:23 »
I jinxed myself, didn't I?

Come on people, get enterin'. Only two days left.
I know what you're thinking ... Don't think that.

Akumayo

  • Is Watching You
    • I can help with AGS tutoring
    • I can help with play testing
    • I can help with scripting
    • I can help with story design
    • I can help with voice acting
    • Akumayo worked on one or more games that won an AGS Award!
    •  
    • Akumayo worked on one or more games that was nominated for an AGS Award!
Re: Coding Comp: Keyboard Interaction 18/3/06 - 1/4/06
« Reply #8 on: 31 Mar 2006, 01:44 »
Well, it's done...  It's not perfect, it's not fantastic, but by God, it's a Keyboard Control Module, and it serves its purpose well. 

NOTE:  Not made with the beta version of AGS

Features:
  -Keyboard control in either up/down/left/right only or with diagonal directions enabled
  -Looking/Talking/Interacting/UsingInventory on Characters, hotspots, and objects
  -Key to scroll through inventory items
  -Keys to open up common GUI's
  -Many lines of organized, commented code to help with understanding the script

List of default keys (they can be changed by editing the script of course):

I:  Open Inventory
S:  Open SaveGameDialogue
R:  Open RestoreGameDialogue
Q:  Open QuitGame GUI
P:  Pause game via text message
Arrow Keys:  Move player  (!!!note:  Diagonal movement will
not be allowed to the player unless "Diagonal Loops" is
ticked in the character editing screen!!!)
T:  Talk to characters/objects/hotspots
L:  Look at characters/objects/hotspots
X:  Interact with characters/objects/hotspots
N:  Select Next inventory item
U:  Use Active Inventory

The download comes with a demo game, Quest for the Blue Cup 2.  After finding the cup the first time at a small shop, the player lost it in the woods of poorly pixelated tile-based backgrounds, and has yet to recover it.  He believes that someone has hidden it, and left him clues as to its whereabouts.  Can he recover it?  Use your amazing new keyboard control keys to find out!

Download:


Akumayo's Keyboard Module + Quest for the Blue Cup 2

Enjoy!

-Regards, Akumayo
"Power is not a means - it is an end."

Re: Coding Comp: Keyboard Interaction 18/3/06 - 1/4/06
« Reply #9 on: 01 Apr 2006, 10:03 »
I'm not going to be around today and tommorrow, so consider this warning:
You have until 8PM tonight (GMT) - that's 10 HOURS FROM THIS POST to submit any last minute entries, then voting can begin. Voting will be until April 8th, when I'll announce a winner and close this sorry chapter.

Enjoy!
I know what you're thinking ... Don't think that.

Kweepa

  • Mutated Guano Deviser
    • Best Innovation Award Winner 2009, for his modules and plugins
    • Kweepa worked on one or more games that won an AGS Award!
    •  
    • Kweepa worked on one or more games that was nominated for an AGS Award!
Re: Coding Comp: Keyboard Interaction 18/3/06 - 1/4/06
« Reply #10 on: 02 Apr 2006, 20:52 »
This is a difficult one to judge!

KhrisMUC
Pros:
* great presentation - particularly the help graphics
* interesting idea to scan the room for hotspots
Cons:
* the code is hard to read - lots of cryptic variable names and not many comments
* setting up a room is fiddly because of the single pixel requirement

Akumayo
Pros:
* easy to read code, reasonably commented
* keyboard commands for everything
* nice demo game
Cons:
* hold 'left', then hold 'down' too, then release 'left' - character keeps moving left

My vote goes to Akumayo.
Still waiting for Purity of the Surf II

Akumayo

  • Is Watching You
    • I can help with AGS tutoring
    • I can help with play testing
    • I can help with scripting
    • I can help with story design
    • I can help with voice acting
    • Akumayo worked on one or more games that won an AGS Award!
    •  
    • Akumayo worked on one or more games that was nominated for an AGS Award!
Re: Coding Comp: Keyboard Interaction 18/3/06 - 1/4/06
« Reply #11 on: 07 Apr 2006, 23:17 »
Instead of standing by and letting myself win, I will be morally correct, and vote.

My vote goes to SteveMcCrea, because of the smoothness of the keyboard control, and the pretty well commented code.  It was much easier to decipher for me than KhrisMUC's.  The single pixel thing didn't bother me too bad, but Steve's was easier to work with, and I think it would be easier to implement in a game, so there's my vote...  this better not end in a tie....
« Last Edit: 08 Apr 2006, 20:17 by Glacies Akumayo »
"Power is not a means - it is an end."

Re: Coding Comp: Keyboard Interaction 18/3/06 - 1/4/06
« Reply #12 on: 08 Apr 2006, 21:21 »
I was hoping it would end in a tie, too - but since it has, I get to brake it.
They're all really good entries, and it's a tough call but my deciding vote goes to:
SteveMcCrea

Congratulations, Steve, looking forward to the next topic.
I know what you're thinking ... Don't think that.

Kweepa

  • Mutated Guano Deviser
    • Best Innovation Award Winner 2009, for his modules and plugins
    • Kweepa worked on one or more games that won an AGS Award!
    •  
    • Kweepa worked on one or more games that was nominated for an AGS Award!
Re: Coding Comp: Keyboard Interaction - Winner Announced
« Reply #13 on: 09 Apr 2006, 16:41 »
Huzzah!
Still waiting for Purity of the Surf II