Lunar Penguin
Ludde the Lunar Penguin wishes to go to that mysterious ball in the sky called The Moon. Unlike other birds, Ludde cannot fly by flapping his wings, and so he sets off to collect helium balloons spread out across The North Pole.
Project Backstory
This game was taken on one to two weeks ago to show that it is in fact relatively easy to make platformers with LÖVE. It took about two days to implement the basics and another two for pretties and tweaking. I intended to add more features, such as enemies, projectiles, an overmap, and switches, but I'm caught up in other projects for the time being (artificial intelligences also needs LÖVE).
There are only five levels, all moderately difficult. The map format is simple though, so feel free to make your own and post in this thread.
Controls
Left/right: Move left/right.
Space/up: Jump.
Down: Stand still.
Up/down/return/enter/spacebar/: Navigate menus.
p: Toggle pause.
s: Toggle sound.
Design Choices
I have in this project chosen to represent the main entity as a circle along with the physics associated with this choice. This gives some interesting features that suited the setting of the game. If you aim at something more similar to the usual platformer games, e.g. super mario, then you will want to add considerable angular damping, air control, straight-upwards jumps, jump when a key is pressed rather than being held in, more gravity, more impulse in jumps, and possibly a rectangular shape or polygon for the character. (post about this and I will finish the polygon-polygon distance part).
Technical Details
Jumping is done by computing the nearest point on any other shape that the jumping entity can collide with. If the distance is small enough, jumping is permitted and the jumping angle is computed based on the relative location of the nearest points of the shapes (the angle is modified somewhat towards jumps straight up). CAMERA is used for scrolling and avoiding off-screen drawing. I will try to release the interesting parts of the project as a quick and easy platformer module. If you wish to do so, go ahead!
License
Feel free to use any or all parts for whatever you please. If you have any questions about the source, do ask. LPCL with myself as community - clauses to be invoked at any time. The exceptions to this are the penguin and balloon images, which I have downloaded from http://www.spriters-resource.com.
To Do (Possibly)
Reduce lag. Enemies. Special balloons. Flying/falling ice taps and snow balls. Items. Overworld/map. Reduce lag for levels with huge platforms (next LÖVE?). Cannons (for pun[dit/doh]). Title screen. An opening and an ending. Replace penguin and balloon images.
Comments and suggestions most welcome!
Download: http://www.nanosleep.net/love/loves/123 ... nguin.love
Lunar Penguin (Platformer)
-
- Party member
- Posts: 215
- Joined: Sun Jan 18, 2009 8:03 pm
Lunar Penguin (Platformer)
Last edited by osuf oboys on Sun Mar 01, 2009 11:21 pm, edited 2 times in total.
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.
Re: Lunar Penguin (Platformer)
Super neat! : I could never get the hang of making a decently working Box2D-powered platformer, but it looks like you did just that! Very cute game. I actually thought I could fly the first time so I tried that and failed.
Two things, though:
1) The first time I grabbed the second balloon in the second level it flipped out and flew to the left, where I nudged it.
2) The level with the many falling platforms is pretty frustrating, mostly because it's seemingly random how the penguin skips around and you don't have much control over it.
But other than that, I liked it. Great job!
Two things, though:
1) The first time I grabbed the second balloon in the second level it flipped out and flew to the left, where I nudged it.
2) The level with the many falling platforms is pretty frustrating, mostly because it's seemingly random how the penguin skips around and you don't have much control over it.
But other than that, I liked it. Great job!
-
- Party member
- Posts: 215
- Joined: Sun Jan 18, 2009 8:03 pm
Re: Lunar Penguin (Platformer)
1. In this game, holding spacebar makes you jump as soon as you're near anything at all, including balloons. It should probably be changed to jumping only when spacebar is pressed and to have the jump take into account the inertia of the other object.Skofo wrote:Super neat! : I could never get the hang of making a decently working Box2D-powered platformer, but it looks like you did just that! Very cute game. I actually thought I could fly the first time so I tried that and failed.
Two things, though:
1) The first time I grabbed the second balloon in the second level it flipped out and flew to the left, where I nudged it.
2) The level with the many falling platforms is pretty frustrating, mostly because it's seemingly random how the penguin skips around and you don't have much control over it.
But other than that, I liked it. Great job!
2. Not sure what to do about this except starting with easier levels. The handling feels natural to me but I've been doing a lot of debugging and gotten used to the system. Some pointers: Running over the falling blocks can cause the penguin to bounce over some platforms. Pressing space just before you've landed produces a weaker jump than if you have landed (but can be used in other situations for multiple jumps). You have very little air control, whatever speed you need, you need to accumulate before leaving the ground, e.g. by landing at one end of a platformer and running to the other. The jumping angle depends on the relative direction of the surface, e.g. jumping at the corners of the blocks produces jumps that are longer but not as high. Such jumps are not necessary to complete the level though. Overall, I think the third level should be relatively easy, save for getting the balloon, if one slows down to match the platforms and acquire some speed before jumping again.
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.
- qubodup
- Inner party member
- Posts: 775
- Joined: Sat Jun 21, 2008 9:21 pm
- Location: Berlin, Germany
- Contact:
Re: Lunar Penguin (Platformer)
I !love games where i am having !fun with the controls.
I'm friendly
I'm friendly
lg.newImage("cat.png") -- made possible by lg = love.graphics
-- Don't force fullscreen (it frustrates those who want to try your game real quick) -- Develop for 1280x720 (so people can make HD videos)
-- Don't force fullscreen (it frustrates those who want to try your game real quick) -- Develop for 1280x720 (so people can make HD videos)
Re: Lunar Penguin (Platformer)
Nice game.
Re: Lunar Penguin (Platformer)
Cute and difficult. How do you get the special ballon on the first level?
Lag?
Lag?
-
- Party member
- Posts: 215
- Joined: Sun Jan 18, 2009 8:03 pm
Re: Lunar Penguin (Platformer)
Thanks.rude wrote:Cute and difficult. How do you get the special ballon on the first level?
Each balloon offers some lift force but also some air resistance (damping). There are two ways to get the yellow balloon. Careful timing allows you to jump to the yellow balloon using the spinning platforms to catapult yourself or a tall corner. This is easiest done without the two balloons. The combination of lift force, air control, and balloons hitting the platforms allows you to climb walls by holding space if you have at least one balloon (most efficient at two, no more). You will have to let go of the jump key when you reach the top though, or you will jump off again.
On windows, I don't experience any lag for normal use, but on linux, it lags too and from. In particular the fourth level, where I draw images stretched across most of the screen. Also, if I close and start LÖVE apps enough times (or LaTeX with blending in PGF pictures), it seems something happens and the CPU consumption of X becomes large even for seemingly trivial tasks.Lag?
Does anyone else experience lag?
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.
Re: Lunar Penguin (Platformer)
the game is nice, but difficult, and it lags a bit, I mean it's not very responsive and adding to the difficulty.
And is it possible to have the main sprite not blurry?
And is it possible to have the main sprite not blurry?
-
- Party member
- Posts: 215
- Joined: Sun Jan 18, 2009 8:03 pm
Re: Lunar Penguin (Platformer)
Could you elaborate on the "not very responsive part"? I'll make a few easier levels, but if anyone wishes to make some of their own, I'd be grateful for that. The level format is pretty simple.farvardin wrote:the game is nice, but difficult, and it lags a bit, I mean it's not very responsive and adding to the difficulty.
Code for the first level (not tile-based, I simply used integer coordinates):
Code: Select all
-- Map name, width, height
local mp = map.new("Elevator", 1000, 300)
mp.music = "joy"
function mp.onLoad(self)
map.onLoad(self)
-- Penguin starts at 0,1 is has width and height 2. Positive y is upwards.
self:addMessage("Game Name", 3, "~ Ludde the Lunar Penguin ~")
--self:addMessage("Backstory", 15, "Ludde wants to go to the moon but he cannot fly.")
--self:addMessage("Objective", 15, "Objective: Aid Ludde by collecting the balloons lost in the traitorous icelands.")
-- map, x, y, width, height
makePlatform(self, 0, 0, 12, 2)
-- We create four platforms with different starting positions in the animation.
-- The first (0) is at 1, i.e. starting with phase 1.
-- The second (1) is at 1.25, i.e. 25% done with phase 1.
-- The third (2) is at 1.5, i.e. 50% done with phase 1.
-- The fourth (3) is at 1.75, i.e. 75% done with phase 1.
-- Since leaving phase 2 teleports to phase 1, the platforms are evenly spread out in the animation.
for i = 0,3 do
-- map, width, height, starting position in animation, animation speed and animation definition
makeMovingPlatform(self, 12, 2, 1 + 0.25 * i, 3, {
-- First animation phase. We immediately teleport to this location without moving through the space inbetween.
{x=12, y=20,angle=0,teleportTo=true},
-- Second animation phase.
{x=12, y=-20,angle=0}
} )
end
makePlatform(self, 28, 0, 10, 2,0)
-- Common balloon, collides with platforms.
makeBalloon(self, 28, 4, "Common Balloon", true)
for i = 0,1 do
makeMovingPlatform(self, 10, 2, 1 + 0.5 * i, 5, {
{x=42, y=15,angle=0,teleportTo=true},
{x=42,y=-15,angle=0}
} )
makeMovingPlatform(self, 10, 2, 1 + 0.5 * i, 5, {
{x=56, y=-15,angle=0,teleportTo=true},
-- Note how we left "angle" out here.
{x=56, y=15}
} )
end
makeBalloon(self, 49, 20, "Common Balloon", true)
makePlatform(self, 68, -10, 8, 20)
makePlatform(self, 68, 18, 8, 20)
makeBalloon(self, 68, 30, "Special Balloon", true)
-- Next level is "Jump" and you need two balloons to use the exit.
makeLevelExit(self, 68, 1, 1.5, 1.5, "Jump", 2)
end
Not that I know, all scaled images are blurred (which is preferable in some situations and not preferable in others). I could rescale it in an image program and use that if you would prefer.And is it possible to have the main sprite not blurry?
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.
Re: Lunar Penguin (Platformer)
you often feel like to press very much on the keyboard to make the penguin run faster, jump higher... It gives the feeling there is much inertia.Could you elaborate on the "not very responsive part"?
I generally find blurry pixel art quite ugly. Could you (or Löve) consider using those algorithms?I could rescale it in an image program and use that if you would prefer.
http://en.wikipedia.org/wiki/Pixel_art_ ... algorithms
http://scale2x.sourceforge.net/index.html
It looks pretty neat for this kind of games!
You can also simply resample the sprites.
Here is a conversion I made with the scale2x program (last one, while the second one is a normal blurry version):
Who is online
Users browsing this forum: Bing [Bot] and 0 guests