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 18
  • rrraptorrrraptor Member
    edited August 19 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)
  • MoKaLuxMoKaLux Member
    edited August 21
    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
  • antixantix Member
    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.
  • SinisterSoftSinisterSoft Maintainer
    @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 23
    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 26 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
    +1 -1 (+2 / -0 )Share on Facebook
  • MoKaLuxMoKaLux Member
    edited August 26
    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 29
    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
  • MoKaLuxMoKaLux Member
    edited August 30
    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 2
    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 3
    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 5
    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
    +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
    +1 -1 (+1 / -0 )Share on Facebook
  • MoKaLuxMoKaLux Member
    edited September 6
    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 1
    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
  • E1e5enE1e5en Member
    - 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
  • E1e5enE1e5en Member
    edited October 5
    - 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.
    Beginner game developer
    https://e1e5en.itch.io
Sign In or Register to comment.