Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Space Defense [TD]

Author
Message
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 11th Nov 2021 22:28 Edited at: 11th Nov 2021 22:34
This turned out to be trickier than I anticipated. Zooming and scrolling a 2D map. Zoom in/out will focus from mouse position. Scrolling is done by dragging the screen with left mouse button. It also has a smooth, inertia-based scrolling depending on how hard you flick the mouse before releasing the button. Mouse wheel controls zoom. Map has fixed boundaries so you should never be able to scroll or zoom beyond the background image.

Zip file attached at bottom

Tiled TMX Importer V.2
XML Parser V.2
Base64 Encoder/Decoder
Purple Token - Free online hi-score database
Legend of Zelda

"I like offending people, because I think people who get offended should be offended." - Linus Torvalds

Attachments

Login to view attachments
PartTimeCoder
AGK Tool Maker
9
Years of Service
User Offline
Joined: 9th Mar 2015
Location: London UK
Posted: 11th Nov 2021 23:23
Nice, I like the auto centre thing, only thing is the lockout when zooming it breaks the fluidity, maybe zoom a little faster or allow some slight movement while zooming, variable end point maybe that allows slight panning, or a distraction might work, some concentric circles or a reticule



Open Source plugins
Cl - DnD Plugin
Buy Me A Coffee
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 14th Nov 2021 16:39
Quote: "only thing is the lockout when zooming it breaks the fluidity,"

I did that because when you zoom it's focused on a fixed point. Panning around changes that and it gets confused when offsetting the map. Once you start panning, there is no longer a point of focus. Basically, two different functions are trying to control the offset at once and you'll get some choppy even less fluid movement.

I've tripled the zoom speed. So while you still get some gradual change, it happens quick enough now that I don't think you'd notice the temporary lock out of control.
Tiled TMX Importer V.2
XML Parser V.2
Base64 Encoder/Decoder
Purple Token - Free online hi-score database
Legend of Zelda

"I like offending people, because I think people who get offended should be offended." - Linus Torvalds

PartTimeCoder
AGK Tool Maker
9
Years of Service
User Offline
Joined: 9th Mar 2015
Location: London UK
Posted: 14th Nov 2021 17:11
That was pretty much when it felt like it needed, it was just a second or so maybe to slow, it gives the user enough time to notice the lockout but once you got some gameplay going on it will add to the distraction, don't change it too much its a nice mechanic.

Open Source plugins
Cl - DnD Plugin
Buy Me A Coffee

Login to post a reply

Server time is: 2024-11-21 12:32:06
Your offset time is: 2024-11-21 12:32:06