|
|
|||||
Topic, Game "Path 4 Mouse (old)" | ||||||
| ||||||
You must register or log in to post a message.In the blEditLevel() function, I traced the level data to the BL debug console (accessed by pressing D and C at the same time). I think that the problem was maybe that the debug console could not handle such a large amount of data on one line, and so it crashed. This would explain why it worked with the old data: all the old levels have newlines in them to make them more readable, while the new ones are all crammed onto one line because they are no longer made in a text editor. Sounds reasonable? even though it's gone it caused it all and also your level trimming code should ensure array size of 20x20 [edit] I didn't miss your edit my post is 20 minutes after yours... Also, I sent you the PM. [edit] Okay.... The editor does not freeze on old levels, but it does freeze on GIS's newly created level... That gives us a clue. [edit2] Another thing I noticed is that the level loads and displays properly this time, but the editor still freezes in exactly the same place. Sorry, but I have a lot of testers at the moment, probably more than I need. Don't worry though, I'm working hard to finish the game as soon as I can! @marc: I was doing that, but you're right about the scores being rounded. I'll just increment them by 1 instead of 0.1, which will eliminate both problems. timer=Math.round(timer*100)/100 [edit] also BL only accepts integers for score, I tried otherwise but it removes the decimal, like doing Math.floor() I'm having problems with increasing a counter by 0.1 every 10 milliseconds using setInterval, but for some reason the timer ends up with things like 29.9000000000002... Any ideas? I know I could just round it to 1 decimal place, I think that might slow the game down if it's happening once every 10 milliseconds. [edit] I think I've fixed it, but not in the most efficient way possible. [edit] WOOOW! Definitely not Base64. The resulting string was larger than the original string! [edit2] I'm sticking with LZW, I had a bug, but actually it was unrelated to the compression. Let's just get that working and hurry up with the more important things! Now I will still be using the LZW compression, but only for testing levels offline. I'm adding a 'compress' feature to the hidden part of the editor, so I will have smaller data to test offline. Then I'll be testing my levels like this: BLManager.blEditLvl(LZW.decompress("2,ĀĂÄĄăĆąĈćĂ|ĊĉĎÄÄÄÄŒÄĔđĖēĖĕĚĆĘěĞėęġğÄĢĥĉĤğĩĜĦĬħÄįĒİįĨIJěĴĪĪķĵÄĺĸġĽĻĮľŃ2ŀńÄņÅÄ‹ÅŠÄŸ")); This means that the problem either decides to wait a while before it occurs, or that the problem is happening when I draw the grid.. We'll see..... |