SyntaxBomb - Indie Coders

General Category => Worklogs => Topic started by: Qube on September 15, 2018, 02:12:50 AM

Title: [WIP] TankMania - Syntax Bomb Game Competition Sept to Oct 2018
Post by: Qube on September 15, 2018, 02:12:50 AM
WIP of a possible game for the comp - I present a super early look at "TankTastic" \o/

OK, not sure if this will actually turn into a full game or if I'll even get the time to do so. It's more of a "Qube adventures in Unity land" at the moment. I hope to complete it in time but we'll see ;D

The idea will be tank wars in a maze. You vs spawning AI driven enemies with pick ups to boost speed, power, weapons, health etc.

Not a whole heap to show at the moment and there's some geometry to fix ( flickering textures overlapping ). Next step is to dive into Unity's NavMesh thingamajig and figure out how that works + get enemy tanks to act accordingly. No idea how to do that yet but you gotta love a challenge :P

Very early WIP video ( 1080p 60FPS ) :

Title: Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
Post by: Derron on September 15, 2018, 08:24:19 AM
Any clue how many vertices are rendered per frame?
I have 300.000 for now (400 tiles with 8+ vertices each + the collectibles + creatures + particles) and my lighting setup already creates a 70% cpu load on one core. Your's looks "rounded" (more polys).


Bullet-Trails:
What did you have to do on your own and what was provided "somehow" by Unity already? I assume each bullet has some kind of particle system attached which gets disabled once it hits something ? At least I tink I would do it "that way".


Nav-Mesh:
In Godot I could have used that too - if I wanted a "free movement + collision" like you have in your demo/wip now. I took the long route of maintaining grid positions and checking simple boundaries on my own. I assumed that a "free collision check" is more expensive than a simple "gridCol <> otherGridCol" thingy. Am not sure it it was worth the hassle.


AI:
This will be the most _fun_ part once the other stuff is working.
Do not forget to have stuff like "speech bubbles": "Get ready to bumble!", "I will melt your nuts" (assuming they are mech-tanks with bolts and nuts), "Loosing is your hobby" ... and so on. Stuff you surely know from "Atomic Bomberman".


Items:
Slippery oil, bullet boost, rapid rails/tracks, Ronalds-Monster rocket (tears down a wall when hitting it), sand bags ("shoot" them and a "needs to get shot away"-sand-bag-wall is built there)
Maybe nice to have: a "ghost tank" (doing the exact same movement than yours - but mirrored), tank does not have impact when shooting



Keep going!

bye
Ron
Title: Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
Post by: Steve Elliott on September 15, 2018, 08:42:31 AM
Very swish, well done.  Tank games are cool  8)
Title: Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
Post by: GW on September 15, 2018, 09:38:30 AM
Good job! 
Title: Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
Post by: iWasAdam on September 15, 2018, 10:12:05 AM
Yep agreed, looking and playing very nice. it shows the power of Unity once you begin to get a grip on it.
Title: Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
Post by: blinkok on September 15, 2018, 10:42:35 AM
This looks lovely
Title: Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
Post by: Qube on September 15, 2018, 02:52:58 PM
Any clue how many vertices are rendered per frame?
I have 300.000 for now (400 tiles with 8+ vertices each + the collectibles + creatures + particles) and my lighting setup already creates a 70% cpu load on one core. Your's looks "rounded" (more polys).

There's a stats option which shows the below ( if it's go any help ) - I've still to look into batching and saving draw calls :

