How Does this game works??

Apprentice
Posts: 7
Joined: 2012.04
Post: #1
Turtle Fly

http://www.youtube.com/watch?v=8fGmmvwuY-s

I wanna know how they made it fly like that, did they had a large map before the game starts, or it is initialize while the game is played, deleting the ones at the bottom?

how does their background work too?
Quote this message in a reply
Moderator
Posts: 916
Joined: 2002.10
Post: #2
How about you offer us some of your thoughts on how you think they did it? Smile

Cause I bet simply telling you would not be as beneficial as you taking some time to do some thought on the matter.

Similar to how you try to find out how a magic trick is done Smile
Quote this message in a reply
Apprentice
Posts: 7
Joined: 2012.04
Post: #3
Alright so far I see:

Parallax scrolling on the background. - is it looping? unfortunately I don't have the game >_< but mostly looping right?

Objects being instantiated above him, randomly. -They get deleted when they are not seen in the camera anymore. will be basing it on the distance from the character.

the camera following the main character. - I can do this.

I am wondering if the player actually flies through the game, and the camera following it, or they
are only on one place and the objects going down, with the illusion of going up?
Quote this message in a reply
Moderator
Posts: 916
Joined: 2002.10
Post: #4
(May 3, 2012 06:25 PM)jeroenx000 Wrote:  Alright so far I see:

Parallax scrolling on the background. - is it looping? unfortunately I don't have the game >_< but mostly looping right?
I don't see any parallax happening.

Quote:Objects being instantiated above him, randomly. -They get deleted when they are not seen in the camera anymore. will be basing it on the distance from the character.
I don't believe the level is random. I think random would not present the proper challenges at the proper time. I also don't believe they are "deleted" so much as not visible / not processed when they are not within a certain parameter.

Quote:the camera following the main character. - I can do this.
while mimicking its style would be very easy, I personally think the camera is terrible. it has almost no elasticity, so while creating a solid emphasis on the character, it doesn't really give you much locality in the game world. I suppose for a game as simple as this, that may not matter, but I personally am not a fan.

Quote:I am wondering if the player actually flies through the game, and the camera following it, or they
are only on one place and the objects going down, with the illusion of going up?
I am more than certain they are traveling through the "world"
Quote this message in a reply
Sage
Posts: 1,482
Joined: 2002.09
Post: #5
(May 3, 2012 06:25 PM)jeroenx000 Wrote:  I am wondering if the player actually flies through the game, and the camera following it, or they
are only on one place and the objects going down, with the illusion of going up?

People usually make it so that the camera moves to follow a single moving object instead of moving many objects. It's generally easier that way. Although in a game like that which goes on forever (presumably), you could make a pretty good case that it's easier to move the other objects and delete them when they go too far offscreen.

Both ways are basically equivalent though, and either way you need to do work to map that to screen space (pixels coordinates) when you draw them. Modern graphics APIs do a lot of that work for you though with scenegraphs or transformation matrices. It really just comes down to what makes most sense to you.

Scott Lembcke - Howling Moon Software
Author of Chipmunk Physics - A fast and simple rigid body physics library in C.
Quote this message in a reply
⌘-R in Chief
Posts: 1,247
Joined: 2002.05
Post: #6
It's a whole lot quicker to do ship.y += ship.velocity.y * time; than it is to do for (allObjects) { obj.y -= ship.velocity.y * time; } Wink

There's not enough in the video (and I'm too lazy to go look elsewhere) to know if the whole game is one continuous stream of stuff, or there are discrete levels. If it literally goes on forever, there has to be random generation of object placements.
Quote this message in a reply
Apprentice
Posts: 7
Joined: 2012.04
Post: #7
(May 3, 2012 07:30 PM)skyhawk Wrote:  I don't believe the level is random. I think random would not present the proper challenges at the proper time. I also don't believe they are "deleted" so much as not visible / not processed when they are not within a certain parameter.

so it has an algorithm on how many and when to spawn hazards.
Okay so what would you propose when some things are not visible on the camera anymore? so that I could free up the resources of an iPhone?

(May 3, 2012 07:30 PM)skyhawk Wrote:  while mimicking its style would be very easy, I personally think the camera is terrible. it has almost no elasticity, so while creating a solid emphasis on the character, it doesn't really give you much locality in the game world. I suppose for a game as simple as this, that may not matter, but I personally am not a fan.

yes, but it is in 2d only. so is it acceptable?

