January 19, 2019, 03:11:08 AM

Author Topic: [WIP] TankMania - Syntax Bomb Game Competition Sept to Oct 2018  (Read 2964 times)

Offline 3DzForMe

  • Sr. Member
  • ****
  • Posts: 288
Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
« Reply #15 on: September 18, 2018, 09:14:16 PM »
That is tank tastic looking indeed!
happy coding ;)

Offline Steve Elliott

  • Hero Member
  • *****
  • Posts: 1367
Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
« Reply #16 on: September 18, 2018, 09:30:49 PM »
What did you use for modelling Qube?
Windows 10, 64-bit, 16Gb RAM, CPU Intel i5, 3.2 GHz, Nvidia GeForce GTX 1050 (2Gb)

MacOS Mojave, 64-bit, 8Gb RAM, CPU Intel i5, 2.3 Ghz, Intel Iris Plus Graphics 640 1536 MB.

Offline Qube

  • Administrator
  • Hero Member
  • *****
  • Posts: 1358
Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
« Reply #17 on: September 19, 2018, 03:05:24 AM »
What did you use for modelling Qube?
Nothing :P - The tank and the maze walls were part of a £5 asset pack. As I'm just learning Unity and hope to complete something for the comp I decided to skip the whole creation of assets and concentrate on learning, coding and gameplay. There will be a few self crafted assets but I'll be keeping that side down to a minimum this time around as most of my time is research and learning.

But generally I use Cheetah3D, for example https://www.syntaxbomb.com/index.php/topic,3325.msg7762.html#msg7762 - All of that was done in Cheetah3D.

After this initial learning experience I'll be diving into PBR model creation. I'm sure that'll be fun :o
Until the next time...

Offline Qube

  • Administrator
  • Hero Member
  • *****
  • Posts: 1358
Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
« Reply #18 on: September 20, 2018, 12:44:29 AM »
Boring Unity ramble warning :

I've had a wonderful few days figuring out GUI stuff like having it scaled per resolution, updating GUI elements and the biggest pain was sharing variables between game objects / scripts  >:(

Accessing variables and game object info from other game object scripts... What a pain!

Turns out the easiest way ( for me anyway ) was to create an empty object, give it a script and in there you plonk any variables, references to GUI elements and references to game objects that you need to access / make changes to from multiple scripts.

Then in the other game scripts you programatically ( not drag and drop ) add a reference to the GameManager object and voila, you can now easily access variables and make changes to GUI elements from any other script.

Unity has multiple ways of doing things and in all the tutorials I've watched all of them have never mentioned once about loosing dragged and dropped references when you make that object a prefab ( for spawning multiple of amongst other things ).

For example, you drag your enemy tank model onscreen and attach a script to it. In that script you write the line :

Code: [Select]
public Transform goal;

In the editor you click on your enemy tank model and in the inspector you see "goal" ( which is blank ). You then drag your player tank onto the "goal" and yippee, you can access your player tanks location from the enemy tanks script and code your chase routines, etc etc. Sounds cool, huh!

This is how all the tutorial videos I've watched do it. Cool beans, good to go you think.

Then you decide, well, I'm going to have loads of tanks so I'll need to spawn when needed. With that you make your enemy tank a prefab as you'll be spawning tanks from the very start and we don't want to pre-place them on the map.

Guess what happens then?... Yup, it looses it's "goal" reference and it becomes blank. Now you spawn a tank and it sits there like a dumb twat! it doesn't know where to go.

Also you can't drag your player tank into the "goal" variable when the enemy tank is a prefab. You can if your player tank is also a prefab but I'm not going down the route of making every bloomin object a prefab. I think I'll end up in hell on larger projects.

So after a lot of faffing around and even more reading I'm now the proud owner of an invisible GameManager object which has all the variables / references I need to have access to from various scripts.

Now I know, it'll be a piece of cake in future. I just wish that those making tutorials would at least say "This method is fine until you make your game object a prefab" - I guess they are just showing the easiest method of doing something.

No doubt the more experienced Unity users will be laughing at all this. I also suspect there may be an even easier way of doing it. But for now I like the idea of having a centralised method of easy access to any game elements that I need to change from any game objects scripts.
Until the next time...

Offline GW

  • Full Member
  • ***
  • Posts: 151
Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
« Reply #19 on: September 20, 2018, 04:50:15 AM »
The biggest hurdle i think is in learning the 'unity way' of doing things. When you just start out you don't know what's already built in and what you need to do yourself.
2 video resources I've found really helpful are: (youtube) unity3d.college and (youtube) quill18creates.

Offline Qube

  • Administrator
  • Hero Member
  • *****
  • Posts: 1358
Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
« Reply #20 on: September 20, 2018, 05:24:23 AM »
The biggest hurdle i think is in learning the 'unity way' of doing things. When you just start out you don't know what's already built in and what you need to do yourself.
Spot on, you definitely have to learn the "Unity way" of doing things. Doing things via a visual editor and attaching code is completely new to me. On top of that the Unity API is huge so you spend a long time researching every little thing to begin with just in case it's already covered. I can see why people loathe it and I was in that camp for many years of quickly playing with it. You really do have to dive in and persist until things start to gel.

Then you have the Unity "experts" and the accompanying gob shites that want to force their way of working as the only way of working. You also get those that are very familiar with Unity and just spit at newbie questions which they answered years ago. Luckily thats not the full picture and there are a good load of helpful users around.

