Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat
Liquidfun platformer - Gideros Forum

Liquidfun platformer

MoKaLuxMoKaLux Member
edited April 15 in Game & application design
I am building a platformer template for all to use (pros and noobs alike).
Tell me what you think :)
https://mokalux.itch.io/gideros-platformer-lf
An example:
	elseif objectName == "lava" and application:getDeviceInfo() ~= "Web" then
		if object.shape == "polygon" then
			myshape = LF_Particles.new(self.world, self.camera, {
				x = object.x, y = object.y,
				coords = object.polygon, rotation = object.rotation,
				tex = "gfx/ui/btn_02_up.png",
			})
		elseif object.shape == "rectangle" then
			myshape = LF_Particles.new(self.world, self.camera, {
				x = object.x, y = object.y,
				w = object.width, h = object.height, rotation = object.rotation,
				tex = "gfx/ui/btn_02_up.png",
			})
		elseif object.shape == "ellipse" then
			myshape = LF_Particles.new(self.world, self.camera, {
				w = object.width, h = object.height, rotation = object.rotation,
			})
		else
			print("*** CANNOT PROCESS THIS SHAPE! line ~134 ***")
			return
		end
Gravity is set to 48 instead of 9.8, Liquidfun is very tricky!
Will post my progress here if you don't mind.
PS: thanks to antix who told me to use Tiled in my platformers as well as providing some code to start off, thanks to rrraptor for his camera <3
PS2: thanks to ALL of you as well :)
PS3: viva GIDEROS!
my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
+1 -1 (+4 / -0 ) Share on Facebook

Comments

  • keszeghkeszegh Member
    Accepted Answer
    jumping feels natural, but the movement/running is too slow (maybe i complained about this earlier in another game of yours).

    Likes: MoKaLux

    +1 -1 (+1 / -0 ) Share on Facebook
  • SinisterSoftSinisterSoft Maintainer
    edited April 15 Accepted Answer
    I just see a white screen? (brave browser)

    I can see it on Chrome. Brave works fine for my games though.
    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
  • MoKaLuxMoKaLux Member
    edited April 15
    (at)keszegh yes I am not too happy with the speed either, I need to refine it. (at) SinisterSoft maybe due to liquidfun? I had to disable liquidfun particles in web because it was lagging too much.
    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
  • MoKaLuxMoKaLux Member
    edited April 20
    some progress but damn liquidfun is very tricky :o
    For example I have already reached the maximum maskBits which is 2^16 (65536).
    Some feedback please :)
    same link: https://mokalux.itch.io/gideros-platformer-lf
    Now it has 2 levels but no enemies yet. If you stand near the particles you will see them moving, I will play with particledef later on.
    How am I suppose to explain this in a tutorial, that is the question :/
    at keszegh I have increased the speed (both animation and velocity) hope you will like it better?! :)
    Works great on mobile too!
    Viva gideros.
    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
  • MoKaLuxMoKaLux Member
    edited May 14
    I have a bug in my game (please see link above) and I don't have any clue why.
    In the demo, the player can move fine on the ladders but he cannot shoot when he is moving diagonally right/down nor when he is moving diagonally left/up! :s
    All other directions are fine.
    Do you know what could be the problem?

    Here is the code for the player control:

    I have tried many things with no luck, any help would be much appreciated :)
    PEACE.
    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
  • MoKaLuxMoKaLux Member
    edited May 14
    I found the reason why: keyboard ghosting!
    https://drakeirving.github.io/MultiKeyDisplay/
    When I press:
    - right arrow + down arrow + space bar = key ghost!
    - right arrow + up arrow + space bar = OK
    - left arrow + down arrow + space bar = OK
    - left arrow + up arrow + space bar = key ghost!

    So it's my keyboard :#

    The fix is to use another keymaping, for example IJKL + W or WASD + SPACEBAR or even better have some default key and let the user change it if necessary.
    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
  • ThoraciusThoracius Member
    Accepted Answer
    Very cool.

    I noticed a couple issues. If you jump next to a ledge and hold the up key, you do a double-jump. Likewise if you're jumping up through a one-way platform, if you're holding down up it jumps automatically. Also, if you're walking off of a ledge, you can jump in mid-air before landing.

    I think the expected behavior in a platformer is that you have to let go of the jump key and push it again while standing on solid ground in order to jump again. Though, I haven't played computer games in a couple decades, so maybe this has changed.


    Likes: MoKaLux

    +1 -1 (+1 / -0 ) Share on Facebook
  • MoKaLuxMoKaLux Member
    Thanks for the feedback. I am working on it.
    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
  • MoKaLuxMoKaLux Member
    edited May 30
    Thoracius said:

    I noticed a couple issues. If you jump next to a ledge and hold the up key, you do a double-jump. Likewise if you're jumping up through a one-way platform, if you're holding down up it jumps automatically. Also, if you're walking off of a ledge, you can jump in mid-air before landing.

    I think the expected behavior in a platformer is that you have to let go of the jump key and push it again while standing on solid ground in order to jump again. Though, I haven't played computer games in a couple decades, so maybe this has changed.

    did some progress:
    - fixed the double jump

    I am working on the building of levels workflow. Right now the process is:
    -I draw my levels in Gimp so I have the full picture of the level
    -then in Tiled I import the image and draw over it my levels using shapes
    - I discovered that TILED handles colors so I can build my levels directly in TILED
    - then I draw my graphics (mostly tiles) for the levels in Inkscape
    - finally gideros automatically mix the Tiled levels and the graphics from Inkscape (using either the pixel or the shape class)

    Level design is so important I am trying to find a quick and easy way to build them.
    The code in gideros is mostly done (some magic numbers here and there).

    The last thing I need to work on is AI.
    Almost there, tell me what you think :)
    Will try to do some tuts either YT or written.
    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
  • MoKaLuxMoKaLux Member
    Some more progress :)
    In this one I tried refining the player control with better climbing, better pass-through platform, ...
    Almost there :p https://mokalux.itch.io/gideros-platformer-lf

    Likes: antix

    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
    +1 -1 (+1 / -0 ) Share on Facebook
  • MoKaLuxMoKaLux Member
    here is the source code for the community.
    PS: I changed the main player gfx because I am keeping it for myself :)

    Please do not hesitate to ask if you don't understand any part of it.
    zip
    zip
    mkgiPlatformerXforumLF.zip
    1M
    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
    +1 -1 (+2 / -0 ) Share on Facebook
Sign In or Register to comment.