Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
novamute
Jul 5, 2006

o o o

Vermain posted:

You've got two fairly good options:
  • Use class inheritance. Have a Monster parent class deriving from MonoBehaviour with virtual methods (OnHit, OnAttack, etc.) that are overridden in the subclasses that derive from Monster.
  • Use delegate methods. You'll only have a single Monster class that the various prefabs use which has delegate method variables for various generic actions (OnHit, OnAttack, etc.). You then define the creature-specific methods and assign them to the delegates depending on the monster type.
The former is easier to implement than the latter in Unity simply because delegates don't have a default property drawer in the inspector, requiring you to create your own using reflection or a wrapper class. The downside to the former is that you have to create a class for each individual monster type that you want to have a different OnHit method for, which can eventually be cumbersome to deal with in scripts.

If I was doing it I'd probably try and set stuff up with ScriptableObjects where each SO stored the OnHit implementation. The SO is added to the enemy prefab which invokes it on hit. You can assign the correct SO into the enemy prefab as the scene is built and it'll let you change out behavior on the fly while the game is running for testing of new behavior.

Example of a similar system for items with different effects:
https://stackoverflow.com/questions/51886841/item-ability-system-using-scriptableobjects-in-unity

Adbot
ADBOT LOVES YOU

Vermain
Sep 5, 2006



novamute posted:

If I was doing it I'd probably try and set stuff up with ScriptableObjects where each SO stored the OnHit implementation. The SO is added to the enemy prefab which invokes it on hit. You can assign the correct SO into the enemy prefab as the scene is built and it'll let you change out behavior on the fly while the game is running for testing of new behavior.

Example of a similar system for items with different effects:
https://stackoverflow.com/questions/51886841/item-ability-system-using-scriptableobjects-in-unity

SOs are also a good option. I just personally dislike them as delegate replacements due to how messy they tend to make your folders and how long some asset menus can get from them.

Whybird
Aug 2, 2009

Phaiston have long avoided the tightly competetive defence sector, but the IRDA Act 2052 has given us the freedom we need to bring out something really special.

https://team-robostar.itch.io/robostar


Nap Ghost
I would go with composition over inheritance. Rather than having a script per type of enemy, have a script per way of responding to being hit -- so a "JumpBackWhenHit" script, a "FallBackWhenHit" script, etc. Then have them all implement an IOnHitBehaviour interface.

When an enemy is hit, you just call GetComponent<IOnHitBehaviour>() on it to get the script that handles it's behaviour when hit, and call the relevant function on the interface.

That way, you can easily have multiple different enemies which share the same behaviour when they're hit, but are otherwise totally different.

Rocko Bonaparte
Mar 12, 2002

Every day is Friday!

Fruity20 posted:

hmmmmm :thunk:

jesus i don't know what to pick...

I would not recommend Ink in Unity if you intend to coordinate it with embedded functions:

https://github.com/inkle/ink/blob/master/Documentation/RunningYourInk.md#important-notes-on-the-usage-of-external-functions

It did indeed double call stuff and call stuff before it should have. It was quite frustrating to me; I had it all ready to go but it really screwed up when I tried to use it for a simple merchant NPC. I once knew why exactly it did this, but all I can recall now was it was rather fundamental and hard for them to fix.

At this point I am basically rolling a subset of Python to get what I want. Somebody send me psychiatric help.

Omi no Kami
Feb 19, 2014


Rocko Bonaparte posted:

I would not recommend Ink in Unity if you intend to coordinate it with embedded functions:

https://github.com/inkle/ink/blob/master/Documentation/RunningYourInk.md#important-notes-on-the-usage-of-external-functions

It did indeed double call stuff and call stuff before it should have. It was quite frustrating to me; I had it all ready to go but it really screwed up when I tried to use it for a simple merchant NPC. I once knew why exactly it did this, but all I can recall now was it was rather fundamental and hard for them to fix.

It has to do with how Glue functions. Ink relies heavily on speculative execution, and will regularly jump forward in the text and process parts of the document that aren't being actively displayed. Functions are great for getting stuff into ink, but game logic and timestep/control flow should always remain compartmentalized on the game side.

Gavinvin
Jan 3, 2013

