Jump to content
  • Advertisement
  • entries
    44
  • comments
    19
  • views
    2423

100 Days of VR: Day 7 Creating a VERY Simple First Person Shooter

Josh Chang

396 views

Welcome back to day 7, after the behemoth that was “yesterday’s” Survival Shooter tutorial, I’m itching to get back to coding something.

At this point, we have gained enough experience to start making some very simple gameplays on our own. And that’s exactly what I’m going to do!

Note how I say gameplay and not a full game.

In the future I’d like to be able to create a full game, but for now, I’d like to just focus on just being able to put what I learned to use.

Now the question is: what shall we make?

The answer: A first person shooter!

Why an FPS? Well, that’s because:

  • There are a lot of tutorials showing us how to make an FPS that I can reference.
  • I hope I can use this project as a base to start porting over the VR game logic.
  • How different could it be from Survival Shooter?

So let’s get started!

What I’m envisioning is a First Person version of the Survival Shooter that we just finished:

  • The players spawn in a simple environment.
  • Different types of enemies will spawn that chase the player.
  • We shoot them until they finally bring us down.

Also from this point on, these posts will probably finally be a lot shorter as each day I’ll be trying to figure out new code while writing my experiences.

Creating the environment

Getting assets for the environment

If there’s anything I learned from the past 3 tutorials is that we have to first setup the environment.

In the past 3 tutorials, everything has been provided for us, this time around, we have to somehow create them ourselves.

How hard could that be…. right?

Luckily thanks to the Unity Asset Store, I was able to find a couple of generous free 3D environment development kits.

The specific one that I’m interested is the Mega Fantasy Props Pack

 
0*9KM58056Y04RFWG4.png

I clicked download and then click Open in Unity. From there that launches the Asset Store in Unity.

Prior to this point, I already created a new project called First Person Shooter.

I downloaded the pack inside Unity and then imported it to my game.

You’ll see this folder in your Assets folder in the Project pane

 
0*CedDF4K26QI_5NOX.png

(Note, I also already created a Main scene)

From what we learned in the Survival Shooter from the previous tutorial, we’ll create parent environment object for everything.

After looking at the assets, I noticed something: there aren’t any assets for the floor.

After digging around, I found that Unity has their own terrain editing tools.

Using the Terrain Editing Tool

To start working with the Terrain editor, right click in the hierarchy and choose 3D Object > Terrain to create a terrain game object:

 
0*ED9U9j4FF-N2vEwi.png

Our terrain is just a white plane, however playing around with the tools provided, I learned a bit about how to make a floor.

The first thing to do is to change the size of the terrain.

Clicking on the terrain object, click the cog setting option and then under resolution, change the Terrain Width and Terrain Length to 200 to make it smaller

 
0*3o-pa4DEhaah4BSo.png

Next we want to change the material of the ground.

Under the Terrain component, we can select the 4th option to paint with a texture.

Under Texture, we want to add a texture, in this case, I’m going to pick the grass material that was provided by the Asset kit, specifically grass_1_fixed_d

Also after experimenting around a bit I found that being setting the size of the terrain to all be 1 makes everything looks better.

 
0*0jBsnYG87Ib0fv5H.png

And when you apply these settings you’ll have grass at its finest:

 
0*g-PVl27X-rcO-vUj.png

Ah grass!

I found out that you can add multiple textures to our “artist canvas”.

Once we have multiple textures, we can select our “color palate” and pick one of the multiple Brushes available to paint in the terrain.

Let’s add another texture to our terrain: Dirt_1_fixed_d and add the same settings.

 
0*kPUe1Yj7nKuCAtE2.png

Now we can paint around on top of our terrain.

I’m going to paint the center of the Terrain with dirt. This will be where we’ll add all the houses and other structures.

We’ll have something like this. Masterful, I know!

 
0*AqU6uBua6AQGYS1g.png

We might come back to this later (or spend an even longer time looking into how to make better terrains), but I think this is good enough for an example stage.

Before I move on, I do want to point out that there are other nifty features that you can use with the terrain system such as:

  • creating hills
  • adding water
  • adding trees and other simple foliage

However with all of that being said, I’m not going to play around too much with those features.

Adding the building

Now that I have created the floor, I’m going to go back to the prefab of the Mega Fantasy Props Pack and start laying them around our dirt patches.

Maybe add a couple of houses in:

 
0*2OxDHODnQGgn_akz.png

Maybe create a backyard by using the fences prefab, manually duplicating (ctrl + D) them, and manually move the new pieces to form a fence.

I created an empty object, Backyard to hold all of my fence pieces:

 
0*q7-KVC3Jo2KUK4d-.png

Make sure to include some space for the players to run into the backyard!

We also want to be able to run on the houses. Let’s add a stair to the roof of one of the houses, like so:

 
0*twrvRPpWFuRRK34J.png

This will be good enough for now.

There’s a lot left to be desired in the map, but for creating a simple environment for us to walk around, I think this is good enough.

Feel free to explore around and add some beds, shelves, and other miscellaneous things in and around the house, however, I’m going to call this a day and move on to the actual gameplay starting tomorrow.

But before I leave, I organized the environment together with an Environment parent object:

 
0*nc7_zbrPo9l1XYbv.png

Conclusion

See? Isn’t that much shorter than the past 6 days?

