To celebrate my birthday, I thought I would share something with you guys! And having recently heard (again) that most of our codes weren't very easy to read, I thought I would share some readable code !!
I might do others of these in the future if you like it! But feel free to make some of your own, I'm sure it will help the community a lot!
Here is today's subject: Balloons That Explode Into More Balloons
And here is the commented code! (click to unravel)
Here is the complete code you can copy-paste into your own Pico-8 more easily! The comments are formated so they're easy to read even in the Pico-8 editor!
(download the cart to have the SFXs or make your own!)
This is a good example of the way I tend to code in general! I'm using some sort of mixture between OOP and more linear programming because I think most people go too far with OOP, making simple things very complicated. But lots of people would very much disagree with me on this and my way to code is most definitely not the only one there is! It's probably not the best either but I'm well-placed to say it works fairly well!
If you have any questions, make sure to ask and I'll make sure to answer! (same for remarks about the code)
Otherwise, I hope you enjoy this and that it proves useful to at least some of you!
You can also follow me on Twitter here, I'm always cheerful and I tweet and retweet lots of GIFs of gamedev and animating stuff!
Have fun with Pico-8!!!
I've never been very good at understanding object-oriented code. However it appears to me you've gone through some extent to try and make it readable and can be understood.
I'll certainly take a good look at your code and comments and try to learn this concept.
So that's how you do that trails effect. So simple. Looks great.
"I'm using some sort of mixture between OOP and more linear programming because I think most people go too far with OOP."
Yeah I agree, particularly in small games. Nice thing about Lua is that you can choose to be as OOP or functional or procedural/imperative as you like.
[Please log in to post a comment]