Follow

DAMMIT SAKURAI! NOW I HAVE TO ADD MORE LINES OF CODE TO THE GAME THAT I'M ALREADY BURNT OUT ON!

invidious.poast.org/watch?v=Od

· · Web · 1 · 1 · 0

Freeze frames are probably something I can do, but no way in hell am I doing screen shakes or slow motion. Screen shakes would require me to mess with viewports and I really don't feel like getting in to that. Slow motion would require me to either reduce the framerate (which I don't know how to do in MonoGame) or slow down every single object.

You are a DESIGNER not a PROGRAMMER. You don't have to deal with "implementing" anything.

@xianc78 nah he's a programmer too. man spent so much time working on smash 4, i think it was, that he had to be temporarily hospitalized. a game director or designer wouldn't even have enough stuff to do to warrant that.

dude programmed the entirety of kirby's dream land on a trackball: arstechnica.com/gaming/2017/04

@xianc78 Are you not managing changes in the game relative to a dt? Having your logic advance statically per frame isn't a good idea

Monogame should be giving you something like an update(dt) callback that gives you the deltatime (time since last frame, rendering + vsync)

All you have to do for slow motion is to have a multiplier for it

player.x = player.x + (player.velocity * player.speed * dt * speed)

@xianc78 I would also recommend that you do actually take the time to add a camera offset because slight camera smoothing adds a lot of juice to the game

You have scrolling levels, yeah? So you should already have a camera. An offset and a increment to get close to the "goal" location on the player relative to how far away the camera is from the goal is only a couple lines but adds a lot. Then for shake you randomise it, hints in video #2

Also:
youtu.be/Fy0aCDmgnxg
youtu.be/tu-Qe66AvtY

@xianc78 >Having your logic advance statically per frame isn't a good idea

Specifically, either you told monogame the exact framerate it should have or you're relying on undefined behaviour. It might play at 2x or 0.5x speed on someone elses system with 30hz or 120hz screens

If you do manually specify it then it's wasting resources or is artificially laggy, plus possible artifacts like screen tear

>player.x = player.x + (player.velocity * player.speed * dt * speed)

Well, rather you'd have something like

local speed = 1
function mono.update(dt)
dt = dt * speed
player:update(dt)
enemies:update(dt)
...
end

So, you're either using a system where it's really easy to add slowmotion or you have a bad system (prolly, I'm making assumptions)

Sign in to participate in the conversation
Game Liberty Mastodon

Mainly gaming/nerd instance for people who value free speech. Everyone is welcome.