A Platformer With Love!

Show off your games, demos and other (playable) creations.
Post Reply
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

A Platformer With Love!

Post 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 1203 times
jump_game.love
Version 1 -- very first version
(32.92 KiB) Downloaded 632 times
Last edited by Robin on Mon Nov 30, 2009 6:58 am, edited 8 times in total.
Help us help you: attach a .love.
User avatar
Gerrit
Prole
Posts: 46
Joined: Wed Mar 25, 2009 7:40 pm

Re: A Platformer With Love!

Post 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
User avatar
Evil Telephone
Prole
Posts: 36
Joined: Fri Jan 30, 2009 9:31 pm

Re: A Platformer With Love!

Post 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
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: A Platformer With Love!

Post 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
Attachments
jump_game.love
Fixed require
(32.89 KiB) Downloaded 404 times
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: A Platformer With Love!

Post 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.
Help us help you: attach a .love.
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: A Platformer With Love!

Post 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
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: A Platformer With Love!

Post 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).
Help us help you: attach a .love.
User avatar
rude
Administrator
Posts: 1052
Joined: Mon Feb 04, 2008 3:58 pm
Location: Oslo, Norway

Re: A Platformer With Love!

Post by rude »

Should probably fix that issue with require().

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

amirite?
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: A Platformer With Love!

Post by bartbes »

Is the way lua implements it, so just map it to PhysicsFS, indeed.
osuf oboys
Party member
Posts: 215
Joined: Sun Jan 18, 2009 8:03 pm

Re: A Platformer With Love!

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

Who is online

Users browsing this forum: No registered users and 1 guest