Too many cube runners?


I made this after seeing a cube runner created on UE4 from "Dev Enabled" on Youtube. With UE4, the user interface feels a lot more easier to use but the coding with nodes still feels somewhat awkward and coding with C++ feels even more difficult. I still want to keep at learning UE4 especially with C++.  I wanted to compare what it would be like developing something similar with Unity 

It took me about a week to develop this with Unity, however, it is not entirely bug free. Between some play boards there are gaps, I was not sure how to remove, but it did not affect game play too greatly just visually unappealing. The jump key use to be in FixedUpdate and with GetButton however, if one were to hold down the spacebar, the cube would fly forward resulting in hitting an obstacle. This was fixed from changing GetButton to GetButtonUp but to use GetButtonUp, it had to be moved to the Update function else it would miss some jumps. That is why, the spacebar felts a bit laggy in the input. Some original level designs were a lot more difficult due to the responsiveness of the spacebar but had to be made easier. I still feel the game is on the difficult side though.

Originally the score was how many frames were passed, but it was apparent that changing the UI in every update call, lagged the game tremendously. I learned how to make a 2D infinite runner with Lynda awhile back, so how it works is the player is stationary but everything around the player is towards it. So with Cube Runner, there is only ever 3 platforms spawned, 1. the platform the player has already finished, 2. the platform the player is currently on, and 3. the future platform.  How I decided to make the score is whenever 1 hits the de-spawn collider, the player's score goes up by 1 which means he has completed that platform.

One reason for taking a week, is I got a bit overconfident with the animator of how awesome I thought the job animation looked.  Thus, I wanted all movements to be flips like that, however, after a few days I decided that is not quite feasible due to the rate of the incoming floors is fast, and the movement is too discrete. If the player is stationary and hits the rear invisible collider keeping the player inside the camera view, should the game end, or would the player just collide it and drag? The player collide and drag, it could put the player out of sync with the next obstacle because they are smoothly coming at a certain rate. Players would be forced to stay at the rear invisible collider to move at a constant rate. If the game would end if player hits the rear and game over then game play would have to be completely changed. Movement of the floors would have to be more jerky to be discrete, and obstacles would have to be spaced in a particular way to accommodate the discrete movement of the player. The idea of discrete movement reminds me something similar to the game "Crossy Road" or "Frogger." 

Anyways when I get better at UE4, I'll try to make a Crossy Roads or Frogger clone with it. 

Files

CubeRunner.zip Play in browser
Jul 12, 2019