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:
It's goes a little nuts like this:
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.
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.