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
Orzo
Sep 3, 2004

IT! IT is confusing! Say your goddamn pronouns!

Spatial posted:

Sine wave:

What game is that?

Adbot
ADBOT LOVES YOU

xzzy
Mar 5, 2009

Anyone got a sweet technique for a "debug mode" for Unity?

Basically what I got going on is in the main menu scene, I create a gamestate singleton. As the user goes through menus and stuff values are populated and once they actually get to the game scene those values are used however they're needed.

Thing is, when I'm developing the level I don't want to have to start the game from the main menu every time. Is there a handy way to handle this, or is the best method to have the gamestate set defaults and put in temporary code to create the gamestate when the scene starts?

Spatial
Nov 15, 2007

Orzo posted:

What game is that?
Super Dead Space. :v:

Nah, it's not really a game, just a mockup I made for an image thread a while back.

FuzzySlippers
Feb 6, 2009

Something like that I do through a debug menu. I have a debug sub-manager I populate with template values I can load with a couple of key presses. Since it is contained with the debug manager I don't have to go hunting for it when I want to disable it. If you want to allow yourself to change the template values while the game is still running don't load the values from a class but from an external text file.

I've been thinking about creating a quake style in game console because it would seem an even more helpful way to do quick debugging.

Zizi
Jan 7, 2010

xzzy posted:

Anyone got a sweet technique for a "debug mode" for Unity?

Basically what I got going on is in the main menu scene, I create a gamestate singleton. As the user goes through menus and stuff values are populated and once they actually get to the game scene those values are used however they're needed.

Thing is, when I'm developing the level I don't want to have to start the game from the main menu every time. Is there a handy way to handle this, or is the best method to have the gamestate set defaults and put in temporary code to create the gamestate when the scene starts?

I picked up a decent extensible in-game console from the Asset Store and I just add a bunch of developer commands to the thing. It works reasonably well. I've only recently started in on this, though, so the jury is still out on how much I like it.

devilmouse
Mar 26, 2004

It's just like real life.
I'll see if we can throw our Unity debug server up on github next week (along with some other stuff we've been meaning to clean up and open source). The short form is that the debugger runs on the client as a light web server and you can connect to it remotely from another computer (or locally) and use a console to call functions, set values, dump debug spew (and copy it!), and so on against the running game. It's nice because 1) it saves us from having to litter ifdef DEBUG all over the place and 2) since we're also working on mobile with tiny screens, it helps with having a keyboard to input stuff and makes it trivial to copy/paste logs off.

Rottbott
Jul 27, 2006
DMC
That's exactly what I do, with my own protocol rather than HTTP, but transmitting JSON data. It's really useful for debugging on consoles and such without keyboards, as you say. Different transport layers can be swapped in for platforms without a normal network connection.

Aside from debugging and twiddling settings it's a great way to use the game as a visualiser for a map editor (for example), where you can see your changes immediately but without having to make your own editor UI within the game itself. I use C#/WPF for UI and it talks to the game through the telemetry server.

The other approaches I've seen are all a bit poor:
  • Create editor UI within the game - ugly and gets in the way, or limited to simple a text console.
  • Have a separate build of the game code with a lot of #ifs, to create a standalone editor.
  • Re-implement most of the game in C# (I don't know what possessed them to do this, but I've seen it).
  • Just put up with a build/wait/run cycle every time you make a change.

Doing it as a HTTP server sounds like a better idea for various reasons, but I already had my network library, and the requirement that it work over the Wii's USB connection.

Shalinor
Jun 10, 2002

Can I buy you a rootbeer?

devilmouse posted:

I'll see if we can throw our Unity debug server up on github next week (along with some other stuff we've been meaning to clean up and open source). The short form is that the debugger runs on the client as a light web server and you can connect to it remotely from another computer (or locally) and use a console to call functions, set values, dump debug spew (and copy it!), and so on against the running game. It's nice because 1) it saves us from having to litter ifdef DEBUG all over the place and 2) since we're also working on mobile with tiny screens, it helps with having a keyboard to input stuff and makes it trivial to copy/paste logs off.
Assuming that includes the client you need to connect with, I would love you forever for sharing that.

... though honestly dude, you're a small studio again - do you really want to give that away? You could probably do pretty well with it on the Unity Asset Store. I am SUPER happy to snag it for free, but, that sounds like a pretty sweet little tool.

devilmouse
Mar 26, 2004

It's just like real life.

Shalinor posted:

Assuming that includes the client you need to connect with, I would love you forever for sharing that.

... though honestly dude, you're a small studio again - do you really want to give that away? You could probably do pretty well with it on the Unity Asset Store. I am SUPER happy to snag it for free, but, that sounds like a pretty sweet little tool.

