Problems with endless running game

Get help using Construct 2

Post » Wed Jan 30, 2013 7:03 pm

@procrastinator - are there any drawbacks to using user made plugins? (like do they not work in certain places, on mobile phones or web publishing for example)
B
14
S
6
G
2
Posts: 136
Reputation: 3,210

Post » Wed Jan 30, 2013 7:06 pm

here is a demo game i did for a endless runner. Just press the space bar to jump.

Runner
B
17
S
9
G
7
Posts: 249
Reputation: 6,922

Post » Wed Jan 30, 2013 8:02 pm

@rfisher - in your game you spawn falling down the first gap (firefox)
B
14
S
6
G
2
Posts: 136
Reputation: 3,210

Post » Wed Jan 30, 2013 8:44 pm

@wretchedshark

it should work now.
B
17
S
9
G
7
Posts: 249
Reputation: 6,922

Post » Thu Jan 31, 2013 2:17 pm

@rfisher That doesn't really solve much for me, floating platforms is pretty easy to generate, my problem is having the platforms connect exactly one after another since my game doesn't have holes in the floor. Also, its not a run and jump game, it's a run and shoot game :)

Thanks for the demo though!
B
36
S
10
G
6
Posts: 948
Reputation: 11,101

Post » Thu Jan 31, 2013 4:04 pm

@wretchedshark, I'm not sure tbh. You'd have to ask rex himself.

@rory, ok I did some playing around, and without using MoveTo plugin, if you set it up like..

(USING 128x128 tile)


Every 1.0 Second
create tile at 639,440

tile.X = tile.X - 127 *dt

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

Every 0.5 seconds
create tile 639, 440

Every Tick
tile.X = tile.X - 254 *dt

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


The tile movement per second should be 1 less than the tile width. So in the 2nd example, (128 - 1) * 2 = 254... and so on. I have pixel rounding turned on btw.

Still has the odd gap if something happens in the background, like moving the window around. Seems MoveTo plugin is the same. Was perfect for the slots game I did, but I guess I wasn't moving things too fast.

Only alternative, is using TileBackground and setting the width. When the width gets too big for your liking, create another TileBackground. At least you decrease the amount of gaps you could have with individual tiles.
B
15
S
5
G
7
Posts: 877
Reputation: 5,650

Post » Thu Jan 31, 2013 6:39 pm

@procrastinator - i looked into it and currently if we want to upload to the arcade it says no third party plugins
B
14
S
6
G
2
Posts: 136
Reputation: 3,210

Post » Thu Jan 31, 2013 6:46 pm

@wretchedshark , ah right. I wasn't too fussed with Arcade so didn't know. Good to know anyway cheers!

Well, it seems the MoveTo plugin doesn't fix gaps with faster moving tiles anyway. As mentioned above, the movement speed has to be 1 pixel less than the width of the tile if using dt. It covers that annoying 1 pixel gap for the most part.
B
15
S
5
G
7
Posts: 877
Reputation: 5,650

Post » Thu Jan 31, 2013 9:43 pm

@procrastinator @rory - i think the gaps can be gotten rid of by changing the creation equation to create them quicker so they account for the maximum gap there can be.

since i have been rounding my equation with floor() (to fix a problem with the % mod always being a float and not creating platforms) there are gaps similar to dt gaps which is solved this way.

the only problem becomes trying to overlay a graphic to polish the aesthetic.

i've had two thoughts since, (occam's razor, perhaps we are all overthinking it?):

1) make the creation formula so it creates pre-made platforms picked based on the platformlength variable (then the pretty overlay graphics could be made) continue allowing it to make gaps as it does.

2) or make an invisible "sensor" off the screen so that when the platformlength is greater than zero and a ground piece is not overlapping it create another (this may suffer at higher speeds?)

i feel like both of these would allow them to move at a framerate independant speed, i will try fiddling with both. this would also simply my capx, removing the need for a timer (ticker)... in theory!
B
14
S
6
G
2
Posts: 136
Reputation: 3,210

Post » Thu Jan 31, 2013 10:52 pm

@wretchedshark @procrastinator

Thanks again for looking into this again, I did try your No.2 solution wretched, but it didn't seem to work, still had gaps present.
I considered the overlay graphics, but I still think there could be a better solution to this ><
B
36
S
10
G
6
Posts: 948
Reputation: 11,101

PreviousNext

Return to How do I....?

Who is online

Users browsing this forum: GUN and 17 guests