This week I committed myself to completing my first Action Script prototype of my game mashup in Adobe Flash. This is the same concept that I made a video over, mere weeks ago: Minestructor. In this prototype I wanted to focus on the core playability of my game, mainly if people could regularly win by reaching the finish line first.
My video prototype had tested the clarity of my idea to audiences, therefore I would assume that my users new exactly what they needed to do when using this prototype. Through this assumption I was able to focus on building a prototype of the core gameplay and avoid enforcing certain rules.
I began my prototype with the creation of a minefield, interactive tiles carrying certain properties that determined the tile-state once triggered. Once each mine was created, a randomiser function would determine if a tile was a mine or not. Once every tile was created and drawn onto the canvas, another function would set the tile state's of all the non-mine tiles to show a numeral, indicating the count of nearby mines. Initially I was confronted with mines treating each other as neighbours despite not looking adjacent on the canvas, this was caused by their positioning in the vector that I stored them in. With a clever use of modulo functions I was able to code in exceptions that would avoid doing this at the edges of the game board and the player barrier.
My next major challenge was coding in obstructors. I worked tirelessly to create draggable obstructors that would render the tiles under them unusable. Thankfully, I was able to find a simple tutorial on drag and dropping (d&d) AS3 objects online from ...
http://www.virtualmv.com/wiki/index.php?title=ActionScript3:Drag_and_Drop_with_Targets
I feel it necessary to state that my d&d code emulated the code from this site, though my lock-in method for dropping followed a completely different method, one based of mathematical loops as opposed to object recognition. Once I was able to d&d my obstructers, I included exceptions to re-adjust the objects hanging off the edges of the canvas, or blocking the starting line.
Now that my vital operators were in place my game was playable, from the starting line you could begin traversing up the minefield in order to approach the finish line, indicators would suggest which players turn it was after each move was made.
No comments :
Post a Comment