Walk! Jump! Collect! - A Platformer Experiment (ver 2.1)

Show off your games, demos and other (playable) creations.
pelicano_o
Prole
Posts: 13
Joined: Sun Mar 09, 2014 1:44 am

Walk! Jump! Collect! - A Platformer Experiment (ver 2.1)

Post by pelicano_o »

Hi people in the Love community :awesome: You can ignore my 'blabbering' by skipping my next 2 paragraphs.

This is my first topic. So I first came to know Love2D about 6 months ago. After I familiarised myself with the basics with the awesome tutorials by a lot of people, I started to experiment with my first platformer. I like platformers. for online multiplayer games, I particularly enjoy Maplestory. I also liked the Mario series and Mega Man when I was a very very small kid. I particularly enjoy games with a meaningful story element to it. Currently, my favourite games include Aquaria and Seasons( made by Joris Dormans ). So the reason why I started to learn Love2D is to eventually make a game with a meaningful message.

I learned a *ton* since I first knew Love2D. And kikito's love-tile-tutorial is rather helpful in getting me started. And the HUMP libraries proved to be more and more useful as I proceeded to experiment with platformer. I changed my code on a large scale quite a few times after I learned more concept -> scoping, meatatables, and classes. And I spent a lot of time on the tweening aspect after the basic structure of my experiment was completed.

