I've been following a tutorial on explodingrabbit.com about making a platformer. I've learned a lot about love2d and am enjoying it so far. I want to expand the game I have and add things to it.. trouble is.. I don't know where to start out... and I only know a little bit. I would think I have to add some stuff to the Player.lua file for abilities and stuff but I'm really not too sure. I'll post the love file because this is what I have so far. This is a learning experience from me and I'd appreciate it if you would give me a hand in learning how to add:
some kind of health system, damage, baddies and a way to send my character back to start if I fall off the map. I'm using the AdvancedTileLoader as that is the best way to make maps for myself.
(x, left, right) = controls.
Adding health, damage, baddies and powerups to my game.
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Adding health, damage, baddies and powerups to my game.
- Attachments
-
- mygame.love
- (120.83 KiB) Downloaded 157 times
- Jasoco
- Inner party member
- Posts: 3727
- Joined: Mon Jun 22, 2009 9:35 am
- Location: Pennsylvania, USA
- Contact:
Re: Adding health, damage, baddies and powerups to my game.
Just think of your player (And enemies and everything else) as an object. Your player might be set up as a table like this:
Code: Select all
player = {
name = "Jason",
health = 10,
power = 2,
armor = 10,
lives = 3,
coins = 99,
etc = "and so on..."
}
Who is online
Users browsing this forum: Semrush [Bot] and 5 guests