(https://www.syntaxbomb.com/images/TankTasticStats01.png)

Bullet-Trails:
What did you have to do on your own and what was provided "somehow" by Unity already? I assume each bullet has some kind of particle system attached which gets disabled once it hits something ? At least I tink I would do it "that way".

There is a feature called trail renderer which has all sorts of options. In this case I set the graph to reduce the tail end, created a particle shader material and set to adaptive blending. 

Nav-Mesh:
In Godot I could have used that too - if I wanted a "free movement + collision" like you have in your demo/wip now. I took the long route of maintaining grid positions and checking simple boundaries on my own. I assumed that a "free collision check" is more expensive than a simple "gridCol <> otherGridCol" thingy. Am not sure it it was worth the hassle.
I'll be playing with the nav mesh side today ( backup project before messing around ). Not sure how any of it works yet so no doubt it'll be youtube tutorials and lots of shouting at the screen.

Items:
Slippery oil, bullet boost, rapid rails/tracks, Ronalds-Monster rocket (tears down a wall when hitting it), sand bags ("shoot" them and a "needs to get shot away"-sand-bag-wall is built there)
Maybe nice to have: a "ghost tank" (doing the exact same movement than yours - but mirrored), tank does not have impact when shooting
If I get as far as a basic working game then I'll add in various items to enhance the game.

Keep going!
Will be doing :) - If it starts to turn into an actual working game then I'll concentrate on gameplay to make it a hopefully fun little game. It's all early days and most of my time is playing about and researching how stuff works.

Very swish, well done.  Tank games are cool  8)

Yes they are ;D Now get back to yours as I want to play it :P
Title: Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
Post by: Steve Elliott on September 15, 2018, 05:39:52 PM
Quote
Very swish, well done.  Tank games are cool  8)

Yes they are ;D Now get back to yours as I want to play it :P

Like-wise.  Yes I'm working on it  :D
Title: Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
Post by: Madjack on September 15, 2018, 06:56:59 PM
Tanks? Did somebody mention tanks?
Title: Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
Post by: Steve Elliott on September 15, 2018, 07:00:50 PM
Everybody, we are in the presence of greatness.  The original 'Tank Master'.

https://store.steampowered.com/app/19200/Tank_Universal/

https://store.steampowered.com/app/523030/Tank_Universal_2/

Title: Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
Post by: Madjack on September 15, 2018, 07:03:11 PM
Oh thanks. I just came back to have a look around but as I see the Blitz crowd are here, I'll have to make this site a regular port of call I think.
Title: Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
Post by: Steve Elliott on September 15, 2018, 07:05:56 PM
Yes there are plenty here from the old Blitz crowd lurking or posting.
Title: Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
Post by: Qube on September 16, 2018, 01:43:14 AM
Yay! it turned out to be a productive Saturdays worth of work \o/

I managed to get path finding sorted out and for enemy tanks to constantly hunt you down. Had to add some extra code in so the enemy tanks rotated towards you when they've hit the stop zone ( close to the player ). Needs a bit of tweaking but we're getting there and definitely a good start.

Also managed to add the tanks exploding and deleting the dead tanks and missiles. The enemy tanks don't fire back yet but that should be a similar method to the players tank firing.

Out of curiosity I tried a build on my laptop as I was getting concerned I was going over the top with shaders and lighting ( as this is mainly a learning test experience ). My laptop only has an integrated Intel Iris Pro 1536mb ( thanks Apple  :'( ) but luckily it ran at 1280x800 at 60fps albeit not at ultra quality though. Quite happy with that considering I've not looked at optimising much at all. I did manage to get some batching sorted so I'm sure that helped too.

I'm happy that I have the very basic elements of a game sorted. For Sundays session I'll look into some GUI elements and health bars for the player and enemies. After that I'll start on the gameplay and features. It's funny that I don't even know how to add sound yet or even do a title screen :P

A super duper 1080p 60fps vid :

Title: Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
Post by: Qube on September 18, 2018, 03:35:21 AM
Not a whole heap of progress over the last 48 hours. I've figured out how to do some onscreen info and also made the enemy tanks emit fire when damaged but that's about it. No need for another exciting video ;D

As mentioned elsewhere my biggest stumbling block is not with coding in C# but with learning how Unity works. It took me a long time to figure out how to link data from prefabs ( game objects ) to other game objects and how to read variables from each other. This side is full on OO in the way to works but once you get the idea of how Unity wants you to work it all makes a little more sense. I'm sure Unity users will laugh at that but it took a while for me to click on how it's all done ( I'm more of a crazy Global variable guy than pure OO ).

Slowly getting to grips with Unity and although it's a beast I'm just learning the sides I need to know in order to do my little tank game. Heaps to learn but for now I'm just keeping it as simple as possible in order to create something. For there I can expand out.

My tank game won't be optimised or resource friendly ( although I'm trying ) but I think for a first outing the main thing is to create a full game and work outwards from that.
Title: Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
Post by: Xerra on September 18, 2018, 05:35:54 PM
This makes me think of the old tank game that used to be a staple included game with some of the first mainstream consoles that did the rounds in the early 80's. Obviously they weren't at this perspective or anywhere near as awesome looking but for the day it was close to perfect two-player fun for me and my mates.

