How do I - Infinite Diagonal Scrolling (For endless runner)

Get help using Construct 2

Post » Tue Apr 15, 2014 2:26 pm

Fimbul wrote:What you need to do is:
  • Pick only the instance you just created (the create-object action pre-picks the newest instance for you, but I don't know if it "un-picks" the other instances, you'll have to test)
  • Add/Subtract to it's Y position only once (preferrably at the moment of creation). You don't need any fancy formulas to it, just add directly to it's Y position.
  • I would avoid adjusting the X position, since that can cause seams to appear. The platforms will always be coming from the right, correct?


I am only adding the Y in the platform creation event. The scrolling code is still the same.. but I am now wondering if I have to deduct the additional Y at scroll. :?
I also tried creating an extra Origin Point to define where the next tile should spawn, but this too resulted in drifting.
Not sure how to proceed now :(

Fimbul wrote:Don't worry about that man, just pay it forward.

Trust me I will :)
Create your own Isometric Runner Game using C2:

Image

Check out my game "Last of the Survivors":
Play Store
App Store
B
58
S
12
G
2
Posts: 419
Reputation: 5,341

Post » Tue Apr 15, 2014 2:33 pm

Post your capx again and I'll take a look.
B
36
S
8
G
8
Posts: 532
Reputation: 6,903

Post » Tue Apr 15, 2014 3:01 pm

Fimbul wrote:Post your capx again and I'll take a look.


Here you go... I am using variable "addY", set it to zero to see your default logic work. Value of 24 makes the tiles align.

I am using "Direction" and "Ang" instance variables. Ang is used instead of the inbuilt "Angle" property (needed for scrolling)

Let me know if any questions
Last edited by SamRock on Tue Apr 15, 2014 7:01 pm, edited 1 time in total.
Create your own Isometric Runner Game using C2:

Image

Check out my game "Last of the Survivors":
Play Store
App Store
B
58
S
12
G
2
Posts: 419
Reputation: 5,341

Post » Tue Apr 15, 2014 4:40 pm

Well I was somewhat wrong and somewhat right. Yes the downward motion is to be expected if you do it like that (like I said), but it's also what you want. The downward motion is desirable.
It stems from the fact that once the engine places the first platform, it starts connecting them front-to-back, and since you're always correcting the newest platform (pushing it down), the newer platforms will accumulate the effect.

How do you fix it? By making the platforms go "up" to offset the motion: Like the comments say, the engine is lacking scrolling. You need to add logic to keep the platforms (or the player) centered on the screen, and you cannot rely on the automatic centering provided by Construct 2 because your game is an infinite scroller, not a predefined level.

There are many problems with using "tiles" in the way you're describing:
  • The player has a cyan "detector" sprite below him, and it relies on thin, rectangular platforms to work, otherwise it might detect two platforms simultaneously and not know which angle to pick. The thinner the platforms, the less this problem happens.
  • With fixed tile platforms, you can only bend the pipes in 90º increments.
  • With tile platforms, you can no longer use the platformer behavior to handle player movement, you'll have to come up with custom movement logic.
  • setting addY to 24 does not make the platforms align. 34 works better, but makes the tiles overlap. Also this only works for the initial angle, all other angles break. That's because addY depends on the angle, it can't be a fixed value.
  • Having isometric tiles make the whole connecting logic collapse, since when the engine tries to figure out where to attach the new platforms to the old ones, the maths give it the wrong answer, and things look jumbled.
This is not to say that isometric tiles are impossible, it's just that they're very very hard to work with this engine, which is designed to support a platformer.

If you do want to stick with tiles, I can help you a bit, but it involves starting over from scratch.
Last edited by Fimbul on Tue Apr 15, 2014 6:15 pm, edited 1 time in total.
B
36
S
8
G
8
Posts: 532
Reputation: 6,903

Post » Tue Apr 15, 2014 6:05 pm

Message: SamRock can only post plain text URLS until they have 500 rep. 2 URLS modified. Why?
You are right about everything. This thing is getting tougher with every new idea. And Construct 2 seems to be very restrictive.

Here is the game that inspired me to go with this style of representation. Its was made using Construct 2.
(URL not allowed )

http://youtu.be/m0lCsQQE4N8

viewtopic.php?f=148&t=98236

I dont want it to be so complex, with varying platform height. Just basic, pipes going Straight, Left, Right. Do you think its possible?
Last edited by SamRock on Tue Apr 15, 2014 7:02 pm, edited 1 time in total.
Create your own Isometric Runner Game using C2:

Image

Check out my game "Last of the Survivors":
Play Store
App Store
B
58
S
12
G
2
Posts: 419
Reputation: 5,341

Post » Tue Apr 15, 2014 6:08 pm

You can't post URLs yet. Either post screenshots as attachments or get 20 more rep (should be easy).

Also it's not that construct 2 is restrictive, it's just that the engine I provided for you was for a different concept than the one you want - it's no surprise that it doesn't work. If you had coded it in C++ it wouldn't be any different.

Looking at the videos, I can see that it will be impossible to fix the engine I gave you. You need a new one.
B
36
S
8
G
8
Posts: 532
Reputation: 6,903

Post » Tue Apr 15, 2014 6:40 pm

Ah!! Thats sad

I looked around for some games that uses isometric tiles here. But there are hardly any and doesnt work with the game idea I had.

I feel ashamed to ask so much from you now.... :(

It would be great if you can give me some idea on how I can achieve the effect from that video, I will try to take it forward from there. And I really appreciate helping me out :)
Create your own Isometric Runner Game using C2:

Image

Check out my game "Last of the Survivors":
Play Store
App Store
B
58
S
12
G
2
Posts: 419
Reputation: 5,341

Previous

Return to How do I....?

Who is online

Users browsing this forum: Cub3D, yiuyiu6666 and 19 guests