Page 1 of 8

A Platformer With Love!

Posted: Fri Mar 27, 2009 2:29 pm
by Robin
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 :ultrahappy:) you can collect, double as "lives".

EDIT: Version 7 is at http://love2d.org/forum/viewtopic.php?f ... t=60#p9491
jump3.love
Version 3 -- very old version
(115.2 KiB) Downloaded 1209 times
jump_game.love
Version 1 -- very first version
(32.92 KiB) Downloaded 635 times

Re: A Platformer With Love!

Posted: Fri Mar 27, 2009 2:48 pm
by Gerrit
Looks great :) Made a screen so the others will now how it looks. I had to change your "require" in main.lua from "clouds" to "clouds.lua" to get it running though. Now just some more levels & obstacles and you have a small game.

Image

Re: A Platformer With Love!

Posted: Fri Mar 27, 2009 3:04 pm
by Evil Telephone
I get an error. It appears to be missing a bunch of files or something.

clouds.lua
init.lua
clouds.dll
loadall.dll

Re: A Platformer With Love!

Posted: Fri Mar 27, 2009 3:18 pm
by bartbes
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

Re: A Platformer With Love!

Posted: Fri Mar 27, 2009 3:18 pm
by Robin
Gerrit wrote:Looks great :)
Thanks!
Gerrit wrote:I had to change your "require" in main.lua from "clouds" to "clouds.lua" to get it running though.
Ah, yes. I keep forgetting that. It will be fixed in the next version.

Edit: already fixed.

Re: A Platformer With Love!

Posted: Fri Mar 27, 2009 3:38 pm
by bartbes
Robin wrote:Edit: already fixed.
You mean.. I did that for nothing? (I see a different file size, so in your post you're not using my fix) :cry: :P

Re: A Platformer With Love!

Posted: Fri Mar 27, 2009 3:42 pm
by Robin
bartbes wrote:
Robin wrote:Edit: already fixed.
You mean.. I did that for nothing? (I see a different file size, so in your post you're not using my fix) :cry: :P
:rofl: 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).

Re: A Platformer With Love!

Posted: Fri Mar 27, 2009 5:06 pm
by rude
Should probably fix that issue with require().

require("some.thing.awesome") -> some/thing/awesome.lua
require("awesome") -> awesome.lua

amirite?

Re: A Platformer With Love!

Posted: Fri Mar 27, 2009 7:14 pm
by bartbes
Is the way lua implements it, so just map it to PhysicsFS, indeed.

Re: A Platformer With Love!

Posted: Sat Mar 28, 2009 11:56 am
by osuf oboys
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.

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
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.