After last week’s terrible experience, I had some time to rest over the 4th of July weekend. I was not looking forward to coming into the office, but it ended up I got to start coding this week. This brought about a new set of problems: how in the world does coding work???
I ended up hanging out with friends on Monday and didn’t come into the office until Tuesday (flexible work hours—intern perk!). Since we couldn’t figure out how to make the Marmalade Hub work on the VM last week, I decided I’ll just have to download the Marmalade Hub onto the HP computer.
Once downloaded, the Marmalade Hub worked great! It was a little confusing to work with at first, but after about 30 minutes and with the help of the online tutorials I was able to navigate it well enough to suit my purposes. The tricky thing is that in order to access your IDE, you have to find a certain option in the drop-down menu and then follow a specific path through downloaded files. It’s kind of hidden, and without the tutorial I would have never figured it out. The most prominent feature is the simulator, which displays as a big green button when you open a project. This just runs the program, and does nothing to help you if you haven’t written any code yet.
Once I got to where you open up the code, I realized that there was no good IDE installed on the computer. I had assumed it would already have VisualStudio or something similar on it since it was an old computer lying around the office, but it didn’t have an obvious one. There were no programmers in the office on Tuesday. I was lost at what to do. I wanted to get the same tools as the other programmers in the office had so they could teach me how to work them, but I didn’t know what tools to get or where to get them.
I almost quit again. It seemed like a repeat of last week. I was so close to being able to code but just didn’t have the right tools.
But I closed my eyes, took a deep breath, and then got to work again. After some fiddling around, I somehow got the code open in a source code editor previously installed on the computer called Notepad++.
I made extensive use of the Marmalade Quick tutorials and the online Lua tutorials during this time. This first week was mostly a guess and check. The Marmalade Quick comes with a simulator that you can run side by side with your code editor and a read.me window that helps with debugging. I’d write some code in Notepad++, run the simulator to see if it worked, and if needed looked at the read.me window to see what went wrong.
Through this slow process, I created a simple program by the end of the week. It looked much like how I’m imagining the end game to be. In landscape orientation, we have a wood-colored background with a orange piece of salmon and green square of seaweed peeking out from the top of the screen. Later, I’ll work with our design intern and we’ll create more complex images that can be pulled into the program as “sprites” instead of just colored rectangles.
Using tweening, I made the program move the seaweed from the side to the center of the screen, and then following move the salmon on top of the seaweed. This may seem pretty lame, but it was exciting to me that I made code that did something! After the previous week of getting nowhere, this was a nice achievement to have.
The one thing I couldn’t figure out was how to make the objects respond to touch. You see, right when you opened the program the animations would automatically start. What I had in mind was for the player to press the salmon or the seaweed before it would move. I could not figure out how to make it work on Friday, but I wasn’t worried. At least I had figured out how to code. I could spend time on it next week.
So, not too shabby of a week. I actually got some things done and can now start working on the development of the game. My next step is to incorporate touch events from the user to manipulate the game.
Again, sorry with all the late posting. This post refers to the immediate week after Week 2, July 7th – 11th.