Hi!!
This is my first post on the forum, although I've been trolling IRC for a week or two now, so I'll try not to 'iterate' anyone
I've started a simple platformer which will revolve around jumping, and will be mostly vertical.
I'm using love.physics a lot.
I've yet to figure out how to manage my code when it gets a little bigger, so levels / level design will follow when I get that figured out >.<
use 'a' and 'd' to move left and right, and 'space' to jump.
right click to throw a spear - (difficult to master...)
left click to jab - (a little faulty...)
the attacks seem to bug out if you're in the air and you aim down 30 degrees or so... maybe a handy exploit? u_u
A thousand thanks to everyone on IRC for helping me with my horrible mathematics Without your help, I wouldn't have gotten this far!
http://dl.dropbox.com/u/36318710/masai.love
Masai WIP - the birth of a platformer
Masai WIP - the birth of a platformer
- Attachments
-
- masai.love
- Working spear, parallax backgrounds
- (195.65 KiB) Downloaded 189 times
-
- masai.love
- Just in case my dropbox link isn't working, although this file may be outdated ( i'm too lazy to log in all the time and edit this post )
- (75.4 KiB) Downloaded 159 times
Last edited by Cantide on Sat Aug 13, 2011 7:35 am, edited 14 times in total.
- nevon
- Commander of the Circuloids
- Posts: 938
- Joined: Thu Feb 14, 2008 8:25 pm
- Location: Stockholm, Sweden
- Contact:
Re: Masai game - the birth of a platformer
It seems the player loses momentum as soon as they land. That may be realistic, but it doesn't feel very "platformery".
Re: Masai game - the birth of a platformer
I know, it actually 'bugs' me quite a bit! I'm not quite sure how to fix it though. It's got to do with the physics. The player bounces slightly, and can't move as quickly until the collision with the ground persists, i.e. he stops bouncing.nevon wrote:It seems the player loses momentum as soon as they land. That may be realistic, but it doesn't feel very "platformery".
If anyone can fix this, please let me know
I'm also aware of the fact that you can 'climb' the grey platforms by tapping jump while the collision persists. This is a rather handy bug, which could be done away with with some better level design.
These aren't bugs, they're unintentional features! ;;;
- slime
- Solid Snayke
- Posts: 3161
- Joined: Mon Aug 23, 2010 6:45 am
- Location: Nova Scotia, Canada
- Contact:
Re: Masai game - the birth of a platformer
You are a true programmer.Cantide wrote:These aren't bugs, they're unintentional features! ;;;
Re: Masai game - the birth of a platformer
Hey, you finally made it to the forums!
Yeah, the physics are a bit wonky but I'm sure you can adjust that. Making collision and physics play nice without Box2D is HARD. I hope you have fun building your game!
Yeah, the physics are a bit wonky but I'm sure you can adjust that. Making collision and physics play nice without Box2D is HARD. I hope you have fun building your game!
Re: Masai game - the birth of a platformer
Thanks must go to bartbes for pointing out that I should use a restitution of 0 for both the player and the ground if I want to eliminate the bounce.
Still, I think it's a handy effect for different surface types like mud. I'll implement it later when I actually get that far :p
Still, I think it's a handy effect for different surface types like mud. I'll implement it later when I actually get that far :p
Re: Masai game - the birth of a platformer
What's with the awkward control scheme?
- 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
WASD+Space, sans the WS.Tesselode wrote:What's with the awkward control scheme?
I like what you've started Cantide. Some tips:
Code: Select all
if (b == "player") then
if (a == "static") then
Code: Select all
if b == "player" and a == "static" then
Code: Select all
if facing == "right" then
love.graphics.draw(masai_torso, objects.ball.body:getX(), (objects.ball.body:getY() - 20), 0, 1, 1, 10, ypos_torso);
love.graphics.draw(masai_head, objects.ball.body:getX(), (objects.ball.body:getY() - 25), 0, 1, 1, 0, ypos_torso);
love.graphics.draw(masai_foot, objects.ball.body:getX(), (objects.ball.body:getY()), 0, 1, 1, 3 + xpos_foot1, -8 + ypos_foot1);
love.graphics.draw(masai_foot, objects.ball.body:getX(), (objects.ball.body:getY()), 0, 1, 1, 3 + xpos_foot2, -8 + ypos_foot2);
elseif facing == "left" then
love.graphics.draw(masai_torso, objects.ball.body:getX(), (objects.ball.body:getY() - 20), 0, -1, 1, 10, ypos_torso);
love.graphics.draw(masai_head, objects.ball.body:getX(), (objects.ball.body:getY() - 25), 0, -1, 1, 0, ypos_torso);
love.graphics.draw(masai_foot, objects.ball.body:getX(), (objects.ball.body:getY()), 0, -1, 1, 3 + xpos_foot1, -8 + ypos_foot1);
love.graphics.draw(masai_foot, objects.ball.body:getX(), (objects.ball.body:getY()), 0, -1, 1, 3 + xpos_foot2, -8 + ypos_foot2);
end
Code: Select all
local ballX, ballY = objects.ball.body:getPosition()
local facing_sign = 1
if facing == "left" then
facing_sign = -1
end
love.graphics.draw(masai_torso, ballX, (ballY - 20), 0, facing_sign, 1, 10, ypos_torso)
love.graphics.draw(masai_head, ballX, (ballY - 25), 0, facing_sign, 1, 0, ypos_torso)
love.graphics.draw(masai_foot, ballX, (ballY), 0, facing_sign, 1, 3 + xpos_foot1, -8 + ypos_foot1)
love.graphics.draw(masai_foot, ballX, (ballY), 0, facing_sign, 1, 3 + xpos_foot2, -8 + ypos_foot2)
If you change canRun (a boolean) to something like runSpeed (a number) you can remove some if statements and also allow for more options in the future.
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.
Kurosuke needs beta testers
Re: Masai game - the birth of a platformer
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.
Re: Masai game - the birth of a platformer
Nice start! Please add "quit" option after pressing ESC and/or "q". BTW, this should be the first thing implemented in any gameCantide wrote:Hi!!
This is my first post on the forum, although I've been trolling IRC for a week or two now, so I'll try not to 'iterate' anyone
My lovely code lives at GitHub: http://github.com/miko/Love2d-samples
Who is online
Users browsing this forum: Google [Bot], Semrush [Bot] and 3 guests