Wednesday, 21 September 2016

Insights... or just some ideas worth testing

For my game, the map is a class.  All that class needs to be able to do is create a 'map'.  I can get a different class or routine/procedure to draw the map to screen.

In effect, what this means is that all my map class need do is fill an array of a defined size with procedurally generated information, integers in this case, that represent topographical features of the map.
Another part of the code will interpret this map array and create a picture.

This will work... i have nearly convinced myself of this.

Just need to figure out the bit where one part of the code talks to my map class, giving it enough information to do what it needs to.

Do i need to return a value?  Not sure.
Can I simply refer the the instance of the class?  probably, but I don't know if this is good or not.


*edit*
I've created a copy of the previous project so that I don't have to rebuild the whole thing.  That counts as progress, right?


*edit*
Another class, but now I've managed to reference an array from one class to another.  I'll have the map working again in the near future.  Right now it's a broken pile of ascii.

{get; set;} calls to me, and I'm not sure why at this point in time.  I'll have to read up on that tomorrow.

No comments:

Post a Comment