Coding Comp: Keyboard Interaction - Winner Announced

Started by Ashen, Sat 18/03/2006 17:53:54

Previous topic - Next topic

Ashen

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.
I know what you're thinking ... Don't think that.

Dr. Scary

#1
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.

Khris

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

#3
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
Still waiting for Purity of the Surf II

Ashen

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

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

#6
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)
"Power is not a means - it is an end."

Ashen

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

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."

Ashen

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

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

#11
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....
"Power is not a means - it is an end."

Ashen

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

Still waiting for Purity of the Surf II

SMF spam blocked by CleanTalk