Amaranth's Super Simple Mouse System for Ace

GolfHacker

Veteran
Veteran
Joined
Feb 15, 2015
Messages
485
Reaction score
686
First Language
English
Primarily Uses
RMVXA
No other scripts, just this one. I installed the trial version of Ace for the first time today to take it for a test spin.

I'm running it in a Windows 7 virtual machine on my Mac. Perhaps it's something unusual caused by VMWare Fusion. Thanks for the quick response anyway!
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,085
Reaction score
5,698
First Language
Indonesian
Primarily Uses
RMVXA
I think I understand the problem. The mouse has one frame late than the actual cursor position outside the screen.

I'm well aware this problem, though, it's not really a big deal for me.

You know, Unity has the same problem when I tried to make my own cursor using mouse position.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,141
Reaction score
12,416
First Language
English
Primarily Uses
RMMV
How can you tell something is one frame late when it's playing at 60 per second?
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,085
Reaction score
5,698
First Language
Indonesian
Primarily Uses
RMVXA
Take a look at this



I commented out all the ShowCursor.call
 

GolfHacker

Veteran
Veteran
Joined
Feb 15, 2015
Messages
485
Reaction score
686
First Language
English
Primarily Uses
RMVXA
That isn't quite what I was seeing. The mouse cursor appears to move at 1/2 the speed that it moves outside the window.

Is there a way to view the frame rate while the game is playing? Maybe I'm getting a slower frame rate in the virtual machine than 60 fps...
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,085
Reaction score
5,698
First Language
Indonesian
Primarily Uses
RMVXA
Is there a way to view the frame rate while the game is playing? Maybe I'm getting a slower frame rate in the virtual machine than 60 fps...
Press F2 when you playtest the game
 

GolfHacker

Veteran
Veteran
Joined
Feb 15, 2015
Messages
485
Reaction score
686
First Language
English
Primarily Uses
RMVXA
It shows 60fps. Guess that wasn't it.
 

GolfHacker

Veteran
Veteran
Joined
Feb 15, 2015
Messages
485
Reaction score
686
First Language
English
Primarily Uses
RMVXA
Update: I pulled my old XP machine out of the closet and tried it on there. The mouse cursor speed is what I would expect. So it definitely has something to do with running in the VMWare Fusion virtual machine.

Also, another question: I installed the Aveyond 2 demo on my old XP machine to study the mouse behavior, and I noticed the opening little house is on a map that scrolls horizontally, and the mouse seems to work fine. For kicks, I turned on horizontal and vertical scrolling on my own little test map, and the mouse seems to work. The PC goes where I click, and the map scrolls fine. Am I missing something as to why the mouse script isn't supposed to work on a scrolling map?
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,141
Reaction score
12,416
First Language
English
Primarily Uses
RMMV
TheoAllen, ANY game that has a custom mouse cursor will be slow. That's why I ALWAYS disable the mouse cursor when I play time management games.


What opening little house on Aveyond 2? The Vale? That map doesn't scroll horizontally. In fact I don't think there's ANY horizontal/vertical scrolling in Aveyond 2 maps. Unless you grabbed the very latest version and it's not what I have on my machine. Besides, the mouse script for Aveyond is a different script altogether. XP maps and Ace maps are quite different, including the way they handle scrolling.


The script doesn't work properly on Ace maps that have horizontal/vertical scrolling. As a test, make a map the default size, bucket fill with one tile, then draw with another tile right around the outside so it's clear where the map boundaries are. Turn on horizontal/vertical scrolling. Now play. As the map scrolls, you'll see that "border" tile. Let's call everything inside that border tile a "region", so as you continue to walk, you will cross multiple regions that all look the same. As long as you click inside the same region the player is standing in, it will work. But when you start clicking in a different region, things will start going pear-shaped.
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,085
Reaction score
5,698
First Language
Indonesian
Primarily Uses
RMVXA
Cool man, just trying to help here

TheoAllen, ANY game that has a custom mouse cursor will be slow. That's why I ALWAYS disable the mouse cursor when I play time management games.
I'm well aware this problem, though, it's not really a big deal for me.
 

GolfHacker

Veteran
Veteran
Joined
Feb 15, 2015
Messages
485
Reaction score
686
First Language
English
Primarily Uses
RMVXA
What opening little house on Aveyond 2? The Vale? That map doesn't scroll horizontally. In fact I don't think there's ANY horizontal/vertical scrolling in Aveyond 2 maps. Unless you grabbed the very latest version and it's not what I have on my machine. Besides, the mouse script for Aveyond is a different script altogether. XP maps and Ace maps are quite different, including the way they handle scrolling.