Get some mines in the game and extra weapons you can pick up and use for a short while here. A rocket launcher to punch out holes in the maze walls would be awesome.
Title: Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
Post by: 3DzForMe on September 18, 2018, 09:14:16 PM
That is tank tastic looking indeed!
Title: Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
Post by: Steve Elliott on September 18, 2018, 09:30:49 PM
What did you use for modelling Qube?
Title: Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
Post by: Qube 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
Title: Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
Post by: Qube 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.
Title: Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
Post by: GW 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.
Title: Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
Post by: Qube 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
Title: Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
Post by: Qube 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 :

Title: Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
Post by: Derron 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
Title: Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
Post by: Steve Elliott 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.   ::)
Title: Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
Post by: therevills on September 21, 2018, 10:25:31 AM
BOOM! Look at those explosions!
Title: Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
Post by: Qube 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
Title: Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
Post by: BasicBoy 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.

Title: Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
Post by: iWasAdam 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.
Title: Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
Post by: Matty on September 21, 2018, 12:52:19 PM
Looks pretty
Title: Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
Post by: Qube 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.
Title: Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
Post by: Steve Elliott on September 21, 2018, 08:13:11 PM
Quote
Finally happy with the look and feel :)

Looks great, the DOF effect does give the look of me without contact lenses though - ie not much is in focus at all  ;D

Quote
- Now onto pickups ( both good and bad ), different levels, slowly increasing difficulty and general gameplay additions and tweaks.

Yeah the fun part, so many possibilities here!  :D

Title: Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
Post by: Qube on September 23, 2018, 06:38:53 AM
Quote
Yeah the fun part, so many possibilities here!  :D
This is true and I have too many ideas flowing around. I need to be realistic in what I can learn / do in the time scale left  :o - My minimum aim is pickups, different weapons and boss enemies.

I spent today cleaning up a lot of code and rearranging it to reuse code across multiple levels. It's also been redone to allow for different settings per level. Each level is now in it's own container. I don't know if this is the right way of doing things or if they should be in there own scene. I guess I'll find out as I go along but it seems to make sense to continue on my centralised game controller object.

I've also tweaked the visuals a little and reduced the depth of field and added a touch of ambient occlusion. This has worked well and increased the colour dynamics. When I started out I didn't wan't it to be or feel like a "Unity" game. Unity gets a bad rep because of all the asset flips and users creating games with all the defaults and cut / paste scripts. Every parameter has been tuned to the best of my current ability and none of the scripts are cut and paste. I've spent a long time on the coding side and Unity is definitely not just a drag and drop game maker. C# is pretty easy to pick up but the Unity API is pretty vast and not super easy to learn quickly.

It's also crossed my mind that some may think it's been super easy creating this game ( drag, drop, yiippeee ). Nah, it's been a long hard road learning all this new stuff. For those that think Unity doesn't require coding, forget it, it definitely does. I've learned a lot and my next outing in Unity will be a little easier ( and less messy ), but believe me, it's not a magic bullet.

On an different note I've dived in and bought a license for the year  :D - I'm now the proud owner of the "dark theme" + I can set my own splash screen. After this comp I'll be leaping into an Oculus Go game ;D

