From Prototype to Work of Art

Renato Figueiredo
3 min readDec 2, 2023

Objective: Transform our game with beautiful sprites.

Now we are going to upgrade the visuals of our game. Before we were only using primitive 3D objects, such as cubes and capsules.

Current visuals of our game.

And we are going to improve it to this!

Improved visuals of our games.

In order for us to be able to make such changes, outside of our Scripts, we are going to create new Objects using our sprites.

Starting with our Background, we just need to drag our new sprite for it into our Hierarchy.

Dragging our background sprite into our hierarchy.

Now we just make sure to adjust the image to fit our screen, by stretching it. We are also going to create a new Layer for our game, to make sure our character, enemies and our lasers are not stuck behind our background.

Creating our Background Layer and assigning to our Background image.

Now we need to re-create our Player, Enemy and Laser, to use our new 2D version and the improved visuals.

Creating our Player with our new sprite.
Creating our Enemy with our new sprite.
Creating our Laser with our new sprite.

Now we just need to make sure to add a Rigidbody2D and BoxCollider2D to our Player, Enemy and Laser. We have to make sure we don’t use any gravity, and that our Collider has the IsTrigger turned on.

Adding our Rigidbody2D and BoxCollider2D components.

Last we just need to make sure to adjust our code on our enemy, and change our OnTriggerEnter to the 2D version of it.

private void OnTriggerEnter2D(Collider2D other)

And now our conversion is complete. We have updated graphics for our game, and should make for a much more exciting gameplay!

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

No responses yet

Write a response