You just connect to your device via a webpage so the "client" in this case is just Chrome/Firefox/etc.

Maybe! We honestly don't want to deal with the inevitable support (and *gasp* documentation) work we'd have to do for anything we'd release on the Asset Store. We're also a bunch of open source hippies, and it's only 2 or 3 files worth of code anyway, but it's probably worth a discussion for us at least.

devilmouse fucked around with this message at 21:05 on Aug 4, 2013

thezoidburg
Dec 26, 2005

I have a question and the answer may be 'it depends', but at what level does a game engine for something like, a modern first person shooter, operate. I guess my question is around the level of abstraction from things in the world like physics. I do a lot of .Net web applications so I just wonder how it compares to say .net abstracting me away from accessing memory or files on disk.

For example, if you want to create a gun that fires bullets, I presume the engine handles the firing of projectiles, where they land etc. what about my player character, do I just slap my own textures on an engine provided human object?

Everdraed
Sep 7, 2003

spankety, spankety, spankety

Shalinor posted:

You still have 48 hours. Use that time intelligently. And by intelligently, I mean adding puppies. And kittens. And baby turtles getting tooth brushed on their shells.

I hope I didn't miss the deadline!!

Pixelboy
Sep 13, 2005

Now, I know what you're thinking...

SynthOrange posted:



My Unity/Playmaker/2d Toolkit/SA Gamedev VIII project. Keeping babies out of the furnace and sawmill lines is really hard when you start panicking.

I'd publish this on general principal

Sab669
Sep 24, 2009

So I've been plinking around with Unity for a few days now, it's pretty cool and fairly easy and I'm having fun. I was wondering though, how much more difficult is it to learn UDK instead? I feel like the lack of any major games published on Unity sort of tells me I'm wasting my time with it. Should I just stick with Unity and build some lovely project to get my feet wet with game dev concepts, then move on to other tools/engines, or...?

sighnoceros
Mar 11, 2007
:qq: GOONS ARE MEAN :qq:
Unity has been used for quite a few very successful games. Maybe not many AAA titles, but off the top of my head I know at least the new Project Eternity by Obsidian is being made in Unity. It seems like use is spreading more and more, at least for games that don't need very highly specialized tools like some AAA FPS games etc.

HelixFox
Dec 20, 2004

Heed the words of this ancient spirit.
Lots of well-known indie games use Unity.

Thomas Was Alone, Gun Monkeys, Sir, You Are Being Hunted, Gone Home, Dreamfall Chapters.

Apparently the new Deus Ex iOS game is made with it as well, according to this.

SupSuper
Apr 8, 2009

At the Heart of the city is an Alien horror, so vile and so powerful that not even death can claim it.

Sab669 posted:

So I've been plinking around with Unity for a few days now, it's pretty cool and fairly easy and I'm having fun. I was wondering though, how much more difficult is it to learn UDK instead? I feel like the lack of any major games published on Unity sort of tells me I'm wasting my time with it. Should I just stick with Unity and build some lovely project to get my feet wet with game dev concepts, then move on to other tools/engines, or...?
That's because all the major devs are already experienced with UDK, but it's a lot harder to learn if you're new. Unity is a lot lighter and simpler so it's great for smaller studios and projects.

KoRMaK
Jul 31, 2012



Work just bought Spine for me. We are a Business Continuity Consulting firm.

Hey, whatever.

Paniolo
Oct 9, 2007

Heads will roll.

Sab669 posted:

So I've been plinking around with Unity for a few days now, it's pretty cool and fairly easy and I'm having fun. I was wondering though, how much more difficult is it to learn UDK instead? I feel like the lack of any major games published on Unity sort of tells me I'm wasting my time with it. Should I just stick with Unity and build some lovely project to get my feet wet with game dev concepts, then move on to other tools/engines, or...?

It's not like you're going to make any major games on your own.

Sab669
Sep 24, 2009

Okay, dumb Unity question now that I'm starting stupid things on my own.



Absolutely no idea why my script can't instantiate my prefab. I assume there's something wrong with the way I'm declaring my local Sphere variable, but watching over the prefab / instantiation tutorial on unity student I don't see my error :confused:

Spek
Jun 15, 2012

Bagel!

Sab669 posted:

Okay, dumb Unity question now that I'm starting stupid things on my own.



Absolutely no idea why my script can't instantiate my prefab. I assume there's something wrong with the way I'm declaring my local Sphere variable, but watching over the prefab / instantiation tutorial on unity student I don't see my error :confused:

You cant just call a prefab by name like that. Well you can if you use Resources but it requires a bit of set up and that's probably not what you want here. Just add a public variable to your script, something like
code:
public var spherePrefab:GameObject;
in the same area as your Sphere and power variables are declared and it will show up in the inspector. Then you can drag your prefab to that and instantiate using that variable.

