[SOLVED]8 direction behavior, tiles, and collision

For questions about using Classic.

Post » Wed Jan 09, 2013 10:40 am

first time caller here.
i've run into a problem in a project i've been working on and i've searched everywhere to find the solution. but i can't find a solution/workaround anywhere.

the problem is this: i have a player sprite with the 8 direction behavior and i'm trying to get it to walk about in my weak attempt at a procedurally generated cave. but every tile (which are all tiled background objects) acts solid, even the ones that don't have the solid attribute checked.

there are 3 possible causes as far as i can see:
1) how i'm drawing the tiles
2) how i'm drawing the player sprite
3) some check box i missed
now i've tried looking at all three of these things, but i'm still stuck and it could well be something else i haven't looked at.

here is two different versions of my .cap, eacg with a different method i've tried for making the player sprite go:
http://www.mediafire.com/?h3xekvv90wnv36u
http://www.mediafire.com/?5sjv4ktxolhbatp
(i hope mediafire is an ok way to share the file here)
please pay no mind to any inefficiency or sloppiness that isn't relevant to the problem i'm having, i'm new at this.

any help would be appreciated, i feel like a moron.ninjafish2013-01-10 04:00:18
B
1
Posts: 2
Reputation: 279

Post » Wed Jan 09, 2013 9:15 pm

yeah that's a weird one. if you invert the solid objects( so Black = open, RockyFloor = solid) it works that way. if that helps?

I'm going to keep playing around with it.

But you might want to consider doing the collisions based off the array. especially if you plan on having large dungeons, since you'll have to generate the terrain relative to the player to avoid low FPS.

FYI for anybody else checking out the cap. the HERO is outside the layout due to the solid object, so turn off unbound scrolling in layout2-(testbed) to see whats going on.Bartosh2013-01-09 21:16:29
B
6
S
2
G
5
Posts: 249
Reputation: 2,323

Post » Wed Jan 09, 2013 9:35 pm

ha. now i feel stupid, your program is placing black tiles on all the spots, not just the blank ones.
to test this change all your tiles opacity to 25% and add an x or whatever on the black tile in the editor.

so now we know its something to do with you tile gen


B
6
S
2
G
5
Posts: 249
Reputation: 2,323

Post » Wed Jan 09, 2013 10:20 pm

SOLVED it

you have 2 DFloorsXY arrays, one created in the Dungeon event sheet, and the actual one in the testbed layout.

ether toggle the "destroy on start up" attribute in the layout on the DFloorsxy array. or just don't create the other array. ether way works.


Bartosh2013-01-09 22:23:21
B
6
S
2
G
5
Posts: 249
Reputation: 2,323

Post » Thu Jan 10, 2013 3:59 am

Oh. My. God.
+10 internets.
that was it, it works now!
thank you!
B
1
Posts: 2
Reputation: 279


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 0 guests