Ambition is not a dirty word. Piss on compromise. Go for the throat.
Hello, I want to start a new project that's basically a 2D RPG multiplayer game designed to be played in a DnD style environment, where one one player would be the Games Master with a full map editor and control over the game elements and the other players would play the party exploring the dungeon / world. Basically I want to make something similar to roll20 but with actual game logic in it, and the ability to be able to play it without a GM so all the elements of the game could be scripted and automated without a human player controlling them.

So I'm looking for suggestions for a game engine to use, it is going to a be a very interface heavy game so an engine with good GUI support would be nice. I also plan on having line of sight and dynamic lighting so an engine that has that or the ability to implement it easily would be nice. Because its multiplayer focused some built in netcode or support for third party netcode plugins would be good too.

By trade I'm a software dev and mostly work with Javascript and C# so I'm not scared of engines that need lots of coding to get the most out of. In the past I've had a little play with Construct and Gamemaker and I think I have a license for clickteam fusion that I picked up in the some bundle. I started playing with Gdevelop today and it seems pretty easy to pick up as well. I'm also not afraid to put in the investment into learning Unity 2D if thats the best option. But before I heavily invest in using one engine I was looking for some advice first about what would be the best 2D engine is out right now and whats appropriate for my idea.

Elentor
Dec 14, 2004

by Jeffrey of YOSPOS
I'll be honest, with Pure ECS, Hybrid ECS, MonoBehaviours, legacy shader and rendering support and the new modular render pipelines, I'm starting to feel very confused about what is and what isn't relevant in Unity.

Stick100
Mar 18, 2003

Elentor posted:

I'll be honest, with Pure ECS, Hybrid ECS, MonoBehaviours, legacy shader and rendering support and the new modular render pipelines, I'm starting to feel very confused about what is and what isn't relevant in Unity.

I'll try to help a bit

Pure ECS, Hybrid ECS, MonoBehaviours are all relevant, MonoBehaviors are the main/old way of getting things done, are easy to use but single threaded and have a lot of performance overhead. Hybrid ECS is a combination of gameobjects and ECS allowing you to will use the editor but doing much of the logic outside of MonoBehaviors. Pure ECS is by far the most performant but makes the editor basically useless and is much harder to understand/use.

The Legacy shader/render system still works fine, HDRP is for super high end stuff (think ray tracing/using a bunch of post-processing) LWRP is for VR/Mobile. All 3 are relevant, personally I'd most suggest LWRP and Legacy for now. When I last checked in on the HDRP it was lacking in some significant ways.

If you learned before and just want to make something simple, stick with Legacy Render/Monobehaviors. When you need to get more performance you can switch over to the higher performance things later.

Elentor
Dec 14, 2004

by Jeffrey of YOSPOS

Stick100 posted:

I'll try to help a bit

Pure ECS, Hybrid ECS, MonoBehaviours are all relevant, MonoBehaviors are the main/old way of getting things done, are easy to use but single threaded and have a lot of performance overhead. Hybrid ECS is a combination of gameobjects and ECS allowing you to will use the editor but doing much of the logic outside of MonoBehaviors. Pure ECS is by far the most performant but makes the editor basically useless and is much harder to understand/use.

The Legacy shader/render system still works fine, HDRP is for super high end stuff (think ray tracing/using a bunch of post-processing) LWRP is for VR/Mobile. All 3 are relevant, personally I'd most suggest LWRP and Legacy for now. When I last checked in on the HDRP it was lacking in some significant ways.

If you learned before and just want to make something simple, stick with Legacy Render/Monobehaviors. When you need to get more performance you can switch over to the higher performance things later.

I mean, I know what they are, but some of these systems can be so wildly different that moving forward there's now a big amount of stuff to learn if you want to diversify your portfolio, but it's almost like learning a bunch of different engines in one.

Just as a single small example there's been 3 completely different iterations of the post-processing stack so far (maybe 4, I might have missed one) with a few updates missing features that have only recently been added to the camera, so for a long while you had blue noise dithering in the stack and then for a long long while you didn't and then dithering was added to the camera. Which, fair, but also removes the easy control that you had from editing the shader.

Stick100
Mar 18, 2003

Elentor posted:

I mean, I know what they are, but some of these systems can be so wildly different that moving forward there's now a big amount of stuff to learn if you want to diversify your portfolio, but it's almost like learning a bunch of different engines in one.

Just as a single small example there's been 3 completely different iterations of the post-processing stack so far (maybe 4, I might have missed one) with a few updates missing features that have only recently been added to the camera, so for a long while you had blue noise dithering in the stack and then for a long long while you didn't and then dithering was added to the camera. Which, fair, but also removes the easy control that you had from editing the shader.

