Friday, November 6, 2015

11/1 - 11/6: Arrays in the Second Dimension

Link to the videos here
This week I've started my long and more than likely painful journey into creating this massive algorithm. I chose to start with the Cellular Automata because there was a tutorial on it and all I really needed to do was translate the code from C# to JavaScript. Not even ten lines in I ran into my first problem, the lack of 2D arrays in JavaScript. In the tutorial the guy just goes right past it because in C# there are 2D arrays and therefore no explanation is needed. I meanwhile need to create a 2D array and what I wound up with was something that (hopefully) works. How I got there was a long trek through Stack Overflow looking for answers. When I found none I posted a question and got reasonably quick results with only one of them being actually useful. Essentially what it is is an array that holds other arrays. I have yet to test it though and the only reason that I say it works is because Unity hasn't yelled at me for doing it this way and knowing Unity it would have been more than happy to yell at me if there were any possible errors. I also created my formal project proposal which is as follows, the plan is to create a dungeon map generator combining cellular automata and BSP Tree. This will prove that I understand both of these algorithms and am capable of altering them to do as I wish. The project will only be  to create a generator, nothing else and if by some miracle I have time left over I can start making this into a full game. That's about all that I got done this week, between looking through Stack Overflow for answers and starting this algorithm I feel like I got a reasonable amount of work done.

No comments:

Post a Comment