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

Liquidfun platformer

13

Comments

  • MoKaLuxMoKaLux Member
    edited August 2021
  • rrraptorrrraptor Member
    edited August 2021 Accepted Answer
    Instead of
    x = 0
    G_BITSOLID = 2^x
    x += 1
    G_BITPTPF = 2^x
    x += 1
    G_BITPLAYER = 2^x
    x += 1
    G_BITPLAYERBULLET = 2^x
    x += 1
    G_BITENEMY = 2^x
    x += 1
    G_BITENEMYBULLET = 2^x
    x += 1
    G_BITFRIENDLY = 2^x
    x += 1
    G_BITSENSOR = 2^x
    x += 1
    G_BITMOVEABLE = 2^x
    You can write:


    P.S. hold ALT to select area (cursors cant be moved)

    CTRL + LEFT mouse click - add cursor (can be moved with arrows)

    Likes: MoKaLux

    +1 -1 (+1 / -0 )Share on Facebook
  • MoKaLuxMoKaLux Member
    edited August 2021
    I think that looks better? well except for the lemons (why have I chosen lemons!!!)
    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
  • You really don't need any physics engine to do slopes of any type in Gideros (). The linked video is all done with bump.

    You can also do your own using something stupid small like https://github.com/xem/mini2Dphysics/ and convert that to Lua with little effort.

    Really, unless you code the entire thing yourself, it's very hard to accommodate corner cases like jump through platforms, slopes, and such.
  • @antix That looks good, did you release the code?
    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 August 2021
    having used cbump and liquidfun, I find using liquidfun a better option imho. You can do so much stuff with it! I am going to stick with liquidfun (box2d) :)
    Liquidfun is quite easy once you get the grasps of it imho. Cbump, well I am not really a fan :|
    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
  • updated:
    - parallax bg (only 1 layer for now)

    I think this makes a lot of difference :) https://mokatunprod.itch.io/gdoc-03-platformer

    Tell me what you think please o:)

    Likes: E1e5en

    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
    +1 -1 (+1 / -0 )Share on Facebook
  • E1e5enE1e5en Member
    edited August 2021 Accepted Answer
    It plays well, passed both bosses (the second turned out to be more difficult than the first, because of its movement speed).
    At first it turned out to be an unusual speed of movement of the character, but you quickly get used to it.
    I understand that this is a prototype and I am not nitpicking, but I will simply write that I noticed:
    - the character "gets stuck" for a while at the edges of the platform (when colliders collide sideways). Perhaps reduce friction to zero at the edges so that it slides out instantly.

    - perhaps because of the reason above, the double jump does not really work if you lean against the side of the platform.


    - the number of points changes: if you hit the enemy, then the value is simply displayed, if you collect cups, then “Score: value”.
    - the character climbs the stairs very quickly, which does not look natural with his normal speed.
    - when the character moves left-right along the stairs, in my opinion, let the animation play the movement along the stairs.
    - stairs and enemies: the enemy can jump and, if he gets on the stairs, jumping again, "fly away" down. It is possible to prevent the enemy and the ladder from interacting with each other.
    - it's cool that you can control the direction of fire (up, down), but this is not indicated in the control (as well as about double jump), so the player may not know about it and not use it.
    - Enemies shoot painfully, so the difficulty is high right away.
    - when the character dies and goes to another level, "extraneous" objects appear on the screen.
    It takes a lot of polishing, but it looks interesting! =)

    Likes: oleg, MoKaLux

    Beginner game developer:https://e1e5en.itch.io, Google Play
    +1 -1 (+2 / -0 )Share on Facebook
  • MoKaLuxMoKaLux Member
    edited August 2021
    Thank you very much for your feedback, much appreciated. The bug character getting stuck is fixed (I need to put it on itch.io), the friction for the sides are indeed 0, the bug was with positioning.
    I will polish it a little bit more with your precious analysis asap ;-)

    EDIT:
    E1e5en said:


    - the character "gets stuck" for a while at the edges of the platform (when colliders collide sideways). Perhaps reduce friction to zero at the edges so that it slides out instantly.
    - perhaps because of the reason above, the double jump does not really work if you lean against the side of the platform.
    - the number of points changes: if you hit the enemy, then the value is simply displayed, if you collect cups, then “Score: value”.
    - the character climbs the stairs very quickly, which does not look natural with his normal speed.
    - when the character moves left-right along the stairs, in my opinion, let the animation play the movement along the stairs.
    - stairs and enemies: the enemy can jump and, if he gets on the stairs, jumping again, "fly away" down. It is possible to prevent the enemy and the ladder from interacting with each other.
    It takes a lot of polishing, but it looks interesting! =)

    Above have been fixed? :* https://mokatunprod.itch.io/gdoc-03-platformer

    EDIT2: the second level is empty for now, just testing some graphics combinations :)


    EDIT3: I need to start writing the tutorial asap :#

    Likes: E1e5en

    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
    +1 -1 (+1 / -0 )Share on Facebook
  • E1e5enE1e5en Member
    edited August 2021
    I saw the update and played. My little report. :)
    - Options - the "Menu" button does not change the picture on hover.
    - Main menu - the inscription of the "Game" button is not in the center.
    - Main menu - "Quit" button is not needed for the web version.
    - Elevator - you can't jump on it from below, but I would like to.
    - Jumping off the platform (through) using the button down is not convenient. You want to shoot down, but you jump off. Usually Down + Jump.
    - Double jump - if you press twice at once, then you jump very high, if you press once, wait a little and press a second time, then the second jump is not so strong. Doesn't the jump force have to be the same?


    - Strange behavior when jumping onto turned platforms (moves abruptly downward). And sometimes the character slowly slides down it.
    The size of the picture is large to download so the link: gif

    - When moving from the second level to the first (while the transition animation is going on), you can at some point already control the character and he runs in place at the previous level.
    Beginner game developer:https://e1e5en.itch.io, Google Play
  • MoKaLuxMoKaLux Member
    edited August 2021
    I saw the update and played. My little report. :)
    - Double jump - if you press twice at once, then you jump very high, if you press once, wait a little and press a second time, then the second jump is not so strong. Doesn't the jump force have to be the same?
    Double jump fixed (cf: https://www.reddit.com/r/gamedev/comments/pdokka/need_help_with_the_implementation_of_double_jump/):
    if self.body.isup and self.body.canjump and self.body.numjumpcount > 0 and not self.body.isdown then
    	self.body:applyLinearImpulse(0, -self.vy, self.body:getWorldCenter()) -- cancel vy
    	desiredVelY = -self.body.jumpspeed
    	self.body.canjump = false
    	self.body.numjumpcount -= 1
    end
    I had to negate the previous velocity!

    Will update with your other remarks asap.
    Thanks for the feedback E1e5en :)

    Please note: there are quite a few parameters and tweaking those to match the perfect moves takes time and depends a lot on personal taste.
    Parameters:
    self.world = b2.World.new(0, 16, true) -- gravity
    Player:
    animspeed=14, movespeed=8*1.4, jumpspeed=8*2.6, maxnumjump=2,
    density=2, restitution=0, friction=1,
    self.world.player1.body.nrg = 5
    ...

    Likes: E1e5en

    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
    +1 -1 (+1 / -0 )Share on Facebook
  • MoKaLuxMoKaLux Member
    edited September 2021
    rrraptor said:

    Instead of

    x = 0
    G_BITSOLID = 2^x
    x += 1
    G_BITPTPF = 2^x
    x += 1
    G_BITPLAYER = 2^x
    ...
    I was using this temporary solution because I needed to add more stuff and was bored of changing all power of 2 values ;)

    The final code should look like:
    -- LIQUIDFUN: here we store all possible contact TYPE -- NO LIMIT :-)
    G_GROUND @ &2^0&
    G_MVPLATFORM @ &2^1&
    G_PTPLATFORM @ &2^2&
    ...
    -- LIQUIDFUN: here we define some category BITS (that is those objects can collide) -- 2^15 = MAX
    G_BITSOLID @ &2^0&
    G_BITPTPF @ &2^1&
    ...
    -- and their appropriate masks (that is what can collide with what)
    solidcollisions @ &G_BITPLAYER + G_BITPLAYERBULLET + G_BITENEMY + G_BITENEMYBULLET + G_BITFRIENDLY + G_BITMOVEABLE&
    playercollisions @ &G_BITSOLID + G_BITPTPF + G_BITENEMY + G_BITENEMYBULLET + G_BITSENSOR + G_BITMOVEABLE&
    ...
    see: https://wiki.gideros.rocks/index.php/Macro_Constants

    There is another solution I like is using a spreadsheet (ms excel or open office calc ...). Some simple formulas and I have something like this:

    which I just copy paste (the orange column) into gideros studio. I used this method quite a bit before ;)
    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
  • rrraptorrrraptor Member
    edited September 2021
    MoKaLux said:

    I was using this temporary solution because I needed to add more stuff and was bored of changing all power of 2 values ;)

    You can use 1st variant :smile:
    1 << 2
    1 << 3 --> comment to remove html 'pre' tag from here xd
    so you do not need to use excel

    Likes: MoKaLux

    +1 -1 (+1 / -0 )Share on Facebook
  • MoKaLuxMoKaLux Member
    edited September 2021
    E1e5en said:

    I saw the update and played. My little report. :)
    - Options - the "Menu" button does not change the picture on hover. -- BECAUSE IT HAS ONLY ONE BUTTON, NEED TO FIND A FIX!
    - Main menu - the inscription of the "Game" button is not in the center. -- FIXED
    - Main menu - "Quit" button is not needed for the web version. -- :|
    - Elevator - you can't jump on it from below, but I would like to. -- I TRIED MOVING PASS THROUGH PLATFORMS BUT STRUGGLED A LOT AND COULD ONLY MAKE HORIZONTAL WORK OK, SO I REMOVED THOSE FOR NOW
    - Jumping off the platform (through) using the button down is not convenient. You want to shoot down, but you jump off. Usually Down + Jump. -- YES DEFINITIVELY NEED TO REMAP THE CONTROLS!
    - Double jump - if you press twice at once, then you jump very high, if you press once, wait a little and press a second time, then the second jump is not so strong. Doesn't the jump force have to be the same? -- FIXED :)
    - Strange behavior when jumping onto turned platforms (moves abruptly downward). And sometimes the character slowly slides down it. -- FIXED? :/
    - When moving from the second level to the first (while the transition animation is going on), you can at some point already control the character and he runs in place at the previous level. -- FIXED

    Making a platformer with box2d (I am not really using liquidfun) is very challenging indeed but with consistency comes great success!

    I am now learning sound and stuff :#

    Viva gideros!

    PS: I have started the Gideros Documentation for it o:)
    PS2: same link as previous posts ;)
    PS3: thanks to the gideros community <3

    Likes: E1e5en

    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
    +1 -1 (+1 / -0 )Share on Facebook
  • I will finish with the "hello world" project and will definitely watch the new version :)

    Likes: MoKaLux

    Beginner game developer:https://e1e5en.itch.io, Google Play
    +1 -1 (+1 / -0 )Share on Facebook
  • E1e5enE1e5en Member
    Accepted Answer
    As promised, I tried the new version. Most of the bugs seem to have been fixed.
    Double jump and jumping platforms behave strangely together, if I am not mistaken, then it turns out as many as 3 jumps (platform + first + second).
    Well, a record of the passage, maybe you will see for yourself (how others can pass the levels): video

    Likes: MoKaLux

    Beginner game developer:https://e1e5en.itch.io, Google Play
    +1 -1 (+1 / -0 )Share on Facebook
  • MoKaLuxMoKaLux Member
    edited September 2021
    oh things happen on your side that shouldn't happen :o For example the scrolling background should fill the whole screen all the time, on your side, at some point, you can see the background color and no more the image!
    How come the player is moving lightning fast on ladders (this does not happen to me!)
    This may be due to different delta time or computer power or...?

    Seeing other people try your game brings so much insight, for example you can keep shooting and kill enemy you don't even see, you discover my secret (you don't need to kill the boss to go to the next level), ...

    I am going back to it and correct all I can :p

    Your video is a treasure, thank you for taking the time to make it <3

    Likes: E1e5en

    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
    +1 -1 (+1 / -0 )Share on Facebook
  • MoKaLuxMoKaLux Member
    edited October 2021
    I am using Pixel class for my parallax but it is laggy and glitchy :neutral: I think I am going to leave it for now :'( How would you do parallax with Tiled levels?

    I improved the proto quite a bit though :)
    What's left:
    - improve interaction between player and enemies
    - level design + gfx
    - find a story to tell
    - ...

    https://mokatunprod.itch.io/gdoc-03-platformer
    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
  • - The character began to jump similarly lower and because of this it seems straightforward that you can barely jump onto the platforms.
    - Error when passing the first level and moving to the second.

    Beginner game developer:https://e1e5en.itch.io, Google Play
  • E1e5enE1e5en Member
    edited October 2021
    - When running on a computer, it is better to hide the controls.
    - For mobile devices, the controls are not as usual. Usually, the left-right movement buttons are located on the left (as in other games, and on the gamepads).
    - Enemies, as if, stopped moving to the sides and ceased to be dangerous because of this.
    - There is an interesting mechanic with jumping platforms, if you jump between them, you can develop a good speed and fly far away. =)

    (because of the gif recording in 10 frames, they are not even noticeable, they no longer have time to record frames at such a speed)

    Update: corrected the mistake.

    Likes: MoKaLux

    Beginner game developer:https://e1e5en.itch.io, Google Play
    +1 -1 (+1 / -0 )Share on Facebook
  • classes/save_prefs.lua:6: attempt to index local 'file' (a nil value)
    stack traceback:
    	classes/save_prefs.lua:6: in function 'saveData'
    	main.lua:45: in function 'myLoadPrefs'
    	main.lua:99: in main chunk
    	(luac): in main chunk
    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 November 2021
    new graphics for my platformer ;)

    I am experimenting with colors, for this level I have only 5 colors, and that seems not a lot at all.

    How many colors do you have in your games?
    I want to add more assets to the levels but I am not sure how to pick other colors :/ Can I use gradients of the 5 colors I have?

    For those who want to test it https://mokatunprod.itch.io/gdoc-03-platformer

    Thank you.
    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
  • MoKaLuxMoKaLux Member
    edited November 2021
    thank you oleg, yes I am using a palette from adobe color but it's only 5 colors! how do I pick the other colors? do I use gradients of the 5 colors to add more variety?

    Or is it enough with 5 colors? The theme for that level was an alien planet. I will try with an earth landscape color theme see how it goes, maybe five colors are enough?!

    PS: oleg thanks for sharing your tips, you are my favorite 3D artist ;)
    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
  • olegoleg Member
    Accepted Answer
    To get more colors - you just mix adjacent colors Or add another color scheme

    Likes: MoKaLux

    my games:
    https://play.google.com/store/apps/developer?id=razorback456
    мій блог по гідерос https://simartinfo.blogspot.com
    Слава Україні!
    +1 -1 (+1 / -0 )Share on Facebook
  • olegoleg Member
    Accepted Answer

    Artists often use Iten's color wheel. You just choose any color. The color opposite it will be its paired color. Each color can be replaced by two colors on the right and left -and so increase the palette.

    Also you can mix adjacent colors -getting a new color
    The logic there is that if you mix with the color that is opposite, you will get a gray color
    If you mix the color on the right and the color on the left, you will get the color between them.

    Likes: MoKaLux

    my games:
    https://play.google.com/store/apps/developer?id=razorback456
    мій блог по гідерос https://simartinfo.blogspot.com
    Слава Україні!
    +1 -1 (+1 / -0 )Share on Facebook
  • MoKaLuxMoKaLux Member
    edited November 2021
    coming from oleg's comment https://forum.gideros.rocks/discussion/comment/65990/#Comment_65990

    oleg this is my naive algorithm:
    -- colors functions
    function LevelX:calculateAnalogous()
    	self.theme = {}
    	local deg = 13.2/360
    	local h, s, v
    	local hm1, hp1, hm2, hp2
    	local analoghm1, analoghp1
    	for i = 1, #self.unsortedhexes do
    		h, s, v = ImGui.colorConvertHEXtoHSV(self.unsortedhexes[i])
    		hm1 = (h+deg)
    		hp1 = (h-deg)
    		analoghm1 = ImGui.colorConvertHSVtoHEX(hm1, s, v)
    		analoghp1 = ImGui.colorConvertHSVtoHEX(hp1, s, v)
    		self.theme[i] = {
    			hex = string.format("0x%06x", self.unsortedhexes[i]),
    			analoghm1 = string.format("0x%06x", analoghm1),
    			analoghp1 = string.format("0x%06x", analoghp1),
    		}
    	end
    end
    It is supposed to convert hex to hsv then take the hue (h) and add/subtract an angle (13.2/360) in degree.

    With all the testing I did I almost got the same analogous colors as adobe color!
    I am not sure about the angle they take but an angle of 13.2° looks very close.

    There is another bug: when the color is to close to 0 or 360 it will shift the hue to the opposite color, I think I may clamp the value to avoid such a big shift in colors?Almost fixed ;)

    Of course I didn't test with 0x00ff00 it seems to be working for all the other colors, I will investigate :/ thanks for the feedback FIXED(?)

    EDIT: app updated with some improvements(?) and most bugs fixed :p https://mokatunprod.itch.io/themes


    <3 <3

    Likes: oleg

    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
    +1 -1 (+1 / -0 )Share on Facebook
  • olegoleg Member
    Accepted Answer
    @MoKaLux Just for information - HSV is a physically correct spectrum that reflects how colors are perceived by electronics. A color circle iten -physically incorrect, it reflects how colors are perceived by human eyes.

    Likes: MoKaLux

    my games:
    https://play.google.com/store/apps/developer?id=razorback456
    мій блог по гідерос https://simartinfo.blogspot.com
    Слава Україні!
    +1 -1 (+1 / -0 )Share on Facebook
  • yes I have read that somewhere while searching for iten but couldn't bother ;) I just needed some more colors so I continue my dream game, yes a 2d platformer is one of my dream game :/
    If you have the formula for the iten I can try it though :)
    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
Sign In or Register to comment.