hey mr swaine i bet you love this journal entry ;)
Tuesday, 24 February 2015
Formative one - Week 3
This week we had to make a game on our own to see how much we've learnt. It was essentially the crab game but solo coded, so not much new was added. I attempted to make a code that made the foe characters move at random increments, however the code seemed to have glitched and will not work. Hopefully next week I will be able to fix the code and get it to work. Turned in the Formative one on monday due to missing Friday for collage stuff.
Wednesday, 18 February 2015
Crab game - week 2
This week we learnt how to input key control into greenfoot, which can be used via the (Greenfoot.isKeyDown("left")); string or just move(); changing various variables can make you change the direction, and how fast/far the object you are controlling goes.
Greenfoot in general is a finicky program, and code strings are caps sensitive. simply typing iskeydown will result in a syntax error, so be careful when typing out new code.
Creating a new world/actor class is as simple as right clicking on the respective hub class and selecting new subclass. you can set a picture and name it in the pop up window. Not much else to say on this.
Other important strings
Greenfoot.getRandomNumber() - generate a random number between 0 and the number in brackets.
super(560, 560, 1); - this creates the size of the world, and how big the pixels in it are.
Personally, I'm enjoying this so far. the code is similar to VB so its relatively easy to pick up for me, so thankfully I'm not super far behind due to multiple technical difficulties and various at home problems. I'm excited for more next week.
Greenfoot in general is a finicky program, and code strings are caps sensitive. simply typing iskeydown will result in a syntax error, so be careful when typing out new code.
Creating a new world/actor class is as simple as right clicking on the respective hub class and selecting new subclass. you can set a picture and name it in the pop up window. Not much else to say on this.
Other important strings
Greenfoot.getRandomNumber() - generate a random number between 0 and the number in brackets.
super(560, 560, 1); - this creates the size of the world, and how big the pixels in it are.
Personally, I'm enjoying this so far. the code is similar to VB so its relatively easy to pick up for me, so thankfully I'm not super far behind due to multiple technical difficulties and various at home problems. I'm excited for more next week.
Subscribe to:
Posts (Atom)