Categories

Programming Midterm: My Presentation

As the days for the midterm drew closer I became more and more stressed. My concept for my midterm was ambitious and there was only so much time to create while not driving myself into a restless hole in the ground. Instead of a traditional state machine based off of a “waterfall” flow chart I was attempting to drive my adventure based off of a grid and coordinates.

I knew once I finished my flow chart that I was already taking on a lot.

 

I was attempting to create every single possibility of moving on a grid into my flow chart and it was just messy. So I began working on my first version of my grid maker, in order to create tetrominos from my quiz. I ended up with my program named gridmaker.

 

This essentially ran a for loop to create rects that were based off of the resolution of the canvas. Then I wrote up the logic for a “paintbox” that selected which coordinates could be filled in. Once I figured that out I worked out code that would run my state machine. However, as I designed my graphics through code and began creating my questions, I realized that my state machine was not running based off of the grid at all. I was running two completely separate programs on top of one another.

So I went back to my flow chart and thought about how to redesign it in order to better conceptualize my subject. My problem became clear very fast. I was attempting to think about my flow chart in terms of traditional if statements, but since grids were already a visual tool, I could just use a grid for my flow chart.

 

 

This helped me better understand how the grid system would integrate with the flow of my programming. So I started from scratch and began working on a brand new program. This time I based all of my if statements around the coordinates of a smaller grid.

 

 

The questions are all the same. However after reworking all of my state machine to be attached to the grid coordinates I could not finish my entire quiz which would have ended with 24 results. Instead I only ended with two results that were not the complete ends that I hoped for.

 

I am hoping to iterate on this project for my final.

No Comments

Sorry, the comment form is closed at this time.