Now Go Here
In Now Go Here the player drives around delivering packages and dodging other vehicles, until they run out of time.
The game started as an experiment into rotating GameMaker’s camera. I wanted to explore if a camera that follows where the player looked (with the mouse), could create an immersive experience that felt like racing through busy streets.
Players control this nifty vehicle, to glide through the streets and make deliveries.
The design of the craft came from a desire to show the delivery package once the player has picked it up.
Players score points based on how far away the delivery is and how damaged the package is. The craft also has a booster and deflector shield to help make all those deliveries on time!
Rotating Camera in GamerMaker
The idea for this camera system came from thinking about the original GTA game and wondered what it would be like if the camera rotated to follow the direction the player was driving. I couldn’t immediately think of a 2D style game where this had been done, so I thought it would be fun to try and make one using the mouse as the input for looking.
This is the first prototype of the movement and camera working together. It runs very smooth in GameMaker (not so much in this gif.) Below is the code I wrote to get it working.
Player Step Event
Most of the code runs in the Player’s step event. Look_dir is the key variable which tracks how much the mouse has moved on the X axis. This is then used to determine the image angle of the player sprite (and later the camera angle).
The trickiest bit was working out the calculation for movement. As the player and camera are rotated, WASD movement must all be calculated with vectors. Luckily lengthdir_x and lengthdir_y makes this pretty easy. Finally you also have to add 90/180/270 degrees to the calculation based on which way the player is trying to move.
Now Go Here uses GameMaker’s Box2D physics engine. To achieve the same results while using the physics engine, I adjusted the code to calculate a rotational force based on mouse movement. Then the forces is applied to the player object with physics_apply_torque().
Camera object, End Step Event
A separate camera object is used to work out where the GameMaker camera should be positioned and at what angle. The key thing here is to put the code inside the End Step otherwise it lags behind the players movement by a frame.
Top Down Art
One of the biggest downsides to this sort of camera system is making art for a completely 2D world. Lots of games use a lovely 2.5D style artwork, sadly this doesn’t work when you rotate the camera as the perspectives don’t work together.
Viewing everything in the world from above can be a bit lifeless. The original GTA game does a nice job of some fake 3D on the sides of the buildings which adds more character to the city.
One thing I’d like to explore more is the use of shadows. I had a quick play with the Eclipse Light Engine but ultimately removed it from the game because of time constraints. I think cleaver use of shadows could really help bring the world to life from this angle.
The 2.5D art of Stardew Valley.
Experimenting with shadows and tile sets.