edit: This covers public variables and scripting prefabs well.

Spek fucked around with this message at 04:18 on Aug 6, 2013

xzzy
Mar 5, 2009

Spek posted:

Then you can drag your prefab to that and instantiate using that variable.
Is there a way to do that in a script? Or is that what the Resources folder is meant to solve? Because I'll grant that dragging objects onto public variables is a cool gui trick it's no fun the 1000th time.

FuzzySlippers
Feb 6, 2009

xzzy posted:

Is there a way to do that in a script? Or is that what the Resources folder is meant to solve? Because I'll grant that dragging objects onto public variables is a cool gui trick it's no fun the 1000th time.

Resources.load though I don't really think dragging the prefab is a big deal even in my biggest project. If you have tons of stuff in the game they can derive from a much smaller number of prefabs by swapping around components once you bring them in from your spawn pool and that dragged public variable will stay intact through renaming prefabs, changing their location, etc as Unity tracks it by an internal id.

Synthbuttrange
May 6, 2007

Pixelboy posted:

I'd publish this on general principal

If you want, you can play it now: http://labtanner.com/gamedev/index.php?title=GameDevVIII:Mrs._Buttercups_Babysorting_Agency

And have a look at some of the other Gamedev 8 entries as well. Some are awful! Some are really amazing!

Sab669
Sep 24, 2009

Spek posted:

You cant just call a prefab by name like that. Well you can if you use Resources but it requires a bit of set up and that's probably not what you want here. Just add a public variable to your script, something like
code:
public var spherePrefab:GameObject;
in the same area as your Sphere and power variables are declared and it will show up in the inspector. Then you can drag your prefab to that and instantiate using that variable.

edit: This covers public variables and scripting prefabs well.

Ah, thanks. The video I was watching used a lot of redundant names so I guess I thought they were referencing the prefab directly. Got it working :)

Mordiceius
Nov 10, 2007

If you think calling me names is gonna get a rise out me, think again. I like my life as an idiot!
How hard is Unity to pick up and learn? I've done java programming in the past (far past, as in over 6 years ago) and other than that, my old past experience included C++ and VB.

I was wanting to dick around and make a little pet project in Unity. If I was to teach myself the basics of the system, how long should that take?

get out of fyad
Mar 27, 2013
As an Independent Study this semester, I'm going to try to create an Occlusion Culling/PVS system that could be used in Minecraft-style block games. I don't think anyone has tried this before and I'm happy to divulge details. I've only used plain old DirectX and OpenGL for graphics stuff before, but I'd like to use some engine to speed up development time. I'm C# savvy so I'm thinking of using OGRE (in the form of Axiom) or MonoGame. Does anyone have a recommendation?

Some other stuff that may help you answer: I'm not trying to make a game, so stuff like physics, AI, sound, and asset loading doesn't really matter too much. I'll be writing my own scene graph and bounding volume hierarchy. Lastly, I think Unity is out because it will take too long to learn.

xzzy
Mar 5, 2009

Mordiceius posted:

How hard is Unity to pick up and learn? I've done java programming in the past (far past, as in over 6 years ago) and other than that, my old past experience included C++ and VB.

I was wanting to dick around and make a little pet project in Unity. If I was to teach myself the basics of the system, how long should that take?

If you have programming experience, a few days is plenty of time to get your feet wet. The hardest part is the first couple hours because the documentation for Unity's workflow is pretty crappy.. google around for a "hello world" style project to get over that hump. Once you finish that, literally every question you could have about implementing things in Unity will have a hit in google (including code samples), which means your familiarity will accelerate the further along you go.

Sab669
Sep 24, 2009

^That about sums up my experience over the past few days :v:

stramit
Dec 9, 2004
Ask me about making games instead of gains.
http://unity3d.com/learn/tutorials/projects/stealth
Fastest way to learn unity at the moment.

rarbatrol
Apr 17, 2011

Hurt//maim//kill.

get out of fyad posted:

As an Independent Study this semester, I'm going to try to create an Occlusion Culling/PVS system that could be used in Minecraft-style block games. I don't think anyone has tried this before and I'm happy to divulge details. I've only used plain old DirectX and OpenGL for graphics stuff before, but I'd like to use some engine to speed up development time. I'm C# savvy so I'm thinking of using OGRE (in the form of Axiom) or MonoGame. Does anyone have a recommendation?

Some other stuff that may help you answer: I'm not trying to make a game, so stuff like physics, AI, sound, and asset loading doesn't really matter too much. I'll be writing my own scene graph and bounding volume hierarchy. Lastly, I think Unity is out because it will take too long to learn.

