Monday, December 22, 2014

A good start so far

First of all, this blogpost is a day late because I... kinda... forgot.
Anyway, I did make some good progress this week. For the coming two weeks I'll probably be able to make some good progress because I have a few weeks off for the holidays. Speaking of which, I wish you all a merry christmas!

So... what's new? Well first of all I found an artist willing to make some artwork for my next project! So stay tuned for some concept art in the coming weeks. On the technical side of things, I managed to make an algorithm that generates a dungeon of connected chambers. These chambers are randomly picked from a selection of predefined text files from which the program can build the levels and the logic behind them. In other words, a chamber is nothing more than a text file in which I can define different kinds of tiles.
Well getting all of that to work on the PC proved relatively easy. I had it working quite quickly without too much trouble. But when I tried to port it to a mobile version using Unity, the real trouble came.

Where the program worked perfectly on the PC, the mobile version didn't do anything all of a sudden. It was supposed to draw the level the player was in, but nothing appeared on the screen. I spent pretty much the whole day yesterday trying to make it work on my phone. The trouble was basically in the reading of the files. Apparantly on PC you can access all the folders without a problem to read files or load data. But on mobile, things have to be in a seperate Resources folder to work. That also meant that I had to use a different method to read my files. Where I could read the file line for line on PC, I had to load in all the text in the file at once on the mobile version. This caused trouble it seemed. While in theory it shouldn't really make a difference, in practice it was the bane of all my troubles. Because apparantly in one of my text files the linebreaks were saved differently! Note that you can't actually "see" what kind of linebreaks are used in a file(yes, apparantly there are differences). So what happened was that in one of the level files the "linebreak" was defined as '\n' which is pretty standard in programming. But in another the linebreak was defined as '\r\n' for whatever reason(maybe because it was saved in a different program?). This caused a lot of trouble because all of a sudden I had all these weird '\r' characters in my lines which caused the program to crash on my mobile phone. To find that little mistake cost me pretty much the whole day yesterday... But the good news is that I got it working on my phone! This first build only involves you moving the character through a randomly generated maze. No objectives or obstacles yet, I'll be working on that later this week probably.

For questions, feedback or requests I can always be reached at:
indiestepsblog@gmail.com

No comments:

Post a Comment