Oh, yes true I think you don't need to learn any of them. Just use whatever you want, the Legacy stuff works as well as it ever did and isn't going away the new stuff is mostly feature/interface complete now so it's pretty solid too.

This is always true about bleeding edge technologies, I would suggest against diversifing your portfolio instead make something good with the tools that make sense. If someone is stupid enough to say oh you made a good thing with Unreal using Monobehaviors, but we were looking for someone who's an expert in ECS then you should be glad to not get that job because they would insufferable to work with/for.

All that said, yes Unity sometimes seems to flair around (all of the discussed UI systems as an example). I'm personally pretty happy with the direction of the past 36 months, of getting us real tools that allow high performance finally and committing to them. ECS/SRP/New .Net/Nested Prefabs. I have no complaints anymore.

The Fool
Oct 16, 2003


Are there any good Unity resources that are primarily text? I am so tired of videos.

SweetBro
May 12, 2014

Did you read that sister?
Yes, truly a shitposter's post. I read it, Rem.

Avoid inheritance in Unity.

Use interfaces https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/interfaces/

Veni Vidi Ameche!
Nov 2, 2017

by Fluffdaddy
Is the trombone game out, yet? When can I play the trombone game?

Polo-Rican
Jul 4, 2004

emptyquote my posts or die

Veni Vidi Ameche! posted:

Is the trombone game out, yet? When can I play the trombone game?

I need to quit my job or something because attempting to release a "full-featured game" - i.e., one that you can comfortably plop onto a digital store - on nights and weekends is nearly impossible.

That said, it's going well and i hope to have a trailer ready, and hopefully a steam page with approximate release date, within a month or so.

baby puzzle
Jun 3, 2011

I'll Sequence your Storm.
I spent the morning making a cute mini gameplay trailer

https://twitter.com/SEQUENCE_STORM/status/1110579810684813313

Polo-Rican
Jul 4, 2004

emptyquote my posts or die

baby puzzle posted:

I spent the morning making a cute mini gameplay trailer

It's good but in retrospect not sure how much text you need at all. It only takes a split second of gameplay footage to realize that it's a racer + rhythm title. I'd just have a lot of gameplay shots, cutting with the music every two beats, then smash to the title (without a slow crossfade).

On the topic of teasers and trailers, If I posted this on social media one week before releasing a proper trailer for Trombone Champ, how many people would get the reference?

https://www.youtube.com/watch?v=7-zl8x4rHlc

Polo-Rican fucked around with this message at 20:03 on Mar 26, 2019

baby puzzle
Jun 3, 2011

I'll Sequence your Storm.

Polo-Rican posted:

It's good but in retrospect not sure how much text you need at all. It only takes a split second of gameplay footage to realize that it's a racer + rhythm title. I'd just have a lot of gameplay shots, cutting with the music every two beats, then smash to the title (without a slow crossfade).

That's a good idea for another one.. I want to try aiming for quantity over quality. So maybe tomorrow.

Polo-Rican posted:

On the topic of teasers and trailers, If I posted this on social media one week before releasing a proper trailer for Trombone Champ, how many people would get the reference?

https://www.youtube.com/watch?v=7-zl8x4rHlc

Ummm.. is it a Simpsons reference?

Dr. Stab
Sep 12, 2010
👨🏻‍⚕️🩺🔪🙀😱🙀
Good thinking in toning down the flashing from the original.

Polo-Rican
Jul 4, 2004

emptyquote my posts or die

Dr. Stab posted:

Good thinking in toning down the flashing from the original.

Yeah, I originally recreated it accurately, but the flashing was legitimately seizure-inducing.

TooMuchAbstraction
Oct 14, 2012

I spent four years making
Waves of Steel
Hell yes I'm going to turn my avatar into an ad for it.
Fun Shoe

Polo-Rican posted:

On the topic of teasers and trailers, If I posted this on social media one week before releasing a proper trailer for Trombone Champ, how many people would get the reference?

https://www.youtube.com/watch?v=7-zl8x4rHlc

I don't get it, but that's like a sample size of one. :shrug:

Maide
Aug 21, 2008

There's a Starman waiting in the sky...

Polo-Rican posted:

On the topic of teasers and trailers, If I posted this on social media one week before releasing a proper trailer for Trombone Champ, how many people would get the reference?