This might seem relatively shorter than the previous days, but that’s because I’m investigating while also doing some write-ups on the problems encountered, so please bear with me.

Today, we learned more about using assets from Unity’s game store and how to use the terrain system.

We also setup the assets that we downloaded.

Tomorrow, I’m going to start looking into how to create a character that we can control around and move.

Original Day 7

Visit the 100 Days of VR Main Page



0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Advertisement
  • Blog Entries

  • Similar Content

    • By JustACicada
      Random Number God has been updated to v1.1.0.
      This is an incremental (although not idle) game about defeating randomized robots by rolling dice and playing cards that alter those dice and their effects.
      Other than performance fixes, the game has been rebalanced from the ground up. Now it should progress in a more fluid fashion. An option to reset the game with a significant boost to your power has been added, allowing you to advance further than you could before.
      There is also now an option to significantly speed up battle animations. Once you learn the rules of the game, a battle can easily take <2 min.
      Windows, Linux: https://justacicada.itch.io/random-number-god
      Android: https://play.google.com/store/apps/details?id=samuelVazquez.randomNumberGod


    • By Jamesgz
      Hey my dudes,
      Me and 4 friends are third year compsci students. Three of us are pretty good at drawing. We are hoping to make a 2d roguelite game with unity during the next few months. We are still brainstorming. At the moment, my idea is to create a card roguelite game:
      First, you would need to choose 2 heroes to enter the dungeon with the goal of finding a treasure. The treasure found gives you extra bonus in later runs. You can choose between mage, gunner, rogue, paladin, warrior and fighter. Each hero has their own unique cards. And there are common cards that every heroes can get(like hearthstone).
      The progression system would be like slay the spire’s. You can choose your own path, but every paths leads to the boss. It would use procedural generation. After defeating an enemy, you get to choose a new card out of the three options. There would be shops, random events, elite enemies, etc
      The combat system is where i need some suggestions on. There would be two piles of deck. One for each hero. I can think of two good combat systems:
      1. Before every enemy encounters, you can choose what cards to use from your deck. Cards not used would not get discarded. Cards are drawn from the deck only if they break or due to special card’s effect. Every card have a durability number. Ones the durability reach zero, the card would break and can no longer be used. Events/enemies can modify the durability of the cards.
      2. Card not used this turn would get discarded. Once the deck is empty, the discard pile gets shuffled and copied to the deck. Card/item effects can increase the number of cards you draw.
      How can I make the game more interesting? Any suggestions would be appreciated.
    • By horror_man
      Hello, I'm currently searching for a talented and passionate programmer to create a small but great horror game that would take around 3 months to be done.
       
      About the game: The game would be a sci-fi/post-apocalyptic survival horror 3D game with FPS (First person shooter) mechanics and an original setting and story based in a book (which I'm writing) scene, where a group of prisoners are left behind in an abandoned underground facility. It would play similar to Dead Space combined with Penumbra and SCP: Secret Laboratory, with the option of playing solo or multiplayer.
       
      Engine that'd be used to create the game: Unity
       
      About me: I'm a music composer with 4 years of experience and I'm fairly new in this game development world, and I'm currently leading the team that'd be creating this beautiful and horrifying game. I decided that making the book which I'm writing into a game would be really cool, and I got more motivated about doing so some time ago when I got a bunch of expensive Unity assets for a very low price. However, I researched about how to do things right in game development so I reduced the scope of it as much as I could so that's why this game is really based in a scene of the book and not the entire thing (and also that's why it would take 3 months). Also I'm currently learning how to use Unity and how to model things with Blender.
       
      Our team right now consists of: Me (Game Designer, Creator, Music Composer, Writer), 3 3D Modelers, 1 Sound Effect Designer, 1 Concept Artist and 1 Programmer.
       
      Who am I looking for:
      - A programmer that's experienced in C# and with Unity.
       
      Right now the game is very early in its development (GDD is completed and all 3D Items, Music and Sound Effects are completed).
       
      If you are interested in joining, contributing or have questions about the project then let's talk. You can message me in Discord: world_creator#9524
    • By kcirkl
      Hello, 
      So, I'm aware this may be a broad question with a vast variety in the anwser. However, I am a game design student that works professionally for a large engineering company conducting software configuration. Naturally, I'm curious about the path ahead and I'm desperately gathering information on the overall process of developement with Unity. Are there professional resources available that can outline the processes and functions of the engine, and what can be used to interact with it? I'm looking for options other than the official documentation. I have already jumped into that. Thanks!
    • By tspartant
      Hey everyone! My name is Ryan and I am the founder of Visualistic Studios, LLC. 
      I'm looking for experienced developers interested in short term and long term contracting. For the past 3 years I've been working in game development contracting, and the past year I've been working full time from home. Since then, I've received more and more contracts and I'm now at the point that I have too many for myself to handle. I have at least another full time job's worth of programming offers, and around 30-80 hours a month for 3D modeling/animation. I also am in need of a UI artist, so if you're talented please contact me! I have contracts using Unity as well as Unreal Engine 4, so if you can program in either please contact me. 
      If you are interested in working on these contracts, please send me links to your work and you hourly rate. (Most contracts range be between 18-25$/h, but please provide your normal hourly rate)
      You can get ahold of me through email - "ryan.hobbs@visualisticstudios.com", or Discord "TSpartanT#4670"
       
      Thank you everyone for reading, hope to hear from you soon!
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!