The script doesn't work properly on Ace maps that have horizontal/vertical scrolling. As a test, make a map the default size, bucket fill with one tile, then draw with another tile right around the outside so it's clear where the map boundaries are. Turn on horizontal/vertical scrolling. Now play. As the map scrolls, you'll see that "border" tile. Let's call everything inside that border tile a "region", so as you continue to walk, you will cross multiple regions that all look the same. As long as you click inside the same region the player is standing in, it will work. But when you start clicking in a different region, things will start going pear-shaped.
Ok, I think there's a terminology difference here. If I read your second paragraph correctly, what you're describing is looping (unless I'm misunderstanding something here). Looping is different than scrolling. Scrolling is where the map is larger than the window/screen, and as you move the terrain scrolls by until you reach the edge of the map - then you walk to the edge of the screen. Looping means that when you reach the edge of the map, the opposite side of the map scrolls into view and you keep walking.

In my case, I've got a map that's 50x50. Scroll type is set to "No loop" on the map properties window. The mouse seems to work fine. But if I set the scroll type to "Horizontal Loop", I see the behavior you describe. But scrolling without looping works ok.
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,141
Reaction score
12,416
First Language
English
Primarily Uses
RMMV
It does not work on looping maps - where you check the Loop Horizontal and/or Loop Vertical boxes in the map properties.


Maybe I've not used the correct terminology in the OP. I'll go back and check that now, and adjust as necessary.


Yes, it would be silly to release a script that only worked on maps that were the default size ;)
 

GolfHacker

Veteran
Veteran
Joined
Feb 15, 2015
Messages
485
Reaction score
686
First Language
English
Primarily Uses
RMVXA
Maybe I've not used the correct terminology in the OP. I'll go back and check that now, and adjust as necessary.

Yes, it would be silly to release a script that only worked on maps that were the default size ;)
Thanks! The clarification might be helpful for other newcomers like me.
 

Lantiz

Biterkid
Veteran
Joined
Dec 29, 2012
Messages
719
Reaction score
1,069
First Language
Portuguese
Primarily Uses
RMMV
Helo!

I'm using this script in my game and I'm also using one script for unlimited resolution from here:

http://himeworks.com/2013/10/unlimited-resolution/

I got a problem using your script on widescreen resolutions, so I applied a fix that works in both cases.

It is in module Mouse at line 277:

http://pastebin.com/iX8chhKW

As your script is free to use i thought it would be good to give my share.

By the way I stil got that issue of event activation when the event is behind another impassable event.

I fixed it using event conditions, and it is fine, but maybe you will want to fix it...

Thanks for that wonderful piece of code.

PS.: Sorry, english is not my mother language.
 
Last edited by a moderator:

Lantiz

Biterkid
Veteran
Joined
Dec 29, 2012
Messages
719
Reaction score
1,069
First Language
Portuguese
Primarily Uses
RMMV
Take a look at this



I commented out all the ShowCursor.call
Sorry I'm not sure if it's the same problem, but I noticed that my cursor was a little out of sync with the system cursor, and that only happen on the right border of the window (on windoewd mode).

Turns out i figured out it was the window resolution:

My game was running in 1366x768, and it's the same resolution I use on my monitor, and still the window was smaller than the monitor. So when the mouse cursor was on the right border limit of the window, it was at the right border of the monitor as well, and there was a noticeable difference between the both cursors position, which means the cursor position was the same (in numbers) but different visually.

Ofcourse that does not happen in fullscreen, in that case the position is the same for both cursors.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,141
Reaction score
12,416
First Language
English
Primarily Uses
RMMV
Thanks for that Magno. I've added Hime's script and your patch to the first post.
 

cabfe

Cool Cat
Veteran
Joined
Jun 13, 2013
Messages
2,334
Reaction score
2,483
First Language
French
Primarily Uses
RMVXA
If this script is still maintained, I found a problem with <autoactivate>.

If you stand on an event (set Below - Action mode) and click on another which has the <autoactivate> tag, it also activates the event where the player is standing.

Edit: It doesn't occur if the event is at Same as character, but then the keyboard doesn't activate either.
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
39,141
Reaction score
12,416
First Language
English
Primarily Uses
RMMV
thanks. I think I know what might be causing this - hopefully it'll be an easy fix :)
 

Jeysonmcfly

Just a random Joe Schmoe
Veteran
Joined
Jan 17, 2014
Messages
54
Reaction score
15
First Language
English
Primarily Uses
Would be really cool if the script allowed controlling other events without panning the screen around them. For instance, have the mouse be the central focus, not the events, like in most RTS's.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

It's ironic, but one of the many hilarious things done with Shia's Just Do It speech was to make a hype song, and....I know what it is.....but I still get inspired by it! I'm like..."Yes I can!!"
That moment when you realize you lost time frankenstiening a sprite together, only to realize it already exited.
My first game is going to have the main character more or less create monsters as his party members.

Thanks to the plugin creators still producing content for MV, I might be able to give each of the monster members a personalized range of tactics during combat. I liked how the devs made it like that in FF6.
Stream will be live shortly! Tonight will be the PREMIERE of Killer 7 for the first half of the stream, and at half-stream, we will switch to a session of the Interactive Text Adventure! Feel free to drop by!
Watching the launch, I felt a sort of detached excitement. Usually I'd think something like this would be extremely exciting. I'm fascinated by space exploration and am a big Sci-Fi fan. I guess it's just current events.
What did everyone else think about it?

Forum statistics

Threads
97,972
Messages
948,201
Members
129,223
Latest member
Corrrupption
Top