Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
BUMP (CBUMP) ECS PLATFORMER — Gideros Forum

BUMP (CBUMP) ECS PLATFORMER

MoKaLuxMoKaLux Member
edited December 2022 in Game & application design
Hope you are all doing well :)
In this thread I will try to keep up making yet another platformer using awesome Gideros o:)
First of all a demo link:
https://mokalux.itch.io/gideros-tests
So far it has:
- cbump (gideros cbump is working fine, the issues I had before was between the keyboard and the chair :p )
- ECS, following my hero (rrraptor) I tried using tiny ECS (I am still learning it!)
- rrraptor's GCam
- coyote time and a kind of key buffering for jumping (I used a dirty trick for this one as they were many challenges)
- parallax bgs
- variable jump height
- ladders
- coins
- 1 type of nme
- no delta time (which seems good)
- hide nmes and coins when not on screen (performance?)
- passthrough platforms
- moving platforms
- mobile controls
- ...

I am quite happy with the result ;) .

TODO:
- sounds
- killing the player
- score
- refining the code
- add a boss
- wall jump?
- dashing?
- ...

In this thread I will try to explain how I did things, you can ask any questions as well ;)
I will post to GH when I am happy with the code structure (God's willing).

Viva Gideros Studio <3

Likes: hgy29, E1e5en, pie

my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
Tagged:
+1 -1 (+3 / -0 )Share on Facebook

Comments

  • MoKaLuxMoKaLux Member
    edited March 2023
    I am back on track with my yet another platformer :p
    I am going to post it on GH asap.
    Here is the demo: https://mokatunprod.itch.io/3dpixel-ultimate-stylized-nature-2d-pack

    I pushed it as far as I could, now I am ready to "build" a story and make a GAME o:) .

    I used some hidden tricks, for example when you climb the ladder the player was jumping at the top which I didn't like too much, so I added a hidden wall and the result is pretty good imho :p

    I especially like how the player falls off ground and platforms o:)

    For the ground and the path I used Gideros Shape with a skewed texture which I am a big fan of! can you believe that unity nor godot have implemented it! :p

    What I don't like too much is how I handled ECS at the end, I kinda squeezed everything in one system :#

    Another thing I would love to do is some tutorials (written and YT) but oh boy how am I supposed to explain all this?! bump + ECS + Tiled...

    PS: no sound nor UI yet but you can already die and restart the level (wait when you die or press the R key to restart).
    PS2: I need to optimize it as well.
    PS3: now I am not sure which one I prefer cbump or liquidfun? ECS or classic classes? but that was very interesting and fun to code :p

    What kind of story does it inspire you guys?

    PS: for moderators if you think that this is a misleading link just tell me I will post the game on another itch page, or if you guys don't like me posting on this page, please tell me ;)

    Viva Gideros <3
    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
  • beware of feature creep >:)
    So I said why not add jumping on enemies to kill them, then I said that would be cool if I can also stomp them but I already have springs with variable heights depending if the player holds the down or up keys plus passthrough platforms, ...

    So the stomping was adding more complexity and whatnot. Is it adding fun to the game? I think so. Is it crucial? not at this point. Solution? keep this feature in mind and finish your game :p (GH source soon available God's willing).

    Have fun o:)
    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
  • MoKaLuxMoKaLux Member
    edited March 2023
    MoKaLux said:

    beware of feature creep >:)
    So I said why not add jumping on enemies to kill them, then I said that would be cool if I can also stomp them but I already have springs with variable heights depending if the player holds the down or up keys plus passthrough platforms, ...

    So the stomping was adding more complexity and whatnot. Is it adding fun to the game? I think so. Is it crucial? not at this point. Solution? keep this feature in mind and finish your game :p (GH source soon available God's willing).

    I could make stomping work :p so it is included in the template. This is a cbump platformer template which has many features and imho it is ready to make platformers (and maybe other genres).

    This is my humble contribution to Gideros ;)

    code available on GH :) https://github.com/mokalux/PLATFORMER_CBUMP_TECS_20221101_wodt

    Don't hesitate to fork and maybe make it a community game?

    Hope this could help somebody :)

    What is missing is optimisation :(

    Peace and Viva Gideros <3
    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
  • and yet another platformer :p
    https://mokalux.itch.io/gideros-test2

    this time it's for a wiki tutorial (YT?)
    Same recipe: cbump Tiled tiny-ecs

    I am making some "level design", need to add some animations and make the code tutorial friendly.

    This is wip and should post some of my progress here, God's willing.

    Likes: pie

    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
    +1 -1 (+1 / -0 )Share on Facebook
  • MoKaLuxMoKaLux Member
    edited January 27
    update:https://mokalux.itch.io/gideros-test2 :)

    My issue is the graphics >:)
    I tried using tiles for performance in Gideros but the levels are not always 32*32 and I couldn't bother making tilesets for every combination.

    Now I am using Shapes to add some variety but it's very basic.

    I am afraid to draw levels by hand (using either big sprites or an assortment of little sprites) because in some previous 2d platformer attemps this was leading to stutters (maybe latest Gideros Luau will fix this?).

    Code not clean so no ready for GH nor wiki :(

    Viva Gideros <3
    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
  • piepie Member
    For the graphics have you checked if there is something on https://opengameart.org/ ?

    Likes: MoKaLux

    +1 -1 (+1 / -0 )Share on Facebook
  • MoKaLuxMoKaLux Member
    edited January 28
    thank you pie ;)
    I have plenty of assets, the difficulty is making sense of all of them in levels AND making the game not lag :s

    PS: I cannot post images on the forum :o you can find in the last 3 pictures what the game should look like https://mokalux.home.blog/2025/01/27/proto-20250127/

    Likes: pie

    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
    +1 -1 (+1 / -0 )Share on Facebook
  • MoKaLuxMoKaLux Member
    edited February 21
    == ***************************************************************** ==
    == MAKING A 2D PLATFORMER: THE RE-BEGINNING OF MY JOURNEY ==
    == ***************************************************************** ==

    So as I have mentionned in some previous post, I am going to document my journey making a 2d platformer.

    The goals are: keeping track of my project, documenting my struggles and hopefully finding the solutions :p

    === prototyping ===
    With all my previous attempts at making a platformer I have come up with various mechanics like, walking, running, jumping, shooting projectiles (long range and melee), ... . I have added dashing, wall climbing, coyote time, input buffering, a keys/doors system, ...

    This is cool so let's do some levels, right?

    Tiled is the tool for the job here (thank you antix :) ). A flat level looks boring but it's hard to do level design so I use a tool to generate labyrinths and use them in Tiled as references. There are my first levels :) .

    Testing the various mechanics and finding the "fun" and I can pursue.

    === finding the game I want to make, telling a story? ===
    I have my base level, I have some mechanics, I need to find the game I want to make. Is it going to be more like Super Mario or Blasphemous? (target audience?).

    After watching countless YT videos explaining level design, I believe you build your levels based on the mechanics you want the player to learn. How do you know what you want to teach the player if you don't have a story?

    Story <-> level design <-> mechanics

    I need a story: "Daddy goes to school to pick up little darling".

    === assets ===
    I made a tool so I can make all the graphics I want/need (objects and animations).

    Using sound and music, by default the volume is too loud for my taste so I use setVolume on all my audio. This is far from perfect (multiple sfx playing and the volume goes crazy, no sound channels available, ...). I need to look into this more seriously :s

    To be continued, God's willing!
    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
  • MoKaLuxMoKaLux Member
    edited February 9
    === AI ====
    Making a platformer can take ages :s
    Everything has to be fine tuned, player size, jump height, jump distance, the level design, the art style, ... you change one digit and everything needs to be retuned

    ...and the AI >:)
    		else -- INSIDE ACTION RANGE
    			-- x
    			if ent.pos.x > random(self.player1.pos.x+p1actionrange, self.player1.pos.x+p1outofrangex) then
    				ent.isleft, ent.isright = true, false
    				ent.body.currspeed = ent.body.speed*random(8, 12)*0.1 -- magik XXX
    			elseif ent.pos.x < random(self.player1.pos.x-p1outofrangex, self.player1.pos.x-p1actionrange) then
    				ent.isleft, ent.isright = false, true
    				ent.body.currspeed = ent.body.speed*random(8, 12)*0.1 -- magik XXX
    			end
    			-- no going left or right on stairs/ladders
    			if ent.isladdercontacts and not (ent.isfloorcontacts or ent.isptpfcontacts) then
    				ent.isright, ent.isleft = false, false
    			end
    			-- y
    			if ent.isladdercontacts and ent.isptpfcontacts and ent.body.vy < 0 then
    				-- impulse on top of stairs/ladders and actor is going up
    				ent.wasup = false
    				ent.body.currinputbuffer = ent.body.inputbuffer
    				ent.isup, ent.isdown = true, false
    				ent.body.currjumpspeed = ent.body.jumpspeed*random(8, 12)*0.1 -- magik XXX
    			end
    			ent.readyforaction = true
    		end
    		-- ACTION
    		if ent.readyforaction then
    			ent.curractiontimer -= 1
    			-- don't let the actor get stuck in place when in range
    			if ent.body.vx == 0 then
    				if ent.pos.x > self.player1.pos.x then ent.isleft, ent.isright = true, false
    				else ent.isleft, ent.isright = false, true
    				end
    				ent.body.currspeed = ent.body.speed*random(8, 12)*0.1 -- magik XXX
    			end
    			if ent.curractiontimer < 0 then
    ...
    I battle tested the AI but did I catch all possible cases? probably not! For the time being it is working so I can move on :)
    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
  • MoKaLuxMoKaLux Member
    edited February 21
    === everything breaks ===
    So I made some levels to playtest, with some sort of assets for the graphics. The player can run, jump and shoot but ... after some time I found my levels to be a little off. The player wasn't jumping neither high enough, nor far enough. Now I am testing with new jump parameters which means I need to redo the levels :#

    So far for me the first steps are:
    - finding the genre/audience: super mario or blasphemous
    - finding the correct speed for running and jumping
    - level design
    - graphics

    To add to the mix, there is also the sprite dimensions to take into account.

    I am a little bit stuck and I guess I should "steal" from other platformers.

    Making a platformer can be hard :s

    to be continued...
    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
  • MoKaLuxMoKaLux Member
    edited February 13
    extract from reddit :)
    What do you do for making your game’s environment?
    ...So, I’d like to share a list of things I take in account when designing and making assets, as well as composing my game environment (feel free to add more to it):

    - Extensive research on how my environment should look like
    - Finding references
    - Defining the art style that I want to make
    - Define Color palettes for either specific assets or the environment. Just thinking how it should be.
    - Sketch the different environments (quick sketches are enough) and apply the general colors to it
    - Then play a bit with everything (color values, shapes, adding stuff, removing stuff,…)
    - Redefine the color palettes with your new values.
    - Making simple shapes/low poly assets (even sometimes using regular squares/cubes), to populate the world, and try to achieve the same kind of feel that the sketch gives. Doesn’t have to be detailed, but just gives the general idea of size, and how free/ominous/oppressive/etc… the environment would look like.

    Once I’m sure that it’s what I want, I make my assets, following the new color palettes I made.

    Maybe my own technique is a bit weird and doesn’t match for everyone, so I would love to see how you guys do it. Maybe, I’ll even learn a little!

    https://www.reddit.com/r/gamedev/comments/1iohb23/what_do_you_do_for_making_your_games_environment/
    Welcome to game dev :p
    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
  • MoKaLuxMoKaLux Member
    edited February 21
    === the enemies ===
    All nmes cannot be the same, they need:
    - different abilities
    - different AI
    - different graphics
    - different strength (number of lives)
    - ...

    They also need to be introduced in some order, the easy ones then slowly introduce the tougher ones.

    I could put them randomly in the levels but I am aiming at making an almost complete 2d platformer tutorial ;) so we get back to the story, I need to tell a story.

    After watching a AAA game/level designer I followed his teachings and came up with this (please don't mind my english, it is for sure NSFW :p ):
    story
    it’s time for daddy to pick up little Lilly from school

    the player1 is in his house, in the living room
    he is reading a book?
    it is time for daddy to pick up lilltle Lilly from school
    he picks up the key to the door entrance and hurry outside
    at this point daddy has no gun

    after walking (running) a couple blocks away
    he finds a blockade with some army men and policemen
    he is told there is a guerilla and all the town is locked down

    he is given a gun

    after that point he goes and fight the rioters (aliens, settlers, …)

    his little Lilly, hopefully she is safe!
    fortunately the school is not so far

    first encounter
    he passes in front of a bus stop and he is attacked by 2 guys
    the guys are slow and they are unarmed but they can jump on you to hurt you

    second encounter
    there is one guy keeping the entrance to the next section
    a building, a street?
    the guy stands still but can shot at any angles
    when the guard dies the door to the next section is unlocked

    third encounter
    a couple of snipers are posted all along the way
    they shoot at any angles


    And this seems to help a lot making a level come true

    to be continued...
    my growING GIDEROS github repositories: https://github.com/mokalux?tab=repositories
Sign In or Register to comment.