December 02, 2020, 12:50:38 PM

Author Topic: Unity - test example  (Read 190 times)

Offline Matty

  • Hero Member
  • *****
  • Posts: 1256
    • MattiesGames
Unity - test example
« on: November 15, 2020, 07:51:03 PM »
Good Morning.

I spent two days last week learning Unity as a part of moving towards employment with a company that uses Unity in my local area.

I put together this little example in a couple of days:

https://mattiesgames.com/tst3d/tst3d/

It is simply a space combat scene with a few ships spawning and flying around shooting at each other.

Unity is definitely no click together system

The only 'clicking together' I did was the following:

Placing a single instance of each ship/object in the 'scene' and setting their shaders.

From these single instances all game code handles the creation/spawning/movement/firing of everything in the scene.

Offline Derron

  • Hero Member
  • *****
  • Posts: 3274
Re: Unity - test example
« Reply #1 on: November 15, 2020, 08:53:10 PM »
Yes - if it is like "Godot" then it is more a kind of "visual setup / arrangement" tool. You load in assets so they internally create a specific object type for it. Then you can attach stuff - similar to components or event systems.

But most of this stuff of course could be done via "traditional" coding (or scripting) too.

What differs to "traditional approaches" is the way of doing things - behaviours, files per "unit" instead of a global single file mess some produced in the past. Think you need to get "used to it" but then it works for many kind of games.
Just do not think it is "click-e-ti-click" - if you follow tutorials doing so, you won't do good for you.


bye
Ron

Offline Xerra

  • Hero Member
  • *****
  • Posts: 1176
  • Wait, what? This isn't Porn Hub?
    • Retro Evolved
Re: Unity - test example
« Reply #2 on: November 15, 2020, 09:33:40 PM »
People have this idea that gamemaker is a click thing too when it's mostly not at all. I think it's been labelled that way mainly because it does have an option to create games using its Drag N Drop system built in and people who don't know any better assume that's the only way it works. Personally I have never actually used it and I think it's probably the same with 90% of other users as well. I think if you're implementing a system like that to try and encourage people to create games without raw coding then you're probably asking to be labelled, I guess.

When you use Gamemaker in it's normal environment then a game works at the very basic level with a room/object system. You create objects such as a game controller and drag them onto the room so the code within them is executed when the room is launched. This object has numerous different event controls but the predominant ones you'd be using would be the create event, for stuff that runs when the object is first launched, the step event for the stuff that runs as many times in a second as your frame rate and the draw event. You do have controls for seperate keyboard input and loads of others but most people prefer to code their own keyboard reading straight into the step event anyway.

Most games I've written with the system use one room for the whole game and I'll use a game state handler within a controller object so it processes stuff for title/main game/game over stuff all in that to keep things manageable. There's a huge amount of other ways to do it but this is keeping it at a very simple to manage system.

TLDR, it works pretty much the same kind of way as Unity, and Godot, by the sounds of it, and yet there are people who assume that if you're using it to write games then you aren't "actually coding" at all. I have a distinct memory of someone questioning wether I should be allowed to submit my first competition game here at all because it was done in Gamemaker 2. But the crux of it is, this is the way development is actually heading towards now.


Offline Qube

  • Administrator
  • Hero Member
  • *****
  • Posts: 2566
  • I mostly code at night... Mostly.
    • SyntaxBomb - Indie Coders
Re: Unity - test example
« Reply #3 on: November 16, 2020, 12:03:11 AM »
Unity is definitely no click together system

The only 'clicking together' I did was the following:

Placing a single instance of each ship/object in the 'scene' and setting their shaders.

From these single instances all game code handles the creation/spawning/movement/firing of everything in the scene.
Nice work :)

As others have said, Unity is definitely not a drag & drop, click click, game done thing.

I've only done one game in Unity which was done as a learning experience / game comp entry. The game is not optimised in anyway ( big textures ) and needs a half decent GPU + the game is kinda simple.

I have a distinct memory of someone questioning wether I should be allowed to submit my first competition game here at all because it was done in Gamemaker 2.
I would say that Gamemaker probably has a worse reputation than Unity of just being a drag and drop easy peasy game maker.
Mac mini ( 2018 / 2020 ), 3 GHz 6-Core Intel Core i5, 16 GB 2667 MHz DDR4, 1TB NVMe, eGPU Radeon Pro 580 8 GB, LG Ultragear 27GL83A-B 27 Inch
Commodore VIC-20, 1.1Mhz MOS 6502 CPU, 5KB RAM, VIC ( 6560 ) GPU

Until the next time...

Online Steve Elliott

  • Hero Member
  • *****
  • Posts: 2871
  • elgol 2021
Re: Unity - test example
« Reply #4 on: November 16, 2020, 10:14:05 AM »
Quote
As others have said, Unity is definitely not a drag & drop, click click, game done thing.

I think Unity gets a bad rap because some people sell their 'game frameworks' and assets, so you're essentially buying ready made solutions rather than doing your own coding.
Windows 10 64-bit, 16Gb RAM, Intel i5 3.2 GHz, Nvidia GeForce GTX 1050 (2Gb)
MacOS Big Sur 64-bit, 8Gb RAM, Intel i5 2.3 Ghz, Intel Iris Plus Graphics 640 1536 MB
Linux Mint 19.3 64-bit, 16Gb RAM, Intel i5 3.2 GHz, Nvidia GeForce GTX 1050 (2Gb)
Raspberry Pi 400, Pi4, C64, ZX Spectrum Next.

Offline Qube

  • Administrator
  • Hero Member
  • *****
  • Posts: 2566
  • I mostly code at night... Mostly.
    • SyntaxBomb - Indie Coders
Re: Unity - test example
« Reply #5 on: November 16, 2020, 05:16:00 PM »
I think Unity gets a bad rap because some people sell their 'game frameworks' and assets, so you're essentially buying ready made solutions rather than doing your own coding.
This is very true and one of my pet peeves is when they then turn around and say "Look what I've done"  ::)
Mac mini ( 2018 / 2020 ), 3 GHz 6-Core Intel Core i5, 16 GB 2667 MHz DDR4, 1TB NVMe, eGPU Radeon Pro 580 8 GB, LG Ultragear 27GL83A-B 27 Inch
Commodore VIC-20, 1.1Mhz MOS 6502 CPU, 5KB RAM, VIC ( 6560 ) GPU

Until the next time...

Online Steve Elliott

  • Hero Member
  • *****
  • Posts: 2871
  • elgol 2021
Re: Unity - test example
« Reply #6 on: November 16, 2020, 05:44:01 PM »
Quote
This is very true and one of my pet peeves is when they then turn around and say "Look what I've done"  ::)

I agree I find very annoying, you are boasting about no more than tweaking somebody else's work.  Plus it really undermines the software industry when people who have actually done some work and are looking to sell their software.  When that sort of person thinks it takes no effort so is worthless or over-priced - because they can do similar themselves.
Windows 10 64-bit, 16Gb RAM, Intel i5 3.2 GHz, Nvidia GeForce GTX 1050 (2Gb)
MacOS Big Sur 64-bit, 8Gb RAM, Intel i5 2.3 Ghz, Intel Iris Plus Graphics 640 1536 MB
Linux Mint 19.3 64-bit, 16Gb RAM, Intel i5 3.2 GHz, Nvidia GeForce GTX 1050 (2Gb)
Raspberry Pi 400, Pi4, C64, ZX Spectrum Next.

 

SimplePortal 2.3.6 © 2008-2014, SimplePortal