Some questions on efficiency on making platformer

This forum is currently in read-only mode.
From the Asset Store
10 Retro songs ideal for platformers or farming games
  • Hey guys!

    Making a new custom platformer movement from scratch. Want to have this nailed down, BUT ALSO want it to be able to have multiple instances of said player. Maybe as many as about 50? I made a movement before, but doing detection and stuff (doing code to prevent the characters clipping through smallish floors and walls) created a performance drop (from 60fps to about 25) when about 20 characters were around (standing idle D: didn't do a good job with efficiency hah) It's definitely the code that lagged the game, so I have a few questions.

    1) Where should the events go? I always do them in the event sheet for a layout, never really gone into other things.

    2) How would I efficiently detect floors and walls? I use a main collision sensor which is contained with smaller sensors that are paired up with the main sensor, in which detects the floor below, walls, ect. Is there a command I don't know of that could help me here or lower usage of sprites or anything? Or does it not matter? :P

    3) How would one go about slopes? Slopes (45 degree at most) are my mortal enemy, I find them a bugger to code. Best method I've made includes placing a hidden sprite over each and every slope in the stage that uses loops to stick the character to the ground (In my old example, if about 5 characters stood on a slope, the framerate would drop :[ ) High speeds worked well with this method usually. (Other methods, when a character moves at 15 pixels per tick, it wouldn't detect the slope and the character would go flying.) 4) Random other question not regarding platformer stuff, is there a way to make rope physics with the physics behaviour? Nothing fancy, don't need pixel perfect collision with the rope, but just a dangly line that I could use to make a light (the light would be connected to the end of the rope and when the light is hit, it bounces around and stuff, just a nice effect I would like ^.^ )

    Man, sorry for writing an novel of a post, but any answers are greatly appreciated.! <img src="smileys/smiley36.gif" border="0" align="middle" />

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • When organizing events and event sheets, i tend to have each layout just include individual sheets, and create for example one for input, movement, collision, animations, etc

    and then when the layout starts just have it load whichever sheets needed,

    so each sheet affects every layout that uses it, and you only have to edit that one sheet. within sheets and layouts it's good to organize with colored comments and groups. - i dont know if that was the kind of tips you were looking for.

    as for collision, i personally have some nuances with it, but i use the sprite.left/right/top/bottom/x/y expressions instead of sensor srites, in order to detect it.

    hope some of that helps

  • When organizing events and event sheets, i tend to have each layout just include individual sheets, and create for example one for input, movement, collision, animations, etc

    and then when the layout starts just have it load whichever sheets needed,

    so each sheet affects every layout that uses it, and you only have to edit that one sheet. within sheets and layouts it's good to organize with colored comments and groups. - i dont know if that was the kind of tips you were looking for.

    as for collision, i personally have some nuances with it, but i use the sprite.left/right/top/bottom/x/y expressions instead of sensor srites, in order to detect it.

    hope some of that helps

    Hey man, thanks for the reply ^.^

    Those tips were useful. How would I got about loading multiple event sheets in a single layout? (I just tried hunting around the forums using the search tool but failed pretty badly)

    EDIT: Found a wiki and figured this out ;o

    The Sprite.left and stuff seems efficient, but, - is there a way to detect if certain coordinates is overlapping another sprite? ;o

    Thanks :)

  • I really would love an answer for question 2, as I can't progress with my engine until I decide the routines on collision. I don't expect anyone to hold the answer, but maybe past experiences using different methods and how they turned out ;o :)

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)