All the art was drawn by me mostly using Paint.Net. I reused some of the art in my previous experiment drawn with an outdated (free) version of Photoshop (http://www.digitaltrends.com/computing/ ... -for-free/). You may use my art for non-commercial purposes without misrepresentation of the source. All the audio was downloaded from http://www.freesound.org.


So basically, you just need to collect all diamonds to proceed to the next level.

Collision detection is entirely tile-based: checking whether the tiles around player are passable before moving with some re-adjustment of player's position. Smooth transition between grids is implemented through assigning a value denoting player's displacement from grid positions. In fact, calculations of player's position are mostly done on this displacement thing.

Lastly, have fun getting higher scores!

Libraries used:
-HUMP
-slib
-hardon collider
-struct
-anim8
Attachments
Walk!Jump!Collect!.love
(5.45 MiB) Downloaded 359 times
Last edited by pelicano_o on Sat Jun 07, 2014 3:01 pm, edited 5 times in total.
User avatar
Positive07
Party member
Posts: 1014
Joined: Sun Aug 12, 2012 4:34 pm
Location: Argentina

Re: Walk! Jump! Collect! - A Platformer Experiment

Post by Positive07 »

8192 pixels wide canvas??? My computer is not that powerful... :ultrashocked:

As I saw in some other post you should use 1024 and 2048 pixels width since most computers are compatible with that but 8192 is a little too much :cry:. Can you shrink it please? I wanna play it :awesome:
for i, person in ipairs(everybody) do
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
pelicano_o
Prole
Posts: 13
Joined: Sun Mar 09, 2014 1:44 am

Re: Walk! Jump! Collect! - A Platformer Experiment

Post by pelicano_o »

Positive07 wrote:8192 pixels wide canvas??? My computer is not that powerful... :ultrashocked:

As I saw in some other post you should use 1024 and 2048 pixels width since most computers are compatible with that but 8192 is a little too much :cry:. Can you shrink it please? I wanna play it :awesome:
Hi. Since some maps are large, the levels will be off the canvas and will be invisible if I just shrink the canvas. So I broke up the canvas into 12 smaller canvases( 1024 by 1024 ). I'm not sure if this will solve the problem you mentioned. ( though, loading each level takes a fraction of a second longer now )
User avatar
Jeeper
Party member
Posts: 611
Joined: Tue Mar 12, 2013 7:11 pm
Contact:

Re: Walk! Jump! Collect! - A Platformer Experiment

Post by Jeeper »

pelicano_o wrote:
Positive07 wrote:8192 pixels wide canvas??? My computer is not that powerful... :ultrashocked:

As I saw in some other post you should use 1024 and 2048 pixels width since most computers are compatible with that but 8192 is a little too much :cry:. Can you shrink it please? I wanna play it :awesome:
Hi. Since some maps are large, the levels will be off the canvas and will be invisible if I just shrink the canvas. So I broke up the canvas into 12 smaller canvases( 1024 by 1024 ). I'm not sure if this will solve the problem you mentioned. ( though, loading each level takes a fraction of a second longer now )
There is no reason you would need more than 1 canvas the size of 1024x1024. As you only need to draw what is in the sceen at the moment.
pelicano_o
Prole
Posts: 13
Joined: Sun Mar 09, 2014 1:44 am

Re: Walk! Jump! Collect! - A Platformer Experiment

Post by pelicano_o »

Jeeper wrote: There is no reason you would need more than 1 canvas the size of 1024x1024. As you only need to draw what is in the sceen at the moment.
But drawing tiles onto the canvas every frame causes black lines to appear for reasons I do not know of. I actually draw everything onto the canvas when loading each level.

EDIT: black lines appear when camera moves.
User avatar
Jeeper
Party member
Posts: 611
Joined: Tue Mar 12, 2013 7:11 pm
Contact:

Re: Walk! Jump! Collect! - A Platformer Experiment

Post by Jeeper »

pelicano_o wrote:
Jeeper wrote: There is no reason you would need more than 1 canvas the size of 1024x1024. As you only need to draw what is in the sceen at the moment.
But drawing tiles onto the canvas every frame causes black lines to appear for reasons I do not know of. I actually draw everything onto the canvas when loading each level.

EDIT: black lines appear when camera moves.
Then there is something wrong with you camera and/or your tiles. You should always solve the actual problem rather than doing a "hack" solution.

Sounds to me like there is a tiny gap between the tiles, like 0.3 pixels. So in some positions it round the x position down instead of up (or reversed) creating a 1px gap.
User avatar
Positive07
Party member
Posts: 1014
Joined: Sun Aug 12, 2012 4:34 pm
Location: Argentina

Re: Walk! Jump! Collect! - A Platformer Experiment

Post by Positive07 »

Yeah thats probably it, you should use 1px increments. Also make sure that you are clearing the canvas before you draw each time. Drawing the whole level is a really bad idea that can give many problems later on, you should use some kind of culling and just draw what is needed
for i, person in ipairs(everybody) do
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
User avatar
micha
Inner party member
Posts: 1083
Joined: Wed Sep 26, 2012 5:13 pm

Re: Walk! Jump! Collect! - A Platformer Experiment

Post by micha »

Good game so far. I know it is not easy to make something complete with gamplay, menu, levels etc.

In my opinion, holding down the jump button should not make the player jump repeatedly. Instead it should only jump once. So better use the keypressed-callback instead of love.keyboard.isDown.

For drawing the map, I suggest using a spriteBatch. That way you can draw the whole map with one draw-command. You won't get drawing artifacts between the tiles, if you math.floor all drawing coordinates, before drawing.
User avatar
ZoNe
Prole
Posts: 16
Joined: Thu Feb 06, 2014 9:32 pm

Re: Walk! Jump! Collect! - A Platformer Experiment

Post by ZoNe »

interesting :) has a happy feeling to it thats for sure! :) and a good stab at your first platform i must say! i like what you've done here apart from IMO i don't think you should have the fly ability.. i just found myself flying around the levels sometimes and then it wasn't enjoyable. maybe if you keep the fly ability, have a power level for it that regenerates over time and goes down whilst flying so it isn't possible to just fly everywhere.

keep it up! :)

ZoNe!
Draetheus
Prole
Posts: 12
Joined: Wed Dec 29, 2010 9:15 pm

Re: Walk! Jump! Collect! - A Platformer Experiment

Post by Draetheus »

The hand drawn graphics are a nice touch. The jumping feels nice for a platformer, and the point collecting animation is great! I agree that flying makes it too easy. The player trail animation also seems a bit excessive. But nice job overall, keep at it!
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests