Jump to content

Making a Game in Unity 5

clementk

I decided i would make a Topic if people wanted to follow i will try to keep things more up to date :D on the project. here was the first post this is what i had done so far did not have much time to work on it but i am planing to do more in the next few week

 

Update #1:

 

> Just get the basic moments set

> got some kind of gun firing

> Objects that take damage from player weps.

 

 

 

Update #2:

 

> Made Models for the Player and some turrets and basic texture (will probably change)

> Turrets now aim at player and shoot when they will hit.

> Player is more accurate and both guns shoot same spot.

> Some cleanup on moment script and few other scripts

 

 

 

 

Next Update on last replay.

 

Remember to follow xD

 

Go to last posts for Updates :D

Needs Update

Link to comment
Share on other sites

Link to post
Share on other sites

Looks pretty good! Definitely interested!

Blue Jay

CPU: Intel Core i7 6700k (OC'd 4.4GHz) Cooler: CM Hyper 212 Evo Mobo: MSI Z170A Gaming Pro Carbon GPU: EVGA GTX 950 SSC RAM: Crucial Ballistix Sport 8GB (1x8GB) SSD: Samsung 850 EVO 250 GB HDD: Seagate Barracuda 1TB Case: NZXT S340 Black/Blue PSU: Corsair CX430M

 

Other Stuff

Monitor: Acer H236HL BID Mouse: Logitech G502 Proteus Spectrum Keyboard: I don't even know Mouse Pad: SteelSeries QcK Headset: Turtle Beach X12

 

GitHub

Link to comment
Share on other sites

Link to post
Share on other sites

Will add range to the turrets and give them hp. It's the same code as the blocks so it's not that had. Just need to make a model where the turret is broken

Needs Update

Link to comment
Share on other sites

Link to post
Share on other sites

Are the turrects using players position or AI  e.g. calculated by vision /  scanning raycasts?

Because if it is immediately taking players position and shooting at player is not very fun thing. (because -
1# they always know where at which coordinates you are (e,g, in real life it doesnt work that way, often you opponent must calculate / assume your position and make a decision about heading towards you which may or may not be rewarding for him )
2# it is really boring after few minutes of gameplay since player just needs to keep moving and the turret wont hit him (ofc when there are multiple turrets it is quite tricky but you get the point)

The point is to have something take position of player he last saw him , and calculate whereabouts he is now -
He will stard looking at the calculated position
IF he will see the player he will start to shoot  and based by players assumed velocity and direction of walking he is continuing to shoot - often successfully because that's how in a real world it works when  someone is shooting after you.

Link to comment
Share on other sites

Link to post
Share on other sites

Also i see you are using general mouseclick as command to shoot.

Well try to organize it somehow because i saw that when you click on some menu button it will shoot aswell.  This should not happen (generally, not good practise)
Try to separate UI layer from Game layer.

E,G  you can overlay UI elementes with layer so it wont do anything in game..

if (leftMouseButtonDOWN){
        if (cursor.isOnUILayer){
        
       //basically nothing, or something like updateUI(); a.et.c.  generaly unity handles the input on UI so you don't need to do anything in here, but you can so i leave it          //here ,  ofcourse if you will not do anythign with UI in this condition  you can reverse the condition with !leftMouseButtonDown just for the sake of organized code.
        }
       else{
              shoot();
}
}
}

And maybe delete the destructed objects after while or do some kind of optimization (if you havent done any,yet)  since after few destroyed buildings there will be many objects spawned and it may do some performance issues.

Also mind that when doing multiplayer game (if it by any chance will be multiplayer , dont know what are your ideas with this)  

Have in mind that you must cleverly store variables for ammo and health and position e.h avoid storing those  variables on players PC and not on server   since you can always change the value in memory of your own computer and therefore have for example bigger health e.t.c. if it isn't checked on server afterwards.
(e.g.  server just handles the connection and not the variables itself it happens that you can change the value in ram for ammo and you will have additional AMMO because nothing on server is checking if you have proper number of ammo e.t.c. ) 

Link to comment
Share on other sites

Link to post
Share on other sites

It's so great that it's so easy to make something look that pretty in Unity 5 with the new lighting. Really like the dark aesthetic!

Link to comment
Share on other sites

Link to post
Share on other sites

Also i see you are using general mouseclick as command to shoot.

Well try to organize it somehow because i saw that when you click on some menu button it will shoot aswell. This should not happen (generally, not good practise)

Try to separate UI layer from Game layer.

E,G you can overlay UI elementes with layer so it wont do anything in game..

if (leftMouseButtonDOWN){

if (cursor.isOnUILayer){

//basically nothing, or something like updateUI(); a.et.c. generaly unity handles the input on UI so you don't need to do anything in here, but you can so i leave it //here , ofcourse if you will not do anythign with UI in this condition you can reverse the condition with !leftMouseButtonDown just for the sake of organized code.

}

else{

shoot();

}

}

}

