How do I position tiles incrementally by 64 pixels

Get help using Construct 2

Post » Sat Mar 08, 2014 6:02 pm

So I've been working on an infinite level generator, and it works like this:
There are spawner objects all around the player. If they are active, they spawn the tiles as you run. They become active under 2 conditions
Condition 1: If the spawner is not currently overlapping an existing tile
Condition 2: If the player is running in the direction of the spawner. So the right spawners are only active when the player is moving right, bottom are only active when player is falling, etc.

This leaves 1 big problem, the tiles look a little odd when they are placed like 4 pixels above the one next to it, or 25 pixels apart, making the player think they can squeeze between the gaps. It's on the Level 2 Sheet, events 16-43 in a group called NewGen


https://www.dropbox.com/sh/xh39yofyqj4f ... rator.capx

Thanks! :mrgreen:
Last edited by bscarl88 on Sat Mar 08, 2014 11:44 pm, edited 1 time in total.
B
35
S
5
Posts: 411
Reputation: 3,406

Post » Sat Mar 08, 2014 8:15 pm

Can you use the show grid option under view? This would be the easiest way with clicking snap to grid.
B
27
S
9
G
2
Posts: 154
Reputation: 2,833

Post » Sat Mar 08, 2014 11:46 pm

would that automatically only place them in 64x64 increments? I was looking for it before, but i can't find the option under view
B
35
S
5
Posts: 411
Reputation: 3,406

Post » Sun Mar 09, 2014 1:38 am

bscarl88 wrote:would that automatically only place them in 64x64 increments? I was looking for it before, but i can't find the option under view

If you set your grid at 64x64, click snap to grid, and if your images are 64x64, then they should snap to grid perfectly. And I'm looking at these very options under view (inside C2) while I type this.
B
27
S
9
G
2
Posts: 154
Reputation: 2,833

Post » Sun Mar 09, 2014 2:54 am

Ah, I was looking int the project properties, not the view. I set this on, but it doesnt work as the sprites arent placed in the editor, they are spawned as the player runs along. Each sprite tile can be anywhere from 64,64 to 320,320 (Multiples of 64). I have it set to move the top tile when they are overlapping eachother, but this still only works to an extent as it will leave little gaps between the tiles that are spawned.

I edited the link to use the capx, I had the wrong link up before
B
35
S
5
Posts: 411
Reputation: 3,406

Post » Sun Mar 09, 2014 2:54 am

Ah, I was looking int the project properties, not the view. I set this on, but it doesnt work as the sprites arent placed in the editor, they are spawned as the player runs along. Each sprite tile can be anywhere from 64,64 to 320,320 (Multiples of 64). I have it set to move the top tile when they are overlapping eachother, but this still only works to an extent as it will leave little gaps between the tiles that are spawned.

I edited the link to use the capx, I had the wrong link up before
B
35
S
5
Posts: 411
Reputation: 3,406

Post » Sun Mar 09, 2014 1:56 pm

So here's a little more description as to what I'm trying to do. It's like snap to grid, but only in game. I'm trying to make the spawners stay attached to the player at a 64x64 basis like the spawner will only move at 64x64 pixel rate, and it will always stay within a range that is divisible by 64
B
35
S
5
Posts: 411
Reputation: 3,406

Post » Sun Mar 09, 2014 10:06 pm

I think I figured it out. I just move the spawning boxes when they are too close or too far away from the player, and move them by increments of 64
B
35
S
5
Posts: 411
Reputation: 3,406


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 46 guests