Skip to main content

262. Unity3d Tutorial - Preprocessor Directives Intro

See video

We continue with another tutorial in our Hack And Slash demo made with the Unity3d Game Engine.

In this Unity3d game development video tutorial, we are going to start looking at preprocessor directives and how they can save us some time. We will take a look at the #define and #if #else #endif commands today,

Enjoy!

Community donated assets can be found here: http://www.burgzergarcade.com/catalog/educational-use ;

Save time typing out the scripts, or just buy me some coffee: http://www.burgzergarcade.com/product/tutorials/hack-and-slash-tutorial-...

Models purchased from:
http://www.frogames.net?r=9

Tags:

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Offline
Joined: Nov 1 2011

Hi, Great Petey!

I am an artist, not a programmer, but I always want to make my game (with your tutorials maybe I will:)) I just started, now I'm finished 32nd tutorial, and almost no problem (except my stupidity) all works fine. But I have few question. Because I'm VERY bad programmer this is very important for me.

1. First question is, I saw there is no sign of market (buy/sell) tutorials (maybe I wrong?). So, will you make a shop tutorial(and when)?

2. Your scrips is fantastic, but I want few different things. I'm interesting now hard be integrating this things in code (especially for me):
- Firearms(guns (and enemy must have it too)) and switch from third person view to first person view (with different type of weapon)
- Drivable cars
- Some stealth elements (AI does not need to see you through walls)

Is it all really hard to make?

3. I want to save many things in the world (dead body for example will not disappear a long time (and must have a item inside)) And how it's better to do - big world without loadings, or must be better many medium (or even small) levels? And how good unity will work with thins like this?

All of this is not a joke, I know it's must look like another "GTA KILLER", but I have other vision, and without this features game will not like I want to see. It's not like "I added this, because it's cool!" I still can live without a lot of this, but I'm be very sad :'(

All I want to ask, is not how exactly do this, but at least with which scripts to work, without unwanted headache. Ohh, I think I write too much already... Sorry for stupid questions and my English. Please answer. Thank you :)

Offline
Joined: Apr 16 2011

Peteys hack n slash scripts can be bought here http://www.burgzergarcade.com/product/tutorials/hack-and-slash-tutorial-... for $10 and is a great buy.

if you want to make a fps type game go here http://www.unifycommunity.com/wiki/index.php?title=Tutorials and check out m50's tutorial, the deathmatch tutorials, and I believe the tornado twins have a tutorial on fps games on youtube.

the stealth thing can be mimiced by implementing distance and direction as Petey shows in his earliest part of the tutorials to call a function like attack/search/whatev and execute it.Also you should look into occlusion culling which they deal with in 3dbuzzes unity3d tutorials as well as chaninging camera perspectives.

Bodies I would use ragdolls for and I would have the character drop an item by using an on death trigger or something and have it so that when the character gets within range of the item it could show what it is and require the player to press a button or automatically be collected by passing over it, or have the item move towards the player and being collected with a simple move script.

Large MMO style worlds have tile setups so when you reach one edge your moved to another.

Making a game requires time and dedication more than anything.I gotta go to work will continue later.

Offline
Joined: Nov 1 2011

>>Making a game requires time and dedication more than anything.

O, yeah, you don't tell me :) I'll be happy if I can make at least half of what I planned. But I'm still want to make it.

P.S.2 I wonder, does unity have some kind of a cutscene editor, or I need to do everything manually?

Petey's picture
Offline
Joined: Feb 3 2010

There use to be one in a beta stage. Not sure what happened to it though. Google around for it might turn up a version of the package.

Offline
Joined: Nov 1 2011

found it one:
http://www.matthewminer.com/2010/unity-cutscene-editor-initial-release/

But I still want to know, do you planned make the buy/sell tutorial?