Esc = yes. q = no. It's too close to "a", which is used in the game.miko wrote: Nice start! Please add "quit" option after pressing ESC and/or "q". BTW, this should be the first thing implemented in any game
Masai WIP - the birth of a platformer
- kikito
- Inner party member
- Posts: 3153
- Joined: Sat Oct 03, 2009 5:22 pm
- Location: Madrid, Spain
- Contact:
Re: Masai game - the birth of a platformer
When I write def I mean function.
Re: Masai game - the birth of a platformer
Always use Ctrl + q instead of just q, which is too easy to hit by mistake.
My game called Hat Cat and the Obvious Crimes Against the Fundamental Laws of Physics is out now!
Re: Masai game - the birth of a platformer
your first post you say iterate instead of irritate...
is that a joke of my spelling mistake in my code when i writed irritations instead of iterations :0?
is that a joke of my spelling mistake in my code when i writed irritations instead of iterations :0?
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: Masai game - the birth of a platformer
Interesting. Still has a long way to go. I'd suggest adding support for arrow keys, and making up and W make the player jump.
Most definitely, yes.GijsB wrote:your first post you say iterate instead of irritate...
is that a joke of my spelling mistake in my code when i writed irritations instead of iterations :0?
Help us help you: attach a .love.
Re: Masai game - the birth of a platformer
I'm used to semicolons and parenthesis... it does make it easier for me to read it ;; Thanks, tentus for all the other tips, I really need to go through and neaten up my code - I didn't really plan anything, I just sorta added to the physics tutorial as I learnt new things. I'll be sure to use your tips when I get a chance to program again... perhaps next weekend =_=;tentus wrote:Finally, in Lua, you don't need semicolons on the end of lines, or parenthesis in if statements, unless you feel like it makes things easier to read. Saves a bit of typing in the long run and clears up the screen if you leave them out.
I want to use W and S to perform other functions, such as W to activate / use and S to crouch. I'm not quite sure yet, maybe E to use. Eventually ,hopefully in the not too distant future, I'll make it configurable. Then everyone can have the key combinations that they want ;;Tesselode wrote:I think using W to jump would be better, since it's not like you need W and S to move forward and backward. However, that's only if you have to use the mouse to aim the weapon. If it just shoots in 1 or 2 directions, using the arrow keys for movement and one button for shooting would be much better.
- Attachments
-
- masai.love
- (38.34 KiB) Downloaded 85 times
- tentus
- Inner party member
- Posts: 1060
- Joined: Sun Oct 31, 2010 7:56 pm
- Location: Appalachia
- Contact:
Re: Masai game - the birth of a platformer
Haha, I getcha. I'm used to PHP, it took me a while to get used to Lua's little niceties.Cantide wrote:I'm used to semicolons and parenthesis... it does make it easier for me to read it ;; Thanks, tentus for all the other tips, I really need to go through and neaten up my code - I didn't really plan anything, I just sorta added to the physics tutorial as I learnt new things. I'll be sure to use your tips when I get a chance to program again... perhaps next weekend =_=;
Don't forget to move love.keypressed out of love.update in your next version. Also, this code:
Code: Select all
if not (paused) then
paused = true;
else
paused = false;
end
Code: Select all
paused = not paused
Kurosuke needs beta testers
Re: Masai game - the birth of a platformer
tentus, thanks! I've neatened it up a little bit now. I also use PHP - I've been using LUA for just over 2 weeks now, and I've not once looked at a LUA programming guide - I'm just trying things ( '!running' failed, and I didn't think of trying 'not running' ) I've learnt LUA from the LÖVE2d wiki
I'd really like to separate my code and move it into different files, but I've no idea how to do that with LUA. I think I'll need to use 'require' ... but I've never been any good at OOP If I move love.keypressed out, where on earth will I put it?!
I'd really like to separate my code and move it into different files, but I've no idea how to do that with LUA. I think I'll need to use 'require' ... but I've never been any good at OOP If I move love.keypressed out, where on earth will I put it?!
- Attachments
-
- masai.love
- Slightly updated ^^;;
- (38.26 KiB) Downloaded 104 times
- tentus
- Inner party member
- Posts: 1060
- Joined: Sun Oct 31, 2010 7:56 pm
- Location: Appalachia
- Contact:
Re: Masai game - the birth of a platformer
Put love.keypressed at the root level, just like how love.update and love.draw.
Require in Lua works pretty much like it does in PHP. You can use it to organize code into logical chunks, but to do OOP stuff, you'll want to use something like SECS.
Require in Lua works pretty much like it does in PHP. You can use it to organize code into logical chunks, but to do OOP stuff, you'll want to use something like SECS.
Kurosuke needs beta testers
Who is online
Users browsing this forum: Bing [Bot] and 0 guests