What happened today:
Graphics
- Tried creating stink bug graphics that changed direction. It all went a bit odd looking. I've decided to do the sprite tutorial so I can make some - probably on the weekend.
- Set up explosions for bird and dying encounters using sound and graphics in the GameMaker resources folder. Needs proper stuff soon
- Had a problem at first. When I pressed Z all the stink bombs went off. Realised i needed to set it to key press event instead of keyboard event.
- The stink bomb didn't seem to be repelling the farmer properly. It seemed to work when it went off to the side, but not when the farmer was below the bug. Didn't work at all with the bird. Tried changing the stink bomb to solid, but that didn't work. Maybe I need to make it a larger sprite, with a larger hit area?
- Went back and looked at the collision events in the stink bomb - with the farmer set it to reverse horizontal direction; with the farmerSpray changed instance to farmerRun; with birds, set it to change instance to the opposite direction bird and fly at a speed of 6 in the appropriate direction. It all went horribly wrong. The bird either pushed the bomb out of the way and still exploded the bug or the bird became the stink bomb and flew off! V Funny. Tried moving the collision event to the bird, but it just made the bird bounce off the bomb (instead of flip around and fly off). It not only kept going in the same direction, after that the farmer was frozen and birds stopped appearing. So I changed the collision event instructions on the bird. i first destroyed the instance, created the opposite bird and instructed to fly away. This seemed to work (except everytime a stink bomb is let off the next bird due out made the sound but didn't appear - not sure why...) Rolled out similar instructions for the other bird, the two farmer states and the bug spray object (now also disappears if comes into contact with the stink bomb, so the farmer can't spray you after you've set one off) - I set them all up in the other object (not the stink bomb) and all is going well.
- I made two bird objects one for flying left to right, the other right to left, and assigned each a separate path, so between them the tops of the trees are pretty much covered. I made it so at the end of the path event the incidents were destroyed.
- I then set up a controller bird, which I assigned to a timeline, which I used to launch a bird from alternating sides of the orchard over the course of approximately 5-6 mins (what I estimate a level to take). I picked about every 1000 steps - as it's an entry level, I don't want players bombarded yet...
- I changed it so the xy coords for the farmer shifted to the top of hi head instead of the side, which made for a more logical spray pattern.
- Sometimes the spray wasn't appearing when the farmer changed into farmerSpray. i realised that happened if the bug got hit immediately. This was a bit confusing. I think I need to keep the spray on the screen even after a hit - but how to stop it from constantly deducting points while the bug is in the spray area? Could I set up an invisible object that sits underneath the bug spray sprite, that is the 'hit area' and leave the spray sprite just decorative? That way I could make the active hit area disappear and leave the visible sprite? Might to do list that one...
- Manged to get it working - in one spot. The problem was, by moving the creation of the stink bomb variable to the controller_life object, the Z key stopped working! I realised I needed to move the Z key press event instructions to the controller_life object (I now know that variables you make up only have very limited reach!)
- Took a while to work out what they meant by using view_yview to reference the scoreboard sprite to. Got that working, tried to roll it out to the score etc, but they all just bunched in the corner. Realised I needed to write the expression as view_yview+32 etc - and everything worked bang on! Looks great now. When I have time, I'll make smaller graphics for the lives (have it set numerically at the moment)
- With the collision with the bird, all worked perfectly. Set it so on collision, the bug spray, bird, farmer all destroy incidents and reset at start positions, plus I set it to reset health to 100 and i was away
- The running out of health was less straight forward. It started flipping out - there were two bugs, the scoreboard disappeared and the caption blurred.
- I realised in the No More Health event, I had it set to destroy instance of self (i.e the controller_life - derr!). i changed it to play the explosion sound, change the instance of the bug to the explosion, then it just followed the explosion instructions (which were the bird ones, which worked fine!). The health, life tally and start positions kicked in perfectly
- In order to make moving around draining on health, I added a negative health score to the arrow key events. In order to make sure players were discouraged from just sitting around, I added a negative health step in to the bug. I then spent ages tweaking the effect the oranges had on health, versus the amount that was being drained during flight or hover. The most annoying thing about the process was the need to change 8 different orange objects to test it each time (I'm sure there's a short cut for what I've done! Damn my coding ignorance!)
- Ended up with -0.01 health for hovering, -0.05 for each step moving (you move quite a bit across 8 trees) and 0.15 per orange point (i.e. 10 points in an orange = 1.5 health points). This seemed to give a player enough to fly around and come back a bit if hit by the farmer spray once (-20 health points). I wanted to make it a challenge to fly around and stay alive without running out of energy.
- With this configuration, 10 oranges per tree works (I was thinking it was too many, too easy before)
- I had a chance to playtest quickly tonight (I decided to focus on the control system and instructions - there really aren't enough game elements in yet to make it very interesting). Just before I did, I was playing it and realised that the oranges were all reappearing in the bottom half of the tree. i had a look and think about my code and realised my mistake. I was referencing the oranges to appear at a random point up to 113 from the x of the tree and 115 from the y of the tree. But what about the minus 113 or 115 coordinates? That left the dangerous top half of the tree bare! I quickly went through and changed the xy point on the trees to be at the top left of the object. I then changed the code on a tree to obj_tree1.x+random(226) and obj_tree1+random(230) which covered the whole tree and scattered the oranges just fine. I copied and pasted that thought all 8 trees. At the end of the playtest session I realised all the oranges ended up back in the first tree! I'd forgotten to change the tree reference numbers! That's what you get for rushed late night coding :-)
- Wrote a brief set of instructions/game premise. Included it in the game info section, can access it with F1
- Change the tree reference in all orange objects
- Work out why the birds aren't appearing after a stink bomb goes off
- set up the invisible stink bomb the length of the room in order to repel all objects etc around it - create it as part of the create event for the stink bomb and centre on the x of the stink bomb and y = 0
- Set up invisible farmer spray so don't' need to get rid of graphic on contact
- Sort out sounds (including background sound) I think it will make such a difference to the game!
- Do the sprite tutorial and create own sprites
- set up bonus oranges. Two ideas 1) Mature oranges - after 60 secs, oranges 'mature' and are worth 15 points - but they only last 10 secs in this state, then they naturally die/expire if not eaten. 2) bonus stink bombs. Not sure if they will look normal, but as the player licks on the orange, it has different sound or pulses a different colour? Or maybe they look different but only last on the trees for a short time? Either Way, use a timeline to set up their appearance
- Do i want to set it up so the oranges die right after they've started being eaten (i.e. if the bug doesn't eat them in one go). How hard would it be to set up (a key release event?) Will it actually ad anything to the game play/premise?
- Set it up to get new bonus lives at 5000
- Make new levels and work out a transition scene, times, scores etc
- Set up a timer/count down to the end of the level? Time pressure add drama?
- Set up intro page/links to instructions or start game? Levels?
- Make it so you get deducted points if you hit the farmer? Make it worth more to be wary of him?
No comments:
Post a Comment