Broken Sword-style single cursor interface

Started by Loeky, Wed 16/04/2003 13:27:56

Previous topic - Next topic

Loeky

Hello

Is it possible to use one cursor for walking, looking, using, ect...
And if so how can I make one.

Loeky

Thank you for your reply,

But I i'm looking for someting els. I want to make an adventure game with one cursor. The player has only the arrow cursor to play with. For example when he wants to walk somewhere he just have to click there, he also can use the same cursor when he wants to look at somthing or pick something up. The player does not have to use differend kind of cursors.

Many thanks

Michael Zhu

#2
You have to set up your game so that every hotspot's, object's, character's interactions must be "any click on etc". That way, no matter which cursor mode you have, it's gonna do the same thing, i.e addinventory or displayspeech.

Cheers
If man carried away in bodybag, say "KOMATA!" and his soul will go to Bodycount Productions.

Loeky

thank you verry much. ;D

RickJ

Loeky,  You will need to use the on_mouse_click() event handler in the global script to handle all of the cursor stuff.  So you will have only one cursor mode (mode 6 for example is a  pointer) and you will then have  to resolve what operation will be performed  inside the on_mouse_click() function.


Enlaithion

#5
Didn't Sierra do this in KQ7?  They used the universal "wand" cursor.  It was a great idea, very convenient!

Couldn't you also add to it, like when you place the mouse over the hotspots, the cursor will change to an interact sprite, look, talk, etc...

That's do-able isn't it?

Enlaith

remixor

#6
This is what I'm doing in my game.  Revolution also did it in Broken Sword 1 and 2.

(They're retail 2D point and click games released in 96 and 97 and I only bring them up because they are excellent games and make good use of the single cursor idea.)
Writer, Idle Thumbs!! - "We're probably all about video games!"
News Editor, Adventure Gamers

Enlaithion

Thanx remixor.  I'll check them out.  

Have you ever played "The Adventures of Willy Beamish?"  It's an excellent game that uses the same cursor idea.  You can get it off of any abandonware site.

Autofire

This is exactly what I'm looking for too (BS style cursor). Did enyone ever figure out how to to it. (I see the post I'm replying to was posted a year ago)

Ashen

If anyone's still interested ......

I think you'd just have to:
-Disable the ability to change cursor mode (remove the right click function and the GUI buttons).
-Set default cursor mode to'Walk to', with a different graphic
-Do all character/hotspot/object interactions as 'Any click on'

That should work, shouldn't it?

The only problem would be you could only do the default action (Talk to character, pick up object, etc.), which might be a bit annoying if you just wanted to look at it.

..

Broken sword didn't really use one cursor .. they had it so that when u hovered over something it automatically changed to what you can do..
Is there a way you can do this?

Ashen

I suppose a series of conditional statements in the code, to change the cursor mode based on where it is would work, but could get quite complicated.

E.g.:

if (GetObjectAt (mouse.x, mouse.y) == 0) SetCursorMode (MODE_USE);
else SetCursorMode (MODE_WALK);

In the 'Repeatedly Execute' part of the room script should set the cursor to Interact made over object 0, and Walk everywhere else.  You could use something like this to set a different mode for each object / hotspot / character, or using:

if (GetObjectAt (mouse.x, mouse.y) !=-1) SetCursorMode (MODE_USE);

in the Global 'Repeatedly Execute' should set Interact on all objects.

Haven't had time to test this though, so it might not work, as I'm kind of new to this myself.

Farsight

All you do is set all the hotspots to any click and then change the "when mouse over hotspot" change graphic to whatever. Then if you want multi function you could right click while over hotspot to rotate the different views / commands. I'm not sure how you would do this but it's just an idea.
Guess who's back??

Ashen

I didn't notice that until after I'd posted, unfortunately. However, you would still need something to deal with mouse over characters/objects, as they don't have it built in.

Also, the coding in my last post wouldn't let you deal with Inventory items (MODE_USEINV). I'm working on a test room in this style - if anyone's interested, I'll post a link to it on this board when I'm done.

Autofire

I look forward to that, Ashen. I hope you'll find a way to work it out.

Ashen

Right, for any one interested, my attempt can be FOUND HERE

Feedback of any sort is welcomed, except abuse, I just don't think I could handle that. (sob) :'(

Khris

I just played your demo, it's great.

Beneath a Steel Sky (also by Revolution but much older than BS) uses this, too.

However, this method provides less flexibility.
You could still implement looking at things by right-clicking on them, but you can't any longer e.g. rob (interact with) another character.
This could be solved by opening a small GUI that lets you select whether you want to interact with or talk to the character. I think Lure of the Temptress uses this method.

My personal favourite of what I've seen so far in AGS games is Yahtzee's approach to the problem in 7 days a sceptic. (left-click: walking, right-click: GUI with choices opens)

vpresrufus

somebody made an AGS template for the broken sword style cursors. I happen to be working off it for my games GUI. if anyone is interested, pm me, email or msn me at ec_blue@hotmail.com. and let me stress i did NOT make this template, merely stumbled across it on the web (and happen to think its rather brilliant, grats to the author, whoever he may be)

SMF spam blocked by CleanTalk