Hello Anon, Login?
Notice: This is a mirrored post from /lua.

After reading through the massive wall of text, I'm changing my approach to this whole "learning through detailed blogging". Instead, I'll just be summarising what I achieved at the end of the lesson and then point you to my latest code commits.

They've got a pretty nifty commenting system on bitbucket so it will be much easier to follow the changes I've made and how.

Not to say that my original approach was superfluous, not at all. It has seeded my understanding of this whole process which has steadily improved each time I re-read my posts but I think, at this moment right now - I may be fluent enough to 'decode' lua when I see it. At least up to the point that I am able to.

And so, today I have added quite a chunk of things to the code base; mostly the interaction between the enemies and just tightening the collision on level 3. It's mostly tweaking numbers.

You can view my latest commit here - https://bitbucket.org/xixs/gamecakejam/commits/f21ca5cf05956b6e80c9bd859da81aa73e847754

They should be easy enough to understand but here, in no particular order, are the new bits I've added:

  • Added a waves function - This adds one more enemy to the new wave (level) with 5 being the base. So at level 20, there are 25 enemies.
  • Changed enemies formation to random - There is now a rather small but specific area offscreen for the enemies to start coming down from. The rules (random+collision) make for interesting dispersal formations.
  • The hero can only shoot enemies that are within the screen.
  • Enemies will only shoot when they are on screen but I have also removed bullets offscreen.
  • I have limited the bullet directions from the enemies to mostly down instead of those crazy diagonal bullets of death.
  • Enemies now bounce back when they move beyond the bounding area (512x768) and also off each other when they are close enough.
  • I have also tightened collision between the hero and enemy bullets so it's harder to hit the hero. This also makes for fun close encounters during dodging.

Here is an in-game capture so you can hopefully, see what I've done up to this point. Pardon the lack of music and/or horrible graphics.