https://www.youtube.com/watch?v=7-zl8x4rHlc

Probably only me, and the lawyers from Fox.

(It's a Gabbo reference.)

Stick100
Mar 18, 2003

Polo-Rican posted:

On the topic of teasers and trailers, If I posted this on social media one week before releasing a proper trailer for Trombone Champ, how many people would get the reference?

https://www.youtube.com/watch?v=7-zl8x4rHlc

No clue, that would not entice me at all.

Cicadas!
Oct 27, 2010


recreate the very start of this
https://www.youtube.com/watch?v=R-gKVA8yv1c
but with a trombone spinning through space instead of a mask, held up by your player character instead of the mask salesman
e: replace the laugh with trombone noises

Grace Baiting
Jul 20, 2012

Audi famam illius;
Cucurrit quaeque
Tetigit destruens.



Cicadas! posted:

recreate the very start of this
https://www.youtube.com/watch?v=R-gKVA8yv1c
but with a trombone spinning through space instead of a mask, held up by your player character instead of the mask salesman
e: replace the laugh with trombone noises

100% yes but keep Happy Mask Salesman, replace Link with Linkle, and redo the entire trailer with all the music played by a trombone choir and Linkle playing the melody on her own trombone in the Clock Town shots

Pitch it as Linkle's Trombone Training to Nintendo


e: every character gets a trombone to play the other parts in the music, not just Linkle. Even the Stray Fairy. Yes even the Moon

Grace Baiting fucked around with this message at 23:07 on Mar 26, 2019

Veni Vidi Ameche!
Nov 2, 2017

by Fluffdaddy

Polo-Rican posted:

I need to quit my job or something because attempting to release a "full-featured game" - i.e., one that you can comfortably plop onto a digital store - on nights and weekends is nearly impossible.

That said, it's going well and i hope to have a trailer ready, and hopefully a steam page with approximate release date, within a month or so.

I can’t wait. It looks so goddamn stupid. I mean that in a good way. Are you building it for multiple platforms, and is there any sort of multiplayer action?

Polo-Rican
Jul 4, 2004

emptyquote my posts or die

Veni Vidi Ameche! posted:

I can’t wait. It looks so goddamn stupid. I mean that in a good way. Are you building it for multiple platforms, and is there any sort of multiplayer action?

Thanks! Stupid is a good description - I describe it as a music game that feels like qwop. Current plan is to start with PC / Mac, but if the launch goes even remotely well I'd like to jump into Switch development asap. And if it goes on Switch, multiplayer feels pretty necessary. If multiplayer functionality gets developed for Switch, I'd definitely push that out to the PC/Mac versions as well.

I don't know how the hell to approach this but I also feel like the game would work really well as a Japanese arcade cabinet, with big floppy rubber controllers. There's a 99.999% chance it would lead nowhere, but I figure it couldn't hurt to at least try to research japanese arcade studios...

baby puzzle
Jun 3, 2011

I'll Sequence your Storm.
I would love to create a one-off arcade machine for SEQUENCE STORM but the amount of work it would take would be pretty extreme. For one thing, I'd have to buy a copy of Windows for the machine unless I port the game to Linux. Also, empty arcade cabinets are freakin' expensive.

al-azad
May 28, 2009



baby puzzle posted:

I would love to create a one-off arcade machine for SEQUENCE STORM but the amount of work it would take would be pretty extreme. For one thing, I'd have to buy a copy of Windows for the machine unless I port the game to Linux. Also, empty arcade cabinets are freakin' expensive.

You can DIY really cheaply if you have confidence in measuring and cutting plywood but overall you're looking at a $500 investment for the cabinet, screen, controllers, paint job on the cheap or double that for pre-assembled parts. The Behemoth brings their own cabinet to cons and it's always a big draw so maybe an idea if you release a sequel or Linux update??

Stick100
Mar 18, 2003

baby puzzle posted:

I would love to create a one-off arcade machine for SEQUENCE STORM but the amount of work it would take would be pretty extreme. For one thing, I'd have to buy a copy of Windows for the machine unless I port the game to Linux. Also, empty arcade cabinets are freakin' expensive.

You can run unactivated windows for free, or you can get an OEM windows for about $50 so I wouldn't worry about that cost.

baby puzzle
Jun 3, 2011

I'll Sequence your Storm.

Stick100 posted:

You can run unactivated windows for free, or you can get an OEM windows for about $50 so I wouldn't worry about that cost.

Ah, for some reason I thought it would have been more. Does a cheap OEM version do kiosk mode?

Anyway, here's more daily social media... I did a time-lapse of some track editing

https://twitter.com/SEQUENCE_STORM/status/1110929350533079041

Stick100
Mar 18, 2003

baby puzzle posted:

Ah, for some reason I thought it would have been more. Does a cheap OEM version do kiosk mode?

Cheap OEM Win10 is full Windows. I believe you can get stripped down windows versions for free I believe so something would probably suit your purpose for free/$50.

The Fool
Oct 16, 2003


Stick100 posted:

Cheap OEM Win10 is full Windows. I believe you can get stripped down windows versions for free I believe so something would probably suit your purpose for free/$50.

Caveat being that kiosk mode only works in pro or higher.

https://docs.microsoft.com/en-us/windows/configuration/kiosk-single-app

Hammer Bro.
Jul 7, 2007

THUNDERDOME LOSER

It's also possible the game runs under WINE (some games mysteriously do just fine without tweaking) and therefore doesn't need Windows proper.

Though what middleware was it made with that doesn't have at least a Linux export target?

Sedgr
Sep 16, 2007

Neat!

Im going to throw this out there but really you dont need windows kiosk mode. If the game is controlled by arcade sticks, you can just remove the exit code from the game and not have access to a keyboard. Worst case is if something goes wrong you have to do a reboot with a hidden keyboard or whatever but if you're custom building a cabinet in the first place its kind of trivial.

Special code for kiosks isnt really that uncommon. Some weird button combo that know one is going to stumble on to reset the game to default and you're good to go.

baby puzzle
Jun 3, 2011

I'll Sequence your Storm.

Hammer Bro. posted:

Though what middleware was it made with that doesn't have at least a Linux export target?

What's this "middleware" you speak of?

Hammer Bro.
Jul 7, 2007

THUNDERDOME LOSER

I didn't exactly wanna say "game engine" 'cause that doesn't feel right even though that's more common.

But something like Unity except that Unity has Linux exports (or so I thought).

Grey Face
Mar 31, 2017
Just checking that I'm on the right path in Unity as a newbie: if I want a player character that can pick up and equip different kinds of main fire/alt fire abilities, would the best way to do that be scriptable objects?

Lunatic Sledge
Jun 8, 2013

choose your own horror isekai sci-fi Souls-like urban fantasy gamer simulator adventure

or don't?
I think... Labyrneath II is officially finished. I want to shoot for Kongregate's game of the month list again, and I've got a couple of days until April actually starts, so I also have a couple of days to dick around with bug testing on Gamejolt. Improvements over the first Labyrneath include:

- Multiple checkpoints per level, holy poo poo
- Boss... experiences
- Less hosed up hitboxes
- Level select
- A save that can't be accidentally overwritten
- The pause menu is tied to more than one key
- Totally different gimmicks and mechanics
- Turning the sound off should actually work for real now
- This bullshit:



(this is from an early build, there's a bit more going on with the background in the final game)

Since the biggest complaint I got on the first Labyrneath was about the excessive anime cleavage, but ridiculous Macy's Thanksgiving Day parade boobs also got like 120,000 people to click the stupid thumbnail, for the sequel I reached a compromise and the title screen is now way more rear end focused I'm going to hell

also like with the first Labyrneath, I cranked this fucker out in like a month. If I ever find the patience to spend more time than that on a game, or the drive to just pump out a game EVERY month, I'm going to live like a king on my pile of tacky browser game gold

al-azad
May 28, 2009



Grey Face posted:

Just checking that I'm on the right path in Unity as a newbie: if I want a player character that can pick up and equip different kinds of main fire/alt fire abilities, would the best way to do that be scriptable objects?

Pretty much, and you want to turn that object into a prefab so you can create/destroy it from any scene.

Adbot
ADBOT LOVES YOU

Fur20
Nov 14, 2007

すご▞い!
君は働か░い
フ▙▓ズなんだね!

Polo-Rican posted:

On the topic of teasers and trailers, If I posted this on social media one week before releasing a proper trailer for Trombone Champ, how many people would get the reference?

https://www.youtube.com/watch?v=7-zl8x4rHlc

just film yourself doing the trombone version of sexy sax man playing careless whisper

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply