Topic:   Mouse Controlled Tile Nav   (Read 12725 times)


0 Members and 1 Guest are viewing this topic.

HarryCaray


  • GMG-er

  • **


  • Posts: 119

  • I love YaBB 1G - SP1!
Mouse Controlled Tile Nav
« on: July 19, 2008, 02:40:25 PM »
Allows you to move your character with your mouse inside a grid where the character will auto fit into each tile. If the mouse goes outside the grid the character does not move. When you click, the character stays inside the tile until you click on him again for further movement. Code is a bit messy, could be shortened but the result is good.
SC Source
Download: Click Here

What I want to do with this is make it so when you click a tile, your character will walk to that tile.
« Last Edit: July 19, 2008, 03:07:45 PM by HarryCaray »

Gnome


  • GMG Extraordinaire

  • ***


  • Posts: 1073
Re: Mouse Controlled Tile Nav
« Reply #1 on: July 19, 2008, 03:00:09 PM »
Now If I could open an SC file...
This Cannot be, NOOOOOOOO!!!!

-Gnomes Cry when the McRib was discontinued again.

HarryCaray


  • GMG-er

  • **


  • Posts: 119

  • I love YaBB 1G - SP1!
Re: Mouse Controlled Tile Nav
« Reply #2 on: July 19, 2008, 03:07:17 PM »
Lol, maybe I should mention it's an SC file.

Tireas Dragon


  • GMG Extraordinaire

  • ***


  • Posts: 1626

  • Trying to recover from my shattered screen.
Re: Mouse Controlled Tile Nav
« Reply #3 on: July 19, 2008, 09:25:13 PM »
Hmm this is so very interesting because at the time you posted this I was trying to get Silverwinds mouse click navigation to work with the V6 engine. In fact I almost got it working.
« Last Edit: July 19, 2008, 09:25:22 PM by Tireas_Dragon »
I must be dreaming (wake up me wake up) How could this have happened. Tireas' cry when he found his computer fallen over in his chair with it's screen shattered.

Silverwind


  • ^ This guy is amazing.

  • ****


  • Posts: 2805

  • For the glory of my maker
Re: Mouse Controlled Tile Nav
« Reply #4 on: July 20, 2008, 02:26:03 AM »
Quote
Hmm this is so very interesting because at the time you posted this I was trying to get Silverwinds mouse click navigation to work with the V6 engine. In fact I almost got it working.
Someone suggested that earlier, but I don't see that ever happening. If what you actually mean is that you'd like V6 with mouse activated movement, that's easy. Instead of ON KEYDOWN use ON MOUSEDOWN and check the curser's position to move the player sprite in the correct direction. Is that what you meant?
I survived the spammage of 2007

Tireas Dragon


  • GMG Extraordinaire

  • ***


  • Posts: 1626

  • Trying to recover from my shattered screen.
Re: Mouse Controlled Tile Nav
« Reply #5 on: July 20, 2008, 04:33:31 PM »
Remember when you had the mouse centered screen and the man moves where the mouse clicked I am trying to get that to work with V6 I have just a few glitches I am still trying to figure out why they exist.
I must be dreaming (wake up me wake up) How could this have happened. Tireas' cry when he found his computer fallen over in his chair with it's screen shattered.

Silverwind


  • ^ This guy is amazing.

  • ****


  • Posts: 2805

  • For the glory of my maker
Re: Mouse Controlled Tile Nav
« Reply #6 on: July 21, 2008, 04:18:53 AM »
But do you mean that if you click above the character it'll move exactly 44 pixels upwards as if the up arrow had been pressed? Or can the player still move loosely?
« Last Edit: July 21, 2008, 04:19:13 AM by Silverwind »
I survived the spammage of 2007

Tireas Dragon


  • GMG Extraordinaire

  • ***


  • Posts: 1626

  • Trying to recover from my shattered screen.
Re: Mouse Controlled Tile Nav
« Reply #7 on: July 21, 2008, 09:12:42 AM »
He will be able to stand on 4 squares at once he will not be subject to a grid.
I must be dreaming (wake up me wake up) How could this have happened. Tireas' cry when he found his computer fallen over in his chair with it's screen shattered.

Silverwind


  • ^ This guy is amazing.

  • ****


  • Posts: 2805

  • For the glory of my maker