( screen shot doesn't show much as moat is hidden in prefabs until the game is run )

(https://www.syntaxbomb.com/images/UnityPro001.png)
Title: Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
Post by: Steve Elliott on September 23, 2018, 10:53:44 AM
Quote
It's also crossed my mind that some may think it's been super easy creating this game ( drag, drop, yiippeee ). Nah, it's been a long hard road learning all this new stuff. For those that think Unity doesn't require coding, forget it, it definitely does. I've learned a lot and my next outing in Unity will be a little easier ( and less messy ), but believe me, it's not a magic bullet.

On an different note I've dived in and bought a license for the year  :D - I'm now the proud owner of the "dark theme" + I can set my own splash screen. After this comp I'll be leaping into an Oculus Go game ;D

Interesting, yes Unity does get a bad rap because people can easily buy graphics from the Unity guys, download some code and try and sell it as 'their' game.  Where as people like yourself are digging into the code and working on a game they (and me) would enjoy playing.

Ooo took the plunge then, well it's good to have a variety of tools.

The game is looking lovely, and certainly looks super smooth in your videos, plus you said you have many ideas for gameplay.  Sounds like a recipe for success.   :D
Title: Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
Post by: Qube on September 23, 2018, 05:12:53 PM
Quote
Interesting, yes Unity does get a bad rap because people can easily buy graphics from the Unity guys, download some code and try and sell it as 'their' game.
Yup, you can buy ( or get free ) complete game templates, change the graphics ( or not ) and a couple of bits here and there then shovel it out the door as your own. That is why I ban pre-made game templates as part of the comp. Of course, if said pre-made game template is your own work then that's fine.

At least I can say that even though this is my first game in Unity, there is no "default" setting on anything and no downloaded code.
Title: Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
Post by: Qube on September 25, 2018, 07:32:08 AM
Waffle update :P :

I pretty much have a working level structure \o/ - tanks auto spawn at various spawn points. Variable damage to tanks and the player is sorted. The code is structured to allow for different weapons and the player movement code has been redone to allow for power ups.

Audio is in but I want some sound effects to continue after a game object has died. I think this side is going to require an audio based game object, similar to my game management object. Attaching a sound effect to an event is super easy but controlling sounds via script requires a few more hoops to jump through. Once again this is something to dive in and learn but will be super useful for other projects.

Much much more to learn and do yet, keep plodding on Mr Qube :D
Title: Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
Post by: Derron on September 25, 2018, 09:00:23 AM
I think you could add your "non moving"-sounds to the level-object (if you do not want to have a sound manager thingy).
Assume you want to play some "echoed" explosion thingy. The debris of the tank is already deleted and nothing of the tank will be moving (so sound stays at the same spot in the level -  or at least "sound origin"). So just add a "sound source" entity thing to the level object until the sound finished playing.

A "SoundManager" is some kind of "global"/"singleton" and suited well for this situation.
In TVTower each playing sound is using "SoundSource" objects. They could be complex ones (referencing world objects and their position in the building/on the screen) or simple ones (checking an coordinate or so). Each SoundSource could setup volumes, panning, ... so you could play some "positional sound effects".
The SoundManager is there to maintain everything and update audio streams (think Unity handles that already ;-)).

A SoundManager might also be needed if you plan to have audio playing during scene changes. In Godot an scene-attached-audio would stop if you move on to another scene. Just think of a "game over screen" which oddly stops an explosion sound right after "you're a loser baby"-animation finished.


bye
Ron
Title: Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
Post by: Qube on September 26, 2018, 12:02:32 AM
Quote
I think you could add your "non moving"-sounds to the level-object (if you do not want to have a sound manager thingy).
That wouldn't work as the only effective non moving object is the players tank ( camera always looking at it ). Everything else is moving or spawned at different locations.

I only need to use the sound manager script for multiple sound effects on a object ( or random ones ). A lot of sounds are just played once with the object is awake, for example a missile gets launched or an explosion is triggered. It's also a super small script so I can just drop it on the objects that need it.

I have sounds and level music in now and tonight sorted out how to pause and resume the game. Pausing the games action was super easy but pausing / resuming sound & music resulted in a tiny script dropped on the sound effect. I would of thought Unity, being a game engine would actually have a proper pause / resume command which handles all this for you, but no. Ah well, that's another bit of script I can reuse in other games :D
Title: Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
Post by: Qube on September 28, 2018, 07:19:52 AM
Yay it’s the weekend \o/ - couple of appointments today and then I’ve a weekend free of pure game making indulgence ;D
Title: Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
Post by: Qube on September 29, 2018, 09:07:33 AM
Slow progress today  ::) - Todays work was finishing off the end of levels and moving on to new levels. Unity is very OO in it's approach and so I was stuck for a while on how to pass variables from scene to scene. Turns out its pretty straight forward ( when you know ) and all you need to do is set a script to not destroy itself when loading new scenes. Luckily my idea of a game manager / sound manager script was a good idea \o/ - now that those are both set to not destroy themselves on scene changes we're good to go.

