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.

Newcomers AppGameKit Corner / SetViewOffset() Side Scrolling Platformer

Author
Message
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 9th Mar 2017 05:36
So is the general consensus to draw the entire level for a platformer and use setviewoffset() to move the screen view to the desired Offset?
hoyoyo80
8
Years of Service
User Offline
Joined: 11th May 2016
Location:
Posted: 9th Mar 2017 08:05
Hi blink0k...i dont have the answer but i do like your topic. Ive been asking the same question.Loading level by tiles or loading picture/level made from tile editor. Hope you get the answer
SpecTre
Developer
21
Years of Service
User Offline
Joined: 24th Feb 2003
Location: UK
Posted: 9th Mar 2017 10:35 Edited at: 9th Mar 2017 10:36
Thats the way I did it and I believe how most have done it and it works quite well even on small devices with no slow down but there is another method here which is good too:

https://forum.thegamecreators.com/thread/218452

This also shows a very neat way to get maps in from the editor Tiled very easily
The Amiga and Amos were great!
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 9th Mar 2017 20:32
Thanks guys. Appreciate the feedback
DavidAGK
AGK Developer
10
Years of Service
User Offline
Joined: 1st Jan 2014
Location:
Posted: 9th Mar 2017 20:55
My platformer works in this way. All the tiles are there and I use SetViewOffset to move around the map. I've been very pleasantly surprised by how many tiles (sprites) AppGameKit can handle. Graphics card is the limiting factor rather than CPU in my experience.
Using Tier 1 AppGameKit V2
Started coding with AMOS (Thanks Francois Lionet)
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 9th Mar 2017 22:47
Thanks dave. Having seen your awesome game it gives me a lot of confidence
Richard_6
7
Years of Service
User Offline
Joined: 3rd Feb 2017
Location:
Posted: 10th Mar 2017 03:40
SetViewOffset() is really great for side scrolling platforms. Also, with some math it's possible to add parallax effects.
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 10th Mar 2017 21:59
Thanks!
DavidAGK
AGK Developer
10
Years of Service
User Offline
Joined: 1st Jan 2014
Location:
Posted: 11th Mar 2017 08:02
Yes, for parallax I have my main map that is static and you scroll around it using set view offset and then the background ones are smaller and move based on the set view offset distance.
Using Tier 1 AppGameKit V2
Started coding with AMOS (Thanks Francois Lionet)

Login to post a reply

Server time is: 2024-11-22 01:35:18
Your offset time is: 2024-11-22 01:35:18