Re: Mouse Controlled Tile Nav
« Reply #8 on: July 21, 2008, 09:21:03 AM »
Wow! How are you managing to do it?
I survived the spammage of 2007

Tireas Dragon


  • GMG Extraordinaire

  • ***


  • Posts: 1626

  • Trying to recover from my shattered screen.
Re: Mouse Controlled Tile Nav
« Reply #9 on: July 21, 2008, 09:38:18 AM »
Well so far I haven't managed it. I believe I am getting close but still something is going wrong.
I must be dreaming (wake up me wake up) How could this have happened. Tireas' cry when he found his computer fallen over in his chair with it's screen shattered.

Tireas Dragon


  • GMG Extraordinaire

  • ***


  • Posts: 1626

  • Trying to recover from my shattered screen.
Re: Mouse Controlled Tile Nav
« Reply #10 on: July 21, 2008, 09:59:39 AM »
Alright problem solved and I can blame you for it, Silverwind. The code you had was useless. I might as well of written the code myself it would of saved me time. Rather than trying to modify yours to work. But now you navigation system is fully compatible with the v6 engine. Should I release the source or just the compiled app. I spent hours trying to get this to work. Well maybe not hours probably just an hour.
I must be dreaming (wake up me wake up) How could this have happened. Tireas' cry when he found his computer fallen over in his chair with it's screen shattered.

Silverwind


  • ^ This guy is amazing.

  • ****


  • Posts: 2805

  • For the glory of my maker
Re: Mouse Controlled Tile Nav
« Reply #11 on: July 21, 2008, 10:50:35 AM »
Quote
Alright problem solved and I can blame you for it, Silverwind. The code you had was useless. I might as well of written the code myself it would of saved me time. Rather than trying to modify yours to work.
Well I'm hardly to blame for the hours of time you lost TD. When I first released the engine I explicitly stated that I never thought it could become anything remotely like V6. ::) In a reply to Swamp7hing and you I said:
Quote
This system is almost impossibly different from any grid system. It works on a completely different object location engine and it's my guess that it will never resemble anything like V6. A shame, but there you go.

Quote
Should I release the source or just the compiled app. I spent hours trying to get this to work. Well maybe not hours probably just an hour.
Well, the source would save us all having to spend hours trying to get it to work. I still can't believe you actually did it though, and can't wait to see it working. :)
I survived the spammage of 2007

Tireas Dragon


  • GMG Extraordinaire

  • ***


  • Posts: 1626

  • Trying to recover from my shattered screen.
« Last Edit: July 30, 2008, 10:59:31 PM by Tireas_Dragon »
I must be dreaming (wake up me wake up) How could this have happened. Tireas' cry when he found his computer fallen over in his chair with it's screen shattered.

Silverwind


  • ^ This guy is amazing.

  • ****


  • Posts: 2805

  • For the glory of my maker
Re: Mouse Controlled Tile Nav
« Reply #13 on: July 21, 2008, 12:43:31 PM »
Quote
EDIT: Isn't it cool how I made my reply a link.
Yeah, it could be used for subliminal advertising... ;D

Anywhoo, that demo was great! I don't understand how the code works except that there seems to be 4 entity boundaries, but it's pretty awesome! Someone should make a game with this.
« Last Edit: July 21, 2008, 12:44:00 PM by Silverwind »
I survived the spammage of 2007

Tireas Dragon


  • GMG Extraordinaire

  • ***


  • Posts: 1626

  • Trying to recover from my shattered screen.
Re: Mouse Controlled Tile Nav
« Reply #14 on: July 21, 2008, 12:58:18 PM »
Well its actually pretty simple it first checks whether you are going right or left. Then If one of your points intersects the wall it stops moving you right or left then you move up or down. If your points intersect a wall then you stop moving up or down. If you stop moving the repeat stops. You have four points around your character point 1 which is the top left point point 2 which is the top right point point 3 which is the bottom left point and point 4 which is the bottom right point. Left uses 1 and 3 Right uses 2 and 4 Down uses 3 and 4 Up uses 1 and 2. Now do you understand?
I must be dreaming (wake up me wake up) How could this have happened. Tireas' cry when he found his computer fallen over in his chair with it's screen shattered.