I've made many mistakes with this game but also learned a lot for future games on how to structure things. Some parts of Unity are genius and some parts are just mind boggling. It's weird that some super advanced things are easy yet basic core game features require you to jump through hoops. I guess every game engine has it's plus and minus points.

I think I can whack and smash this into a game. Underneath it's not going to be pretty but unless you dive in and go for it you'll never get anywhere  ^-^
Title: Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
Post by: Derron on September 29, 2018, 12:35:43 PM
Hah, seems we need to switch engines (you godot and me fighting Unity) next compo :-)

I also came to the conclusion that for simple games there is no need to do some "advanced coding" - make it dirty and "at least it works". And let's hope that you won't come back to improve (or even extend!) your game later on.


@ keep alive
in Godot every object can be a scene (also the weapon can be a scene) so until I reload "game scene" things can kept in memory. So if I reload a level I just reload the level scene (and it re-initiates everything not parented "above" - or global). First I had a "reset()" function but reloading the entire scene wasn't that slower. That "scene approach" (instead of Unity's prefabs) is kind of cool but you also have to wrap your head around it.


Keep up progressing - my weekend is dedicated to friends and family - and to finish some board game (designed this week, printed yesterday and now needs to get glued on some wooden board ... 6 lane monopoly with 3d printed houses).


bye
Ron
Title: Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
Post by: Qube on September 29, 2018, 09:33:48 PM
Quote
Hah, seems we need to switch engines (you godot and me fighting Unity) next compo :-)
lol, no thanks, I've my handful with learning this and there's a tonne of stuff I've not even looked at yet :o

Quote
I also came to the conclusion that for simple games there is no need to do some "advanced coding" - make it dirty and "at least it works". And let's hope that you won't come back to improve (or even extend!) your game later on.
I'm trying to do things properly as the routines I've done during this learning experience will be invaluable on my next game.

Quote
Keep up progressing - my weekend is dedicated to friends and family
Kick em out and get on with it ;D
Title: Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
Post by: Derron on October 03, 2018, 11:40:24 AM
@ Qube
Maybe this is of interest for you:


https://www.blendernation.com/2018/10/02/shattering-objects-in-blender-destroying-them-in-unity/


