It seems that we were behind on schedule with making platformers with LÖVE. Thus I present to you: a platformer made with LÖVE. Not the first one.
It uses my own Cloud library, has a few simple .png-images (original .svg included) and, best of all, is licensed under the "poetic license": MIT-style, but in the form of a poem. The images were inspired by this emöticon: . The "stars" (a bit like ) you can collect, double as "lives".
EDIT: Version 7 is at http://love2d.org/forum/viewtopic.php?f ... t=60#p9491
A Platformer With Love!
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
A Platformer With Love!
Last edited by Robin on Mon Nov 30, 2009 6:58 am, edited 8 times in total.
Help us help you: attach a .love.
- Evil Telephone
- Prole
- Posts: 36
- Joined: Fri Jan 30, 2009 9:31 pm
Re: A Platformer With Love!
I get an error. It appears to be missing a bunch of files or something.
clouds.lua
init.lua
clouds.dll
loadall.dll
clouds.lua
init.lua
clouds.dll
loadall.dll
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: A Platformer With Love!
Attachment! (Fixed the require statement)
@Evil Telephone
It misses clouds, lua searches for:
<path>/clouds.lua
<path>/clouds/init.lua
<path>/clouds.dll
<path>/loadall.dll
and a few others
@Evil Telephone
It misses clouds, lua searches for:
<path>/clouds.lua
<path>/clouds/init.lua
<path>/clouds.dll
<path>/loadall.dll
and a few others
- Attachments
-
- jump_game.love
- Fixed require
- (32.89 KiB) Downloaded 410 times
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: A Platformer With Love!
Thanks!Gerrit wrote:Looks great
Ah, yes. I keep forgetting that. It will be fixed in the next version.Gerrit wrote:I had to change your "require" in main.lua from "clouds" to "clouds.lua" to get it running though.
Edit: already fixed.
Help us help you: attach a .love.
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: A Platformer With Love!
You mean.. I did that for nothing? (I see a different file size, so in your post you're not using my fix)Robin wrote:Edit: already fixed.
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: A Platformer With Love!
I was busy with my post and my fix when you posted yours (and as to why the file size differs: I included some comments).bartbes wrote:You mean.. I did that for nothing? (I see a different file size, so in your post you're not using my fix)Robin wrote:Edit: already fixed.
Help us help you: attach a .love.
Re: A Platformer With Love!
Should probably fix that issue with require().
require("some.thing.awesome") -> some/thing/awesome.lua
require("awesome") -> awesome.lua
amirite?
require("some.thing.awesome") -> some/thing/awesome.lua
require("awesome") -> awesome.lua
amirite?
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: A Platformer With Love!
Is the way lua implements it, so just map it to PhysicsFS, indeed.
-
- Party member
- Posts: 215
- Joined: Sun Jan 18, 2009 8:03 pm
Re: A Platformer With Love!
For those that are curious: Jumping in this game is done by checking if the vertical velocity is exactly 0. This provides a simple solution provided there are no sloping surfaces that should be jumped from. The game does not use the physics engine but instead its own collision checking, which explains the support for platforms that can jumped through. This does not allow a player to jump in mid-air, save for one a million chances because of the precision of floating point numbers. Although, if collision is supported in the other direction, e.g. for tunnels, then it might be possible to hold jump to hang from a roof.
It seems a bit odd that it's possible to be on the platforms without standing on them, e.g. with the platforms through the body. How about adding if player.y > platform.y + 0.6 or the like as a check? Low FPS may cause the collision to fail as well as some unpredictability. Might I suggest that you instead store the dt value and update as many times as necessary with some constant dt, e.g.
LPCL mostly aims at community projects that are not really owned by anyone in particular or to which anyone may contribute, like a framework for making platformers. I'm not sure you want a personal game under that license since it also allows anyone to change the game and call it the game. At the very least, you'd want to put yourself as community so that you have the final word about what goes into the project.
It seems a bit odd that it's possible to be on the platforms without standing on them, e.g. with the platforms through the body. How about adding if player.y > platform.y + 0.6 or the like as a check? Low FPS may cause the collision to fail as well as some unpredictability. Might I suggest that you instead store the dt value and update as many times as necessary with some constant dt, e.g.
Code: Select all
local tdt = 0
def update(dt)
tdt = tdt + dt
while tdt >= 0.1 do
dt = 0.1; tdt = tdt - dt
...
end
end
If I haven't written anything else, you may assume that my work is released under the LPC License - the LÖVE Community. See http://love2d.org/wiki/index.php?title=LPC_License.
Who is online
Users browsing this forum: No registered users and 3 guests