(May 3, 2012 07:30 PM)skyhawk Wrote:  I am more than certain they are traveling through the "world"

I see, you're right.


(May 3, 2012 07:38 PM)Skorche Wrote:  
(May 3, 2012 06:25 PM)jeroenx000 Wrote:  I am wondering if the player actually flies through the game, and the camera following it, or they
are only on one place and the objects going down, with the illusion of going up?

People usually make it so that the camera moves to follow a single moving object instead of moving many objects. It's generally easier that way. Although in a game like that which goes on forever (presumably), you could make a pretty good case that it's easier to move the other objects and delete them when they go too far offscreen.

Both ways are basically equivalent though, and either way you need to do work to map that to screen space (pixels coordinates) when you draw them. Modern graphics APIs do a lot of that work for you though with scenegraphs or transformation matrices. It really just comes down to what makes most sense to you.

I see, Thanks. a lot of things to consider hhmm.. I'll try to do both and see what suits best.


(May 3, 2012 10:37 PM)SethWillits Wrote:  It's a whole lot quicker to do ship.y += ship.velocity.y * time; than it is to do for (allObjects) { obj.y -= ship.velocity.y * time; } Wink

There's not enough in the video (and I'm too lazy to go look elsewhere) to know if the whole game is one continuous stream of stuff, or there are discrete levels. If it literally goes on forever, there has to be random generation of object placements.

I agree too. but what if I'm going endless? I know the object placements, should I still follow the main ship going up? unity has an endless space though Smile

Thanks to all of you Smile
Quote this message in a reply
⌘-R in Chief
Posts: 1,247
Joined: 2002.05
Post: #8
(May 3, 2012 10:51 PM)jeroenx000 Wrote:  Okay so what would you propose when some things are not visible on the camera anymore? so that I could free up the resources of an iPhone?

You've laid out the entire world ahead of time and want to have only a small amount of it loaded at a time? In this game, you could simply use the Y coordinate of the bottom of the screen to determine locality into the level. You only need at any moment to have objects which are visible on screen or will be soon.

Let's say your biggest object is 100 units tall, the screen is 500 units tall. If the bottom of the screen is currently y=8734, then you would need to have loaded objects from y=8634 to y=9234, since that would contain all objects which are possibly visible on screen.

How do you maintain that? A simple way to think about it is always having three screens worth of data in memory. Arrange the level data in ascending Y order, and at the beginning of the level load the objects from y=0 to y=1500. Then, every time y reaches a multiple of 500, load the objects in the next 500 units. So when y=500, start loading y=1500-2000.

That'd work, but perhaps loading a screen's worth of objects at once could cause a tiny but noticeable hiccup in processing. So instead of loading the objects within the next 500 units, each frame, just load the next object in the file if it's within 1500 y.

That's one way.
Quote this message in a reply
⌘-R in Chief
Posts: 1,247
Joined: 2002.05
Post: #9
(May 3, 2012 10:51 PM)jeroenx000 Wrote:  I agree too. but what if I'm going endless? I know the object placements, should I still follow the main ship going up? unity has an endless space though Smile

Sure. When you generate the new objects you give them a fixed y position at ship.y + something. Their positions don't change frame to frame, just the ship's.
Quote this message in a reply
Apprentice
Posts: 7
Joined: 2012.04
Post: #10
@SethWillits
Thank you so much for your input. I appreciate it. Smile
Quote this message in a reply
Apprentice
Posts: 7
Joined: 2012.04
Post: #11
uhm, can anyone give me a good formula for a parallax scrolling? Smile

where the background moves slower than the player.. hhmm...

I am using unity and a camera for the background, so the camera is the one should be moving according to the speed of the player.

somewhat:

camSpeed = playerSpeed* 0.5;
?
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  new engine in works. advice? godexsoft 4 4,403 Apr 7, 2012 07:25 AM
Last Post: godexsoft
  Getting app store to show the game now works with 3.0? Madrayken 4 4,335 Jan 25, 2010 12:20 PM
Last Post: Madrayken
  Anyone know how the new releases list works? kendric 3 3,568 Aug 30, 2009 09:23 AM
Last Post: kendric
  touches stopped working on device, works in simulator aerospaceman 4 4,487 Jul 29, 2009 05:06 PM
Last Post: aerospaceman
  Works in the simulator, but not on my device... duncster 4 3,750 Nov 19, 2008 03:24 PM
Last Post: AnotherJake