My best advice to new users of Unity is patience, expect to find good and bad advise and work out what's best for you.

2 video resources I've found really helpful are: (youtube) unity3d.college and (youtube) quill18creates.
Thanks, not come across those yet, will take a look. One resource I've viewed a lot is https://www.youtube.com/user/Brackeys/videos - He goes though things very fast and I end up rewinding quite a lot but his tutorials are pretty helpful at getting a grip on things.

The maze comp was a perfect excuse to learn something new and give myself a challenge. Not sure if I'll finish in time but I will finish the game regardless.

On the surface the game I'm doing for the comp is a simple one but it contains many elements that will be very useful for any further games. Every step has been a struggle but I'm having blast learning something new ;D
Until the next time...

Offline Qube

  • Administrator
  • Hero Member
  • *****
  • Posts: 1358
Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
« Reply #21 on: September 21, 2018, 06:18:24 AM »
\o/ After a long slog I've managed to the get enemy tanks firing on the player. They only fire when there is a clear line of sight and the angle they are facing you has a chance of hitting you. Took a long time to figure this out but the code will be handy for future games.

The tanks are also a little dumb and will cause damage to each other if they are firing at the player when another enemy tank is in the way. I'm happy with that as it's a little fun and I don't want to get too serious with my first outing with Unity. Also some of the enemy tank movements are a little slippery. This can be fixed with additional code but I'll visit that last when the game is done. I also need to change the enemy tank rocket trails to another colour ( different to the main player ) but that should be straight forward.

Overall I'm enjoying my adventures in Unity. I've still masses of it to learn but this game has turned out to be a good starting point to learn some basics. I'm quite happy with how my first Unity game is shaping up. It'll be a little rough around the edges but you have to start somewhere.

For a mini stress test of the code I added 20 enemy tanks to come after me. They don't cause damage to the main player yet but that's easy enough to add in.

Off we go with another exciting 1080p 60FPS video :

Until the next time...

Offline Derron

  • Hero Member
  • *****
  • Posts: 1553
Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
« Reply #22 on: September 21, 2018, 07:16:15 AM »
If your plan isn't a "miniature look" (as if you play on a little toy-board with plastic tanks) then you should not use "Depth of field" in a so strong manner.
Explosions need to be a bit smaller I think.

Hud: you now say it was no real hassle to get that working (do not ask what you have to climb to make that work in Godot...) :-)


I bet it looks even better once you "pop up" the boost items (just grow them from the ground, swirl their z axis and increase scale in a "bounce interpolation"-way - so it grows a bit bigger than needed until it settles at scale 1.0).


Now back to your coding board.

bye
Ron

Offline Steve Elliott

  • Hero Member
  • *****
  • Posts: 1367
Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
« Reply #23 on: September 21, 2018, 08:41:20 AM »
Lots of tanks and total mayhem, I like it!   8)

Unity really shouldn't be a long slog though, Blitz3D never was.   ::)
Windows 10, 64-bit, 16Gb RAM, CPU Intel i5, 3.2 GHz, Nvidia GeForce GTX 1050 (2Gb)

MacOS Mojave, 64-bit, 8Gb RAM, CPU Intel i5, 2.3 Ghz, Intel Iris Plus Graphics 640 1536 MB.

Offline therevills

  • Sr. Member
  • ****
  • Posts: 412
Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
« Reply #24 on: September 21, 2018, 10:25:31 AM »
BOOM! Look at those explosions!

Offline Qube

  • Administrator
  • Hero Member
  • *****
  • Posts: 1358
Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
« Reply #25 on: September 21, 2018, 11:02:54 AM »
If your plan isn't a "miniature look" (as if you play on a little toy-board with plastic tanks) then you should not use "Depth of field" in a so strong manner.
Explosions need to be a bit smaller I think.
The tilt shift thing is just an effect I’m working on as part of a pickup. Not sure if they’ll make it into the game but that effect is not on by default.

The explosions are over the top on purpose ;D

Lots of tanks and total mayhem, I like it!   8)

Unity really shouldn't be a long slog though, Blitz3D never was.   ::)
I think I’m having a slog of a time as I’m more used to pure code rather than a visual editor and a its game coding API. Things I’ve struggled with now wil be super simple in future. Also I doubt I’d of done a game like this in Blitz3D as a first outing :P
Until the next time...

Offline BasicBoy

  • Full Member
  • ***
  • Posts: 104
Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
« Reply #26 on: September 21, 2018, 12:10:30 PM »
That looks pretty spectacular!

I think learning Unity could end up on my to-do list. It will keep me occupied over the winter months.


Offline iWasAdam

  • Hero Member
  • *****
  • Posts: 759
Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
« Reply #27 on: September 21, 2018, 12:11:33 PM »
It's certainly a wake up call style wise. Defiantly a clear look and play-style. one that I both like and impressed by.

Offline Matty

  • Hero Member
  • *****
  • Posts: 584
    • MattiesGames
Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
« Reply #28 on: September 21, 2018, 12:52:19 PM »
Looks pretty

Offline Qube

  • Administrator
  • Hero Member
  • *****
  • Posts: 1358
Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
« Reply #29 on: September 21, 2018, 08:02:32 PM »
Finally happy with the look and feel :) - Now onto pickups ( both good and bad ), different levels, slowly increasing difficulty and general gameplay additions and tweaks.

I *think* I've done all the hardest coding parts so hopefully I won't struggle much while still slowly getting to grips with it all.
Until the next time...