How do I fix this Procedural Dungeon possible bug?

Get help using Construct 2

Post » Mon Aug 11, 2014 8:52 pm

Hi there!

I am busy testing out C2. I bought the personal version after making a simple game with the free version and now I am trying to step it up.

I am working on a game with a procedural dungeon. The basic problem in a nutshell is that when I run the game in C2 it works fine. When I export it to html it gets all crazy.

Like instead of sticking to the array, grid and the rules that I developed like this:
Image
or this
Image

It's goes a little nuts like this:
Image

The only difference is running it in C2 or exporting it as HTML5 and running it.

It still seems to be following the rules, but making all arrays involved bigger which in turn makes the dungeon crazy.

I have one array that is the grid the maze is laid out on. usually 80,80,2 the second layer of depth stores information about what kind of tiles lie next to a tile so I can tell where there are corners or entrances to rooms and such.

I have another array that stores the dimensions and coordinates of the rooms. The array is 2,2,(number of rooms) The example you see has twenty.

Here is the game in html format.
http://supremerobot.com/games/cthulu/

Is there a know issue with arrays? I can't find anything online. Should I post this as a bug, or am I missing something?

PS, this was made for a gameboy style game jam which is why it is all green.


EDIT - I fixed it. It is a weird thing though in that it doesn't happen on export as long as I define and clear the arrays explicitly at the start of the layout. I don't know why it fixes the problem, but one cannot always look a gift horse in the mouth. Maybe something was writing to or reusing some specific memory address/ i don't really know.
Last edited by SupremeRobot on Tue Aug 12, 2014 8:36 pm, edited 1 time in total.
B
10
S
3
Posts: 13
Reputation: 1,258

Post » Mon Aug 11, 2014 9:01 pm

I can't really see the intended behavior as I play the game. I am not really sure what the bug is in this case.

This is what it looks like on Safari : http://i.imgur.com/MEncbSn.png

Do you mean that all the tiles seem to be stretched?

edit : Ok, sorry. I see what you mean now. I didn't understand properly the first time I read your post. Still, haven't heard any problem like this before on the forums...
Last edited by alvarop on Mon Aug 11, 2014 9:07 pm, edited 2 times in total.
B
35
S
9
G
3
Posts: 493
Reputation: 4,092

Post » Mon Aug 11, 2014 9:04 pm

It's kinda hard to tell without looking at the actual code.
Try exporting with NodeWeb-kit and check if the problem remains.
Please tag me with @caiorosisca if your post is refering to me :). I don't always follow the topics I answer.
B
11
S
4
G
1
Posts: 272
Reputation: 1,643

Post » Mon Aug 11, 2014 9:14 pm

will do
B
10
S
3
Posts: 13
Reputation: 1,258

Post » Mon Aug 11, 2014 9:26 pm

same problem with Node Webkit. :(

Image
B
10
S
3
Posts: 13
Reputation: 1,258

Post » Tue Aug 12, 2014 5:51 pm

As caiorosisca mentioned, please post/attach your capx/project.
Do you use third-part addons ?

Without the code/event sheets to look at, no way to tell/guess what's going on.
As far as we know, there is no issue with the array plugin.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
295
S
118
G
96
Posts: 7,327
Reputation: 71,246

Post » Tue Aug 12, 2014 6:47 pm

I am attaching the capx.

I have added the M key zoom in and out so you can see the map.

It is fine in c2 but on the web and in node it seems to happen every third time or so.

it must have something to do with how the map is generated, but it makes no sense that it only happens after export. Did not use third party plugins.

i made the randome dungeon based on this tutorial : http://bigbadwofl.me/random-dungeon-generator/

There are a list of global variables so you can change the room number. Map size is linked to layout size
B
10
S
3
Posts: 13
Reputation: 1,258

Post » Tue Aug 12, 2014 6:54 pm

file did not attach so here is a link. https://drive.google.com/file/d/0B4SRJc ... sp=sharing
B
10
S
3
Posts: 13
Reputation: 1,258

Post » Tue Aug 12, 2014 8:37 pm

UPDATE: Solved. See first post.
B
10
S
3
Posts: 13
Reputation: 1,258

Post » Tue Aug 12, 2014 8:51 pm

I will remove the capx, but if anyone wants it please let me know and I will send it to you.
B
10
S
3
Posts: 13
Reputation: 1,258

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 5 guests