I can't help you too much with your questions, but http://0fps.wordpress.com/ has a good set of entries on minecraft-like games, including culling and storage formats, which may be of use.

KoRMaK
Jul 31, 2012



Strumpy posted:

http://unity3d.com/learn/tutorials/projects/stealth
Fastest way to learn unity at the moment.
Wow, hell yea. I am advanced to expert and this tutorial seems awesome from what the overview says.

Synthbuttrange
May 6, 2007

Ugh, more video tutorials. I mean its fine for some things, but I really wish screenshot format ones were more prevalent for this kind of thing.

Zizi
Jan 7, 2010

SynthOrange posted:

Ugh, more video tutorials. I mean its fine for some things, but I really wish screenshot format ones were more prevalent for this kind of thing.

You and me both. I despise video tutorials because it seems (to me) like it takes FOREVER for the person doing the voiceover to explain anything(usually because they're trying not to lose the inexperienced people). But you can't just skip or skim things!

Shalinor
Jun 10, 2002

Can I buy you a rootbeer?

Zizi posted:

You and me both. I despise video tutorials because it seems (to me) like it takes FOREVER for the person doing the voiceover to explain anything(usually because they're trying not to lose the inexperienced people). But you can't just skip or skim things!
You can skim them, it just takes a bit of practice. I miss text tutorials, but video tutorials are so much easier to put together that I can't blame anyone for switching.

KoRMaK
Jul 31, 2012



I've been making gif's out of 2D stills. I cannot recommend Spine enough.







This thing is amazing. I can use real art for animations now.

Zizi
Jan 7, 2010

Shalinor posted:

You can skim them, it just takes a bit of practice. I miss text tutorials, but video tutorials are so much easier to put together that I can't blame anyone for switching.

I do skim them on occasion, it's just not as comfortable because there's no way to tell if you missed some little one-sentence nugget of useful-wisdom. That's the part that bugs me. With text, it's possible to see every word on the screen and make a judgment call on whether it's worth paying attention to, but you just can't do the same thing with video. It's just something I deal with and carry on, but I still have my preferences.

I can't blame anyone, either, really, though personally I don't think *good* videos are any easier or much less time-consuming to produce (my last job was-- mostly-- developer documentation in both written and video form).

roomforthetuna
Mar 22, 2005

I don't need to know anything about virii! My CUSTOM PROGRAM keeps me protected! It's not like they'll try to come in through the Internet or something!

Zizi posted:

I can't blame anyone, either, really, though personally I don't think *good* videos are any easier or much less time-consuming to produce (my last job was-- mostly-- developer documentation in both written and video form).
Yeah, either you've written out a plan for what you intend to say (in which case post the written version somewhere!) or you're going to end up rambling some stupid crap at some point.

The video does take away the effort of the "annotating with well-selected pictures" step of tutorial-making though.

Yodzilla
Apr 29, 2005

Now who looks even dumber?

Beef Witch
I want to enable Gapless Looping for the music in my Unity game and am having some issues. The files themselves are in WAV format so I'm going to have Unity compress them to whatever format needed on a per-platform basis (MP3 on some, OGG on others). The problem is that the Gapless Looping option is grayed out and I'm reading that you have to select MPEG Audio Format to use it. However MPEG isn't an option regardless of what platform I'm targeting. Is this an issue for Unity on OSX or am I missing something else?

Shalinor
Jun 10, 2002

Can I buy you a rootbeer?

Yodzilla posted:

I want to enable Gapless Looping for the music in my Unity game and am having some issues. The files themselves are in WAV format so I'm going to have Unity compress them to whatever format needed on a per-platform basis (MP3 on some, OGG on others). The problem is that the Gapless Looping option is grayed out and I'm reading that you have to select MPEG Audio Format to use it. However MPEG isn't an option regardless of what platform I'm targeting. Is this an issue for Unity on OSX or am I missing something else?
WAVs automatically gapless loop (because why would anyone NOT want gapless looping). You only need to worry about that with MP3s or OGGs.

Adbot
ADBOT LOVES YOU

Yodzilla
Apr 29, 2005

Now who looks even dumber?

Beef Witch
Well I'm not playing music in WAV format because that takes up too much space so it has to be compressed and as per Unity docs Gapless is only available for MP3 so Web and Android builds are poo poo out of luck.


But the bigger problem is that if you're building for Web and have an audio file set to Compressed that dropdown means OGG. If you then switch platforms to iOS that Compressed dropdown now means MPEG which is fine. What's NOT fine is that it doesn't actually unlock those MPEG specific options unless for every audio file you switch from Compressed to Native and then BACK to Compressed again. That's stupid.

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