And maybe delete the destructed objects after while or do some kind of optimization (if you havent done any,yet) since after few destroyed buildings there will be many objects spawned and it may do some performance issues.

Also mind that when doing multiplayer game (if it by any chance will be multiplayer , dont know what are your ideas with this)

Have in mind that you must cleverly store variables for ammo and health and position e.h avoid storing those variables on players PC and not on server since you can always change the value in memory of your own computer and therefore have for example bigger health e.t.c. if it isn't checked on server afterwards.

(e.g. server just handles the connection and not the variables itself it happens that you can change the value in ram for ammo and you will have additional AMMO because nothing on server is checking if you have proper number of ammo e.t.c. )

I am using the players position but I will make the turrets move around and will only shoot when a player gets in the FOV of the turrets and if the player breaks the sight it will reset. The menu was just temp to be able to quit. I will make a menu when you press Escape. I will add a setting to make the objects disappear from a few seconds to unlimited since some pc's like mine can handle it. Will definitely msg you of I need help seems like you know unity well.

Needs Update

Link to comment
Share on other sites

Link to post
Share on other sites

Here was a other game I made but I lost the files long time ago :(

This was with unity 4 still

Needs Update

Link to comment
Share on other sites

Link to post
Share on other sites

I am using the players position but I will make the turrets move around and will only shoot when a player gets in the FOV of the turrets and if the player breaks the sight it will reset. The menu was just temp to be able to quit. I will make a menu when you press Escape. I will add a setting to make the objects disappear from a few seconds to unlimited since some pc's like mine can handle it. Will definitely msg you of I need help seems like you know unity well.

 

yup message me if you will have any questions, iam glad to help.

Link to comment
Share on other sites

Link to post
Share on other sites

  • 3 weeks later...

Update 3:

 

>Just worked on some of the Enemy FOV with ray-casts.(still work in progress)

 

Upcoming:

 

>Turret Rotation only when player is spotted

>use Last know location

>random search rotation.

 

Needs Update

Link to comment
Share on other sites

Link to post
Share on other sites

Update 4:


 


>Added the last know location as well as a way for all turrets to work together.


>turrets have HP now and will Explode(temp Mesh)


>added some Free Background music from Store


>Debug Rays now show red when hitting player and green when not hitting player


 


Upcoming:


 


>Turrets looking for player when he is in unknown location.


 



Needs Update

Link to comment
Share on other sites

Link to post
Share on other sites

  • 1 month later...

Update 5:

 

 

This was a big update.

 

>New Environment with some plants to counter the plan look.

>Changed lighting to look better.

>Added music from the Store to test.

>Made better effect when shooting soon to be added to turrets.

>Each Turret now works by itself and will not swarm to player.

>Block Base level's that will make levels be able to be generated at random.

 

Known Bugs.

 

Turrets lose FOV when turning 90 degrees to the sides.

 

 

Please let me know what you guys think what can be changed and if you maybe would like a web based demo ?

Needs Update

Link to comment
Share on other sites

Link to post
Share on other sites

this is really awesome :D

[spoiler=My PC]

Spoiler

CPU: Intel Core i7 6700K | COOLER: Corsair H105 | MOBO: ASUS Z170i Gaming Pro AC | RAM: Corsair LPX DDR4 16GB 2400MHz | GPU: EVGA GTX 980 Classified | CASE: BitFenix Prodigy | SSD: Samsung 950 Pro 512GB | PSU: XFX XTR 650W [spoiler= Le Other Stuff] Monitor: BenQ XL2411Z | Keyboard: Ozone Strike Pro | Mouse: A4 Tech X7 F4 | MousePad: Ozone

Spoiler
Spoiler

PlayStation 2 | PSP 2000 | Game Boy Color | Nintendo DS Lite | Nintendo 3DS | Wii

Spoiler

Sony Xperia J (Why u so bad D:) | iPod 4th gen | iPhone 4 | Yarvik Xenta 13c (3muchchrome5her)

Spoiler
Spoiler

Pentium B980 | 500GB WD Blue | Intel HD Graphixxx | 4Gegabeytes of REHAM

Current OS: MSX 10.0 ( ͡° ͜ʖ ͡°)Ilikethelennyfaceyouknow( ͡° ͜ʖ ͡°) Windows Password Reset Guide

Link to comment
Share on other sites

Link to post
Share on other sites

this is really awesome :D

Thanks will do a Update video later today i have added lots of stuff and its now infinite room spawning.

Enemys also have better lasers and now break on Explosion.

Needs Update

Link to comment
Share on other sites

Link to post
Share on other sites

Thanks will do a Update video later today i have added lots of stuff and its now infinite room spawning.

Enemys also have better lasers and now break on Explosion.

in which language are you programming btw?

 

I'm kinda hyped for the Source 2 Engine :D I am about to lear Python, I hope the Source 2 supports it

[spoiler=My PC]

Spoiler

CPU: Intel Core i7 6700K | COOLER: Corsair H105 | MOBO: ASUS Z170i Gaming Pro AC | RAM: Corsair LPX DDR4 16GB 2400MHz | GPU: EVGA GTX 980 Classified | CASE: BitFenix Prodigy | SSD: Samsung 950 Pro 512GB | PSU: XFX XTR 650W [spoiler= Le Other Stuff] Monitor: BenQ XL2411Z | Keyboard: Ozone Strike Pro | Mouse: A4 Tech X7 F4 | MousePad: Ozone

Spoiler
Spoiler

PlayStation 2 | PSP 2000 | Game Boy Color | Nintendo DS Lite | Nintendo 3DS | Wii

Spoiler

Sony Xperia J (Why u so bad D:) | iPod 4th gen | iPhone 4 | Yarvik Xenta 13c (3muchchrome5her)

Spoiler
Spoiler

Pentium B980 | 500GB WD Blue | Intel HD Graphixxx | 4Gegabeytes of REHAM

Current OS: MSX 10.0 ( ͡° ͜ʖ ͡°)Ilikethelennyfaceyouknow( ͡° ͜ʖ ͡°) Windows Password Reset Guide

Link to comment
Share on other sites

Link to post
Share on other sites

in which language are you programming btw?

 

I'm kinda hyped for the Source 2 Engine :D I am about to lear Python, I hope the Source 2 supports it

well unity uses C# and Java Script i mostly use java script since i know java( i know it not the same xD) but i just like how easy unity3d is i wanted to go to Unreal but it just works so different that i stayed with Unity

Needs Update

Link to comment
Share on other sites

Link to post
Share on other sites

well unity uses C# and Java Script i mostly use java script since i know java( i know it not the same xD) but i just like how easy unity3d is i wanted to go to Unreal but it just works so different that i stayed with Unity

Yea, Unreal is very powerful, though very complicated....

[spoiler=My PC]

Spoiler

CPU: Intel Core i7 6700K | COOLER: Corsair H105 | MOBO: ASUS Z170i Gaming Pro AC | RAM: Corsair LPX DDR4 16GB 2400MHz | GPU: EVGA GTX 980 Classified | CASE: BitFenix Prodigy | SSD: Samsung 950 Pro 512GB | PSU: XFX XTR 650W [spoiler= Le Other Stuff] Monitor: BenQ XL2411Z | Keyboard: Ozone Strike Pro | Mouse: A4 Tech X7 F4 | MousePad: Ozone

Spoiler
Spoiler

PlayStation 2 | PSP 2000 | Game Boy Color | Nintendo DS Lite | Nintendo 3DS | Wii

Spoiler

Sony Xperia J (Why u so bad D:) | iPod 4th gen | iPhone 4 | Yarvik Xenta 13c (3muchchrome5her)

Spoiler
Spoiler

Pentium B980 | 500GB WD Blue | Intel HD Graphixxx | 4Gegabeytes of REHAM

Current OS: MSX 10.0 ( ͡° ͜ʖ ͡°)Ilikethelennyfaceyouknow( ͡° ͜ʖ ͡°) Windows Password Reset Guide

Link to comment
Share on other sites

Link to post
Share on other sites

Will do an update later today have done lotsbob it.

Needs Update

Link to comment
Share on other sites

Link to post
Share on other sites

  • 8 months later...

Update 7:

 

Bugs Fixed:

>Turret FOV now has better vision and will not lose player if they move past them.

 

Updates:

>Also made turrets aim to the center of the player

>Added the Start of the Shield System that Glows when Hit

 

Performance:

Turrets are not optimal and will need to be fixed later.

 

 

Needs Update

Link to comment
Share on other sites

Link to post
Share on other sites

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

×