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 / Advice on Vertical Scroller Concept.. ?

Author
Message
GunnerJnr
AGK Developer
8
Years of Service
User Offline
Joined: 30th Nov 2015
Location: Bridgwater, UK
Posted: 17th Jan 2018 22:32 Edited at: 17th Jan 2018 22:45
Hi All,

As the title suggest, I am looking for some advice on how to achieve a few things with a vertical scroller type concept game. Unfortunately from my poor art skills it may not be so obvious what I am trying to achieve... [See below image]



Anyway, the concept is that the player can move up the pole in the middle, (i'm undecided as to whether he/she can move back down, hence the double ended arrow on the Y Axis), but say for examples sake the player can only move up in the Y Axis on the pole in the middle..
He/She can collect coins as they move up the pole, and they are able to switch from the left side of the pole to the right side of the pole, (which I guess SetSpriteFlip() would come in handy here, but this will probably be achieved by a tap on the screen or a left/right arrow press), but basically the idea is they climb the pole, collecting coins, and have to switch side to side to avoid certain objects, the game will measure the distance gained, and award the coins collected for upgrades, (think jetpack joyride style), if the players hits an object they are meant to avoid they die, the score is saved, they can start again to try and beat it or challenge their friends.

• Same small image contain a pole, will be repeated indefinitely (until the player dies). So I gather Parallax scroll will be best for this.

My questions I want advice for though are:

1. If I were to randomly generate the coins and the objects to be avoided, I get how I would do it on screen, but how would it be achieved to give the effect that they are new from coming in off the new visible area, (the repeated image) ? Is it worth making it a double screen length and then having them randomly appear offscreen and then scroll in to view ? they can obviously be destroyed once collected or after they have scrolled back off screen...

I'm just a little hazy as to how to approach this, I know the community will be great for examples, answers, advice and maybe even some example logic/code examples..

Thanks in advance
Kind Regards
GunnerJnr

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

****EDIT****

After a bit more research, it seems this idea/concept is already a reality in many games, but probably the most commercial and best example I could give you is from Cartoon Network with a game called Sky Streaker, see the video below, I must admit seeing this has given me a ton more to think about, but I still think the concept is great!

Look forward to seeing what you all come up with

Attachments

Login to view attachments
puzzler2018
User Banned
Posted: 17th Jan 2018 22:48 Edited at: 17th Jan 2018 22:51
you want to rotate a character along a vertical ladder collecting coins and other mischievous things then

How do you think it should start off by:

Any code that you have so far?
GunnerJnr
AGK Developer
8
Years of Service
User Offline
Joined: 30th Nov 2015
Location: Bridgwater, UK
Posted: 17th Jan 2018 22:51 Edited at: 17th Jan 2018 22:59
Quote: "you want to rotate a character along a vertical ladder collecting coins and other mischievous things then"


Hi @Puzzler, yea the main thing that I am struggling to come up with is the best way to randomly produce the coins and objects as the player climbs higher and higher with the repeating background.. ?

****EDIT****

As for code I dont have any yet, its still in the concept/design phase..

I would probably do some thing like move the background image on the Y axis, then have some conditional logic that checked if the image was < or > the height of whichever direction the image is scrolling, and if it is the redraw the image to give the illusion of an endless background, then from here the player would move to a keypress which in turn would scroll the background image, then there would be some code to randomly draw coins or avoidable objects either side of the pole, with some checks to make sure they are not already below or colliding with the player, if they are re draw them in a new position above..

Then is the part I am struggling with, do I have a double sized (in height to what is visible, background image), this way I can then use another random function to draw the coins and avoidable items off screen, and just have them scroll in to views as the player moves)..

OR

community, jump in ..



Thanks
GarBenjamin
AGK Developer
7
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 18th Jan 2018 01:23 Edited at: 18th Jan 2018 01:38
You could have a background sprite of the vertical ladder in two halves as you mentioned and just offset them accordingly and move them as needed to show the player moving.
Figure out the max # of collectibles you will ever need onscreen at one time and then maybe double that amount to allow for them to still be available one screen of "scrolling" away. Create an array to track these.

A common structure might be something like...



Note that code may well have errors in it but that is the gist of how I do things and represents one way you could do this as far as the collectibles management is concerned.
Obviously, you don't need to follow this structure. I just like to modularize things. And this would be in its own code file most likely named CollectibleManager which I basically see as a Collectibles class.
Nothing outside would directly update a collectible and instead would call a method inside this file. Basically encapsulating and isolating everything to do with collectibles to this code.

Hope it helps. If not hey I gave it go. lol
TI/994a (BASIC) -> C64 (BASIC/PASCAL/ASM/Others) -> Amiga (AMOS/BLITZ/ASM/C/Gamesmith) -> DOS (C/C++/Allegro) -> Windows (C++/C#/Monkey X/GL Basic/Unity/Others)
GunnerJnr
AGK Developer
8
Years of Service
User Offline
Joined: 30th Nov 2015
Location: Bridgwater, UK
Posted: 18th Jan 2018 08:21 Edited at: 18th Jan 2018 08:39
Wow ! Thanks @GarBenjamin, this looks great and has certainly given me a lot to consider which I had not even yet thought about in the slightest. I do like the idea of calculating how many will be on screen at once, I also guess it makes life easier collision checking against the player as apart from flipping left to right his position never actually really moves he will just have the illusion of going up and down, so I guess I can just check to see if any are spawned in this radius and if they are simply recall the function until they are drawn not in that radius, but within the constraints that will be set for them, or even destroy them and just don't award points for those certain ones.

Thanks I might try and get a little mock up started today in AppGameKit, as it will be a lot easier for testing etc..

Thanks
smallg
Valued Member
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location: steam
Posted: 18th Jan 2018 09:29
Its basically timberman
https://play.google.com/store/apps/details?id=com.dm.timber
As said above its easiest to not move the player up/down at all but move the objects down and then reuse them once they pass below the player (just add some randomness to the delay of when they spawn).
life's one big game
spec= 4ghz, 16gb ram, AMD R9 2700 gpu
GunnerJnr
AGK Developer
8
Years of Service
User Offline
Joined: 30th Nov 2015
Location: Bridgwater, UK
Posted: 18th Jan 2018 10:40 Edited at: 18th Jan 2018 11:36
Quote: "Its basically timberman "


Wow yes I have never seen this game before, but you are right, it is pretty much the same in design and the mechanics of movement. Thanks @smallg
GunnerJnr
AGK Developer
8
Years of Service
User Offline
Joined: 30th Nov 2015
Location: Bridgwater, UK
Posted: 18th Jan 2018 13:55 Edited at: 18th Jan 2018 13:56
Still needs a lot of work, but I just thought I would share a small gif of current progress, its coming along slowly, the coins definitely need some work, and there is no collision in place yet..

Attachments

Login to view attachments
GarBenjamin
AGK Developer
7
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 19th Jan 2018 04:33
I'm glad you appreciated it. I was kind of thinking you might reply with "that is not the kind of stuff I was looking for!!" lol

Glad to see you have started on it. Looks like you have a good base so far.
TI/994a (BASIC) -> C64 (BASIC/PASCAL/ASM/Others) -> Amiga (AMOS/BLITZ/ASM/C/Gamesmith) -> DOS (C/C++/Allegro) -> Windows (C++/C#/Monkey X/GL Basic/Unity/Others)

Login to post a reply

Server time is: 2024-04-20 11:29:54
Your offset time is: 2024-04-20 11:29:54