bye
Ron
Title: Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
Post by: Qube on October 03, 2018, 09:00:15 PM
Nice little technique there for a faux CSG effect. I'm not going that far in this game but will be useful for future usage, thanks :)
Title: Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
Post by: Matty on October 04, 2018, 03:33:46 AM
Unity looks powerful...in the right hands.  I'm on a 2d web browser thing this year though but it does look good as does your game.
Title: Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
Post by: Qube on October 06, 2018, 08:37:14 AM
Last few days in my free time have been spent rearranging code :(

My initial ideas of a game manager and sound manger were correct but what I really needed were a global variable manager ( for vars that are needed to be accessed from anywhere ), a general game manager to handle the basic game play structure and finally a sound manager to handle effects and music changes.

It's all very well to be able to assign a sound when something "wakes up / starts" but what if you need to play multiple sounds per trigger? - There's possibly an easier way but for now I'm sticking with my sound manager class.

At least I now have a complete start to finish level with health boost and time boost power ups, death by damage and also running out if time. I've also done a preliminary title menu with GUI bits to take you into the game. Not sure how far I'll get with that side but the basics are in.

I've also added in explosions when a missile hits the tank and also when it hits a wall. The explosions are based on the impact point. Not a big game thing but something I wanted to get sorted for future use. Also the tanks now go on fire when they hit a certain damage point ( a useful thing to know how to parent an effect to an object and keep it going ).

Today I finally get to start on different levels. Every thing else is variable based so I can tweak the level difficulty. I would like to create some levels which go up and up but I'm not sure if I'll get the time to do that. I think I'll see if a more 3D level is possible to do time wise but as with everything else, I've no idea until I look into it.

Overall the structure of this game is a complete mess. Things are all over the place and it's becoming a nightmare to work with ( oo, the honesty :P ). Luckily I have a much better idea on how to structure my next game. I didn't expect my first Unity game to be pretty or structured but its been a great basics learning experience.
Title: Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
Post by: Derron on October 06, 2018, 09:09:28 AM
It's all very well to be able to assign a sound when something "wakes up / starts" but what if you need to play multiple sounds per trigger? - There's possibly an easier way but for now I'm sticking with my sound manager class.

Soundmanager.PlaySound(channelID = -1)
- each played sound corresponds to an entry in a dictionary/array/map/list
- channelID = -1 means: use a new entry and return the ID
- channelID >= 0 means: reuse the existing entry at "channelID"

SoundManager handles all added channels/sounds ... and voila, done. I did enhance such a thing for Monkey-X as it did not allow for playing multiple music streams simultaneously (keyword: +crossfading +samples)



Overall the structure of this game is a complete mess. Things are all over the place and it's becoming a nightmare to work with ( oo, the honesty :P ). Luckily I have a much better idea on how to structure my next game. I didn't expect my first Unity game to be pretty or structured but its been a great basics learning experience.
Didn't you tell a slight different story when I told you that my Godot code is a mess and "as long as it works"? ... haha.
Seems we sit in the same boat. Trying to do "as we were used to do" but then need to bend our code to do how the engine wants us to do so (prefabs, attaching stuff, ... component based approach etc).


Hmm, wasn't able to do much the last days and the next days will be the same (birthdays... and the need to cook/bake/... for the whole family). So hope you hold up the flag and finish something more complex/"completed" than what I might be able to do until deadline.

bye
Ron
Title: Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
Post by: Qube on October 06, 2018, 05:02:19 PM
Quote
Didn't you tell a slight different story when I told you that my Godot code is a mess and "as long as it works"? ... haha.
Seems we sit in the same boat. Trying to do "as we were used to do" but then need to bend our code to do how the engine wants us to do so (prefabs, attaching stuff, ... component based approach etc).
I'm doing it the right way, just not in the right order :P - It's all a learning experience and if I had the time I'd redo it all again from fresh.

Quote
Hmm, wasn't able to do much the last days and the next days will be the same (birthdays... and the need to cook/bake/... for the whole family). So hope you hold up the flag and finish something more complex/"completed" than what I might be able to do until deadline.
I have a full complete game but just it's just one level at the moment ;D ( full as in everything works menu > game > play > die > win etc ) - The remaining time will be adding levels and hopefully a few more pickups.
Title: Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
Post by: Steve Elliott on October 06, 2018, 05:05:30 PM
Sheesh!  All this sloppy code writing lol.    :P
Title: Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
Post by: Qube on October 06, 2018, 05:09:04 PM
Sheesh!  All this sloppy code writing lol.    :P
Lol, it's not sloppy code, it's quite complex in some places ;D - I just didn't know where to put it when I started :P
Title: Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
Post by: Steve Elliott on October 06, 2018, 05:10:28 PM
Quote
I just didn't know where to put it when I started :P

That doesn't just apply to coding  ;D
Title: Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
Post by: Qube on October 06, 2018, 05:22:09 PM
Cheeky :P ;D
Title: Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
Post by: Steve Elliott on October 06, 2018, 05:43:18 PM
lol sorry couldn't resist.  I was thinking about a 24 pin connector, what were you thinking?   ;D
Title: Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
Post by: Steve Elliott on October 06, 2018, 05:48:48 PM
Quote
it's quite complex in some places ;D

Really?...I thought you were using Unity?   ;D
Title: Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
Post by: Qube on October 06, 2018, 06:20:23 PM
Quote
Really?...I thought you were using Unity?   ;D
Yes but contrary to popular belief it's not as simple as drag and drop :o - I haven't found the tick box which says "when at the right angle range, fire missile at the players tank" but I may have missed it as it's all pretty new to me :P
Title: Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
Post by: Steve Elliott on October 06, 2018, 06:35:43 PM
Just kidding mate.  All this switching between coding and the GUI 'nearly there' helper structures was enough to put me off - plus the ridiculous size of exe's and general inefficiency.

But you seem to be winning the battle and producing a cool looking game.  Looking forward to playing.
Title: Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
Post by: Qube on October 06, 2018, 06:47:55 PM
Quote
Just kidding mate.  All this switching between coding and the GUI 'nearly there' helper structures was enough to put me off - plus the ridiculous size of exe's.
It's certainly a challenge to get used to if you're more akin to a pure coding environment ( which I am ). I can see why some love and some hate it. At least I get to code in visual studio which is a lot better than mono develop.
Title: Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
Post by: Steve Elliott on October 06, 2018, 06:53:08 PM
Quote
At least I get to code in visual studio.

They let mac users use it?  ;D  You're talking about Microsoft Visual Studio?  The developers IDE of Champions.
Title: Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
Post by: Qube on October 06, 2018, 07:29:19 PM
Quote
They let mac users use it?  ;D  You're talking about Microsoft Visual Studio?  The developers IDE of Champions.
lol, it's true, there is a version of Microsoft Visual Studio for Mac https://visualstudio.microsoft.com/vs/mac/ ( set to the dark theme ).
Title: Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
Post by: Steve Elliott on October 06, 2018, 07:37:12 PM
If I were to design an IDE, that would be something to aim for.
Title: Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
Post by: RemiD on October 07, 2018, 05:21:26 PM
@Qube>>there are 2 code examples of a tank game in the blitzbasic code archives, if you are interested about physics (for bullets) and ai :
https://www.syntaxbomb.com/index.php/topic,828.msg1817.html#msg1817
https://www.syntaxbomb.com/index.php/topic,2582.msg3571.html#msg3571

take a look at the original code archives because the source codes posted on this forum seem corrupted in some way...
Title: Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
Post by: Qube on October 08, 2018, 01:13:13 AM
Cool, it's amazing what you can miss in the code archives :o - Interesting approaches to doing things and I one of those belongs to Stevie G
Title: Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
Post by: Qube on October 08, 2018, 06:43:25 AM
I now have a whopping three fully working levels ::) - I would have had more but a new learning experience cropped up to do with light map baking ( I'll spare the long story ).

Also started work on a shields power-up. Initial tests failed miserably as it effected the tanks ability to get through maze wall gaps vs deflecting enemy tank missiles. I'll give it another go today but at some point I have to get on and build levels.

Probably the best approach right now is to build levels and then revisit additional power-ups during the last 48hrs of the comp. Luckily no new killer bugs have shows up with plat testing which is good ;D
Title: Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
Post by: Qube on October 09, 2018, 04:23:16 AM
Yay!, we now have a shield pickup working ( looks much better when animated distorting it's environment ) - enemy missiles just bounce off that sucker ;D :

(https://www.syntaxbomb.com/images/TTShields01.jpg)
Title: Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
Post by: Steve Elliott on October 09, 2018, 09:38:08 AM
Cool effect.   :D

I would use a consistent colour scheme on the text though, rather than random colours.
Title: Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
Post by: Qube on October 09, 2018, 10:57:59 AM
I would use a consistent colour scheme on the text though, rather than random colours.
I tried having all the text titles the same colour but it just stood out as bland and boring for some reason :P - May revisit that side towards the end as the same colour text with an icon may look more ordered and better.
Title: Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
Post by: Steve Elliott on October 09, 2018, 11:06:02 AM
Quote
I tried having all the text titles the same colour but it just stood out as bland and boring for some reason :P

You could have one colour for numbers and another for words.  Or you could outline characters with another colour.

Quote
May revisit that side towards the end as the same colour text with an icon may look more ordered and better.

Yes, it's also very wordy, icons could be another option.
Title: Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
Post by: Qube on October 09, 2018, 11:11:24 AM
Quote
Yes, it's also very wordy, icons could be another option.
I'll shove it under "tweaks to do" after the game is fully up and running ;D
Title: Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
Post by: Steve Elliott on October 09, 2018, 11:13:04 AM
Quote
I'll shove it under "tweaks to do" after the game is fully up and running ;D

Oh yes, get the game completed first before worrying about details.  It was just an idea for tweaking later.   :D
Title: Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
Post by: Derron on October 09, 2018, 11:28:17 AM
For later: is the "95%"-percentage sign offset on the vertical axis? it seems taller than the "5". Looks odd (while it works nicely for the "f" in "2 of 3").


Do you plan to do your own music or is it this time a premade song? If one dares: I need some egyptian/ancient middle east music too (but have collected some already) ;-).


bye
Ron
Title: Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
Post by: Qube on October 09, 2018, 11:41:44 AM
Quote
For later: is the "95%"-percentage sign offset on the vertical axis? it seems taller than the "5". Looks odd (while it works nicely for the "f" in "2 of 3").
That's how that font renders. I'll be taking the % sign out as it's not really needed and another "tweak to do" is to replace the health text with a health bar which changes width / colour ( green to red ) as your tank gets damage.

Quote
Do you plan to do your own music or is it this time a premade song? If one dares: I need some egyptian/ancient middle east music too (but have collected some already) ;-).
I'm creating as little media as possible as I just don't have time to do everything myself this time around :P - Still got lots to do so even spending a few hours on creating tunes for the game would just be sucking much needed time. Next game will more than likely be back to self created graphics / music.
Title: Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
Post by: Steve Elliott on October 09, 2018, 06:08:43 PM
Quote
and another "tweak to do" is to replace the health text with a health bar which changes width / colour ( green to red ) as your tank gets damage.

Yeah that's what I'm doing in my Tank Game.
Title: Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
Post by: Qube on October 13, 2018, 10:53:20 PM
And I'm done ;D

I'll probably just spend the last remaining time cleaning things up and tweaking a few settings. I'm happy with the difficulty progression and if anyone fails to get past the first couple of levels then I suggest giving up gaming :P
Title: Re: TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
Post by: STEVIE G on October 14, 2018, 12:17:09 AM
And I'm done ;D

I'll probably just spend the last remaining time cleaning things up and tweaking a few settings. I'm happy with the difficulty progression and if anyone fails to get past the first couple of levels then I suggest giving up gaming :P

Jealous!! If it works don't touch it!!!!! Do you have a Donkey setting?!
Title: Re: [WIP] TankTastic - Syntax Bomb Game Competition Sept to Oct 2018
Post by: Qube on October 14, 2018, 12:29:11 AM
Quote
Jealous!! If it works don't touch it!!!!! Do you have a Donkey setting?!
I may still redo the HUD tomorrow to make it less colourful and wordy. Not sure if I'll just gameplay tweak the levels or do that :-\

No need for a Donkey setting :P - The first couple of levels are easy peasy. It's a gradual increase in difficulty and throughout all the play testing I've never died or ran out of time on those levels. I've also play tested each level many times to make sure the game can be completed.

How is your game coming along? - Do you think you'll finish OK?
Title: Re: [WIP] TankMania - Syntax Bomb Game Competition Sept to Oct 2018
Post by: RemiD on October 20, 2018, 07:30:56 PM
@Qube>>cool game, nice fire effect. can you explain how it works ? is this a ready to use lib ? not sure if it is supposed to go through walls or if there is a collision detection system which works with it ? (to prevent the fire to go through walls)
Title: Re: [WIP] TankMania - Syntax Bomb Game Competition Sept to Oct 2018
Post by: Qube on October 20, 2018, 08:42:44 PM
@Qube>>cool game, nice fire effect. can you explain how it works ? is this a ready to use lib ? not sure if it is supposed to go through walls or if there is a collision detection system which works with it ? (to prevent the fire to go through walls)
Thanks. The fire effect is part of an explosions pack (https://assetstore.unity.com/packages/vfx/particles/fire-explosions/realistic-explosions-pack-54783) ( 3D particles ) which comes with 13 different effects which you can tweak to how to want. You could spend hours and hours creating one decent effect but for the price and variety in the pack I thought it's a bargain as it's something that will get used many times.

Ideally the fire particles should not go through walls and I believe it's just a case of changing the dampening on collision. It was on my list to look into but ran out of time as over the last couple of day in the comp I changed the HUD to be less wordy and tweaked the game play of the levels.

Of course one thing I forgot to do at the end was reduce the texture sizes as every single model has a 2048x2048 texture, grr.
Title: Re: [WIP] TankMania - Syntax Bomb Game Competition Sept to Oct 2018
Post by: RemiD on October 20, 2018, 08:48:42 PM
having the choice to use all the libs / assets of the Unity store is a great advantage indeed.
SimplePortal 2.3.6 © 2008-2014, SimplePortal