Discord
Login
Community
DARK THEME

I once again need ideas

You can play my game and give me suggestions. Also the game is not close to being finished yet.

The game: https://microstudio.dev/i/Luikura/blueball/

While playing your game, I found it was a little disorienting to have the camera so zoomed in. It could be a design choice, because a lot of the platforming revolved around the player not knowing what was ahead. I would suggest maybe toying around with the screen.setScale(ScaleX, ScaleY) It's quite intuitive, and it would make your game a lot better.

Mechanically wise, I also notices that the collision felt a little "Mushy" where you can clip into an edge of a block. The main Reason for this would be that the X and Y are checked together, and it gets all screwed up I would recommend doing something along the Lines of:

local width = 10
local scale = 5
local moveX = 1
local moveY = 0
local unstuckX = 0 //This is the direction we are stuck Horizontally
local unstuckY = 0 //This is the direction that we are stuck vertically
player.grounded = 0 //We always assume that the player is not grounded

moveX = (keyboard.LEFT-keyboard.RIGHT)

player.x += moveX //Move the player by the amount calculated
player.y += player.velocityY //Move the player by their Y-Velocity
player.velocityY -= 0.12
moveY = abs(player.velocityY)/player.velocityY //This determins the overall vertical direction were traveling

if check_collision(player.x+width*moveX, player.y, mapWidth, mapHeight) == 1 then //Sideways Collision
  unstuckX = -moveX
end

if check_collision(player.x, player.y+width, mapWidth, mapHeight) == 1 then //Upward Collision
  player.velocityY = 0
  unstuckY = -1
end

if check_collision(player.x, player.y-width, mapWidth, mapHeight) == 1 then //Downward Collision
  player.grounded = 1
  player.velocity = 0
  unstuckY = 1
end

while unstuckX != 0 do // If a collision happens sideways, we slowly back ourselves out
  player.x += unstuckX*0.05
  if check_collision(player.x+width*unstuckX, player.y, mapWidth, mapHeight) == 0 then
    break
  end
end

while unstuckY != 0 do //If a collision happens vertically, we slowly back ourselves out
  player.y += unstuckY*0.05
  if check_collision(player.x, player.y+width*unstuckY, mapWidth, mapHeight) == 0 then
    break
  end
end

if player.grounded == 1 and min(keyboard.UP+keyboard.SPACE, 1) then //If we found the player grounded, and they jumped, we add 5 velocity
  player.velocityY += 5
end

This is just a quick example, I did not test it, but it is a very good outline for a basic way to add collision to your game, so it's not nearly as mushy

One final thing I noticed is a lack of background. Again, it might be a design choice, it's up to you, but adding a background, maybe even some Paralax (There are plenty of Libraries/Examples using this) is an excellent way to elevate your game, and make it feel more responsize and alive.

Post a reply

Progress

Status

Preview
Cancel
Post
Validate your e-mail address to participate in the community