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
xgalaxy
Jan 27, 2004
i write code

FuzzySlippers posted:

The author of Rage Spline is the one they hired to head up the 4.3 2D so I dunno if using that might make it easier to transition to the regular Unity support when its released.

They also hired the principal developer of Torque2d, Melv May. I dunno if he is working on the 2d stuff though.

Adbot
ADBOT LOVES YOU

Pollyanna
Mar 5, 2005

Milk's on them.


How should you approach designing a game idea and structuring a project? Completely separate from actually programming the game, how do you know what parts to split the project into, what kinda file structure would work best, how to develop game mechanics and ideas, etc.? Could I get a basic example of the design flow for a simple game?

I know this is more of a design question than a coding question, but it seemed appropriate for this thread.

DancingPenguin
Nov 27, 2012

I ish kakadu.

Pollyanna posted:

How should you approach designing a game idea and structuring a project? Completely separate from actually programming the game, how do you know what parts to split the project into, what kinda file structure would work best, how to develop game mechanics and ideas, etc.? Could I get a basic example of the design flow for a simple game?

I know this is more of a design question than a coding question, but it seemed appropriate for this thread.

You are probably going to receive so many varied answers that it will be hard to wrap your head around them.

I'd say:
General idea -> Concept Art / Mechanics (preferably drawn, makes it easier) -> Graphics -> Programming (Graphics/Programming of course can and will be done simultaneously, but programming is what it all comes down to in the end, testing so that animations etc work in-game, so having some example graphics at least is good before starting the programming)
Programmers can of course do the mechanics as soon as the concept for those are done, while your graphics section starts doing said quick examples.

File structure is basically whatever works for your programmer since recoding the path to XXX file or not having it in a general structure is pretty annoying.
(Textures, Models, Script, Music, Sounds) are just a few examples of folders you could use as sub-folders.

I have no idea how they do it in the AAA-studios etc, but this is how I work.
My approach to this is of course pretty biased due to being a programmer. :colbert:

OzyMandrill
Aug 12, 2013

Look upon my words
and despair

Generally, there are natural splits you can consider:

The main one is:
Front end:
Everything from loading screen, character select, load/save progress, maybe even a 2D simple progress map/chart/etc
Also includes non-game-engine cutscenes/story stuff

Game:
Given the game parameters as decided in the front end (current character/level), then this splits into:
Input
Game Engine
- Graphics
- World graphics (mostly static)
- Animation
- 'Physics' - everything from player motion & collision to full physics sim.
- AI - What the 'NPCs' do
- Special effects (pretty stuff)
- Game logic (game rules, plot event sequencing, scoring points, dying)

The trend in AAA studios is to have custom libraries for much of these, most of which can be reused (tho is generally heavily edited for a specific game, but the core remains shareable) There was a push for using middleware a few years back, but with the exception of some twisty or dull parts (movie players) these are often done in-house. Middleware was gaining ground until EA bought out Renderware and put the willies up everyone - all the risk assessments started saying 'what if a competitor buys up the middleware we use!'.

A good game design will describe most (if not all) these elements and how they should work together. Step by step user flows through the UI, to describing how detailed the physics needs to be, basic control systems, power up types, basic plot, graphical styles etc.
These can then be expanded on in the early stage of the project as time is allocated to prototyping the fuzzier parts of the design to nail stuff down.

It is then largely down to the lead to create the basic framework for the game, usually a harness that loads the custom libraries/engines, initialises hardware (display & sound), and then has a basic state machine for handling transitioning between the main game states (frontend sections and/or game modes). This should then allow separate team members to work on the discrete sections without bumping into each other - one can be working on the frontend flow while another is building the world representation, while another strings together animations & physics whilst more can do AI or special effects.

Design continues at basic development starts, and certain design choices may be prototyped once the engine reaches a stage where small testbeds can be made that implement specific mechanics to see if they are any good.

However - all projects are different, and the process ends up evolving organically once the foundations are laid, so the trick is to know what techniques & styles work well for foundations that give you the flexibility to change direction, and allows multiple people to work simultaneously on different bits.

Pollyanna
Mar 5, 2005

Milk's on them.


How does that work for a one-man project, though? Do simple, non-AAA games go through much the same process, or is it more streamlined?

DancingPenguin
Nov 27, 2012

I ish kakadu.

Pollyanna posted:

How does that work for a one-man project, though? Do simple, non-AAA games go through much the same process, or is it more streamlined?

Having a proper design document sure makes things easier at least.
Even if OzyMandrills list seems long, it's pretty much a time-saver to have everything written down.
This gives you a reference point when you've come maybe halfway through, and it makes implementing physics etc a lot easier. (You can quickly determine/google what methods or additional libraries you will use.)

xgalaxy
Jan 27, 2004
i write code
Has anybody heard anything about a SteamOS sdk for developing apps for it?
I'm assuming they are going to be writing some custom stuff that you are going to have to target against.

xzzy
Mar 5, 2009

All I've seen that's set in stone is its going to be linux based. Since they're apparently designing it to be hardware indifferent I would assume they use SDL for graphics, but it's probably too soon to know for sure.

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.
It'll probably be just like porting to Linux + Steam API, nobody wants yet another custom platform to support.
For reference, Steam and Source use SDL2/OpenGL on Linux.

stramit
Dec 9, 2004
Ask me about making games instead of gains.

xgalaxy posted:

They also hired the principal developer of Torque2d, Melv May. I dunno if he is working on the 2d stuff though.

He's been bashing away at the 2d physics side of things. :)

xgalaxy
Jan 27, 2004
i write code

Strumpy posted:

He's been bashing away at the 2d physics side of things. :)

Cool. Say hi for me. I used to work with him at GarageGames :p

WaterIsPoison
Nov 5, 2009
Started working on a Roguelike to spend some of my freetime and I'm discovering the joys of OpenGL shaders. Love2D is a really excellent platform for all of you guys looking for a lightweight 2D library.

xgalaxy
Jan 27, 2004
i write code
Unity editor crashing almost every time I step through code or continue from a breakpoint is really really frustrating.

EDIT:
Okay, one of the crashes happens if I stick a breakpoint on a Resources.Load call and try to either step over it or hit continue from that point. If i stick the breakpoint after that line, no crash happens.

xgalaxy fucked around with this message at 20:32 on Sep 26, 2013

SlightlyMadman
Jan 14, 2005

SlightlyMadman posted:

...
When I open up the project on another computer though, the scene is completely empty. My game script and camera and everything like that are gone. I'm guessing that's in a file that's getting ignored somehow, but I'm not seeing where it is to put it back in.

So the idea in this thread earlier was correct that Unity simply didn't have the scene open, but I'm still having problems running my game on another computer. When I loaded the scene, all the right stuff was there, but none of the game objects had their behavior scripts attached, and the scripts didn't have any of their properties set (the things you drag into the public property names in unity's designer). I got that all set up, but none of my prefabs had their meshes associated. I associated those and now everything works ok, but none of the meshes have any textures, nor does my skybox.

What else am I missing here?

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.

SlightlyMadman posted:

So the idea in this thread earlier was correct that Unity simply didn't have the scene open, but I'm still having problems running my game on another computer. When I loaded the scene, all the right stuff was there, but none of the game objects had their behavior scripts attached, and the scripts didn't have any of their properties set (the things you drag into the public property names in unity's designer). I got that all set up, but none of my prefabs had their meshes associated. I associated those and now everything works ok, but none of the meshes have any textures, nor does my skybox.

What else am I missing here?
Make sure you have meta files enabled and added to Git (they're the *.meta files next to your Library assets):


(you can also try Text serialization mode to make things cleaner for Git)

Obsurveyor
Jan 10, 2003

SupSuper posted:

Make sure you have meta files enabled and added to Git (they're the *.meta files next to your Library assets):

(you can also try Text serialization mode to make things cleaner for Git)

This is exactly what I said in the first response to him a page back and 4 days ago. I can only hope he already took the advice back then, even though it sounded exactly like what you'd see with meta files off.

SlightlyMadman
Jan 14, 2005

Obsurveyor posted:

This is exactly what I said in the first response to him a page back and 4 days ago. I can only hope he already took the advice back then, even though it sounded exactly like what you'd see with meta files off.

Ah, I completely misunderstood you and tried that on the other computer, since that was the one that was broken. I just set it on the original computer and will try checking those in now. Thanks for your help!

Obsurveyor
Jan 10, 2003

SlightlyMadman posted:

Ah, I completely misunderstood you and tried that on the other computer, since that was the one that was broken. I just set it on the original computer and will try checking those in now. Thanks for your help!

Yeah, you have to set it on the project and then push it to the repository. It won't do anything after the fact. :)

SlightlyMadman
Jan 14, 2005

Obsurveyor posted:

Yeah, you have to set it on the project and then push it to the repository. It won't do anything after the fact. :)

Thanks, I'm still pretty new to unity. So by default where does it store these things, in the registry or something?

Obsurveyor
Jan 10, 2003

SlightlyMadman posted:

Thanks, I'm still pretty new to unity. So by default where does it store these things, in the registry or something?

I think it stores them in the files but they must be relative offsets or something and the way git creates changesets for binary files breaks them. I've never tried a binary diff but they must not come out the same way they go in. The meta files seem to extract whatever causes the breakage into data git can handle properly.

Dishman
Jul 2, 2007
Slimy Bastard
So I tried to get my feet wet with the XNA kit BUUUT my handmedown vaio laptop only has an intel media accelerator.. XNA throws me an error after debug when I try to run the program because Direct3d (i think) is unsupported.

Should I just get my hands on a regular visual studio and go ground up with C#? Hadn't done any programming since high school, got into it again a couple weeks ago making an inventory program (successfully, I might add) in excel VBA. I know a person or two had mentioned starting ground up would be a good way to get a handle on OOP, framework, etc.

I'd like to at least make a pong, but I'm all about gaining an understanding to work with.

Dr. Dos
Aug 5, 2005

YAAAAAAAY!

WaterIsPoison posted:

Started working on a Roguelike to spend some of my freetime and I'm discovering the joys of OpenGL shaders. Love2D is a really excellent platform for all of you guys looking for a lightweight 2D library.


It's like a Megazeux game with lighting.

Meridian Rizing
Sep 4, 2007
So I'm looking for some non-Unity options for making HTML5 games. I've been looking into Haxe with OpenFL. Does anyone have any opinion on Haxe? Are there other alternatives for making HTML5 content, without having to write it in Javascript?

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
I'm surprised you're caught up about JavaScript. HTML5 is nowhere near ready for realtime gaming, but that's mostly because of multimedia and speed issues.

JavaScript really isn't as bad as everybody makes it out to be, especially with strict mode, and it will really be the least of your worries.

Flownerous
Apr 16, 2012

SlightlyMadman posted:

Thanks, I'm still pretty new to unity. So by default where does it store these things, in the registry or something?

There's a folder called Library next to Assets. I believe all Unity's data about an asset is stored in there, both import settings and the GUID (the stuff that can be brought out as .meta files) and I think that's where it caches the imported versions of meshes/textures etc so they don't have to be reimported every time you open. I think the Cache server they sell is a way to share that between different workers/computers.

Most of Unity's references between assets use the GUID which is why everything breaks if the Library folder goes missing and there are no .meta files.

superh
Oct 10, 2007

Touching every treasure

Suspicious Dish posted:

I'm surprised you're caught up about JavaScript. HTML5 is nowhere near ready for realtime gaming, but that's mostly because of multimedia and speed issues.

JavaScript really isn't as bad as everybody makes it out to be, especially with strict mode, and it will really be the least of your worries.

This is not remotely true. My company has been working in html5 for almost 2 years now and it's been ready for prime time for about a year.

If you want to see it in action and you have an iOS device, look at the games on the nick app, https://itunes.apple.com/us/app/nick/id596133590?mt=8
They are all running html5 games in a web view.

Don't let nme/openfl taint your perception of the state if html5 gaming.

E: here's another link, that will run in your browser. It may default to flash on a desktop device, so check it out on a tablet. http://www.nick.com/games/legend-of-korra-republic-city-run.html?apiKey=001

superh fucked around with this message at 07:50 on Sep 28, 2013

Rottbott
Jul 27, 2006
DMC

Suspicious Dish posted:

JavaScript really isn't as bad as everybody makes it out to be, especially with strict mode, and it will really be the least of your worries.
I've had to use it seriously for the first time recently. For a language without static typing it seems pretty neat, but who wants that for more than a few hundred lines? I can't express how annoyed I get at finding bugs at runtime which a proper language would have caught in the compiler immediately.

It's also comically slow, and the 'standard library' is so full of holes I can't quite believe it sometimes, given how many people use it, although both of those can be lived with.

I would never choose to write anything in it longer than say one file. Don't even get me started on HTML and web 'apps'.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

Rottbott posted:

I've had to use it seriously for the first time recently. For a language without static typing it seems pretty neat, but who wants that for more than a few hundred lines? I can't express how annoyed I get at finding bugs at runtime which a proper language would have caught in the compiler immediately.

"use strict" finds a lot of the more annoying bugs up-front. Always "use strict".

Rottbott posted:

It's also comically slow, and the 'standard library' is so full of holes I can't quite believe it sometimes, given how many people use it, although both of those can be lived with.

Not sure what the "standard library" means: are you talking about the JavaScript standard library (Object, Array, etc.), or the DOM bindings (document.createElement, node.appendChild)?

I've built some extremely complicated things with just JS/DOM (no jQuery or anything), and with modern enhancements (querySelector, classList), it's fairly powerful and complete:

https://github.com/magcius/img.js/blob/gh-pages/gif.js
https://github.com/magcius/bmdview.js/blob/gh-pages/render.js
https://github.com/magcius/xserver.js/blob/gh-pages/src/server/server.js

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

superh posted:

This is not remotely true. My company has been working in html5 for almost 2 years now and it's been ready for prime time for about a year.

The big issue I ran into was sound and multimedia support. The state of <video> doesn't seem to be getting better, and it doesn't allow for any sort of integration on iOS -- I can't use <video> as the background to an app there.

When I used <audio>, it seemed to lag behind like it was refetching the sound from HTTP every single time I tried to play it. I've also been trying to use the new Web Audio API stuff, but it seems to again have issues with latency and accurate timing.

Rottbott
Jul 27, 2006
DMC

Suspicious Dish posted:

"use strict" finds a lot of the more annoying bugs up-front. Always "use strict".
Ok. I should have been using that from the start but didn't know about it. It still doesn't help with the fundamental problems with dynamic types, but it's an improvement. (They should do a mode like that for C++, but I suppose it's not necessary since you can use static analysis to find stuff.)

Suspicious Dish posted:

Not sure what the "standard library" means: are you talking about the JavaScript standard library (Object, Array, etc.), or the DOM bindings (document.createElement, node.appendChild)?

I've built some extremely complicated things with just JS/DOM (no jQuery or anything), and with modern enhancements (querySelector, classList), it's fairly powerful and complete:

https://github.com/magcius/img.js/blob/gh-pages/gif.js
https://github.com/magcius/bmdview.js/blob/gh-pages/render.js
https://github.com/magcius/xserver.js/blob/gh-pages/src/server/server.js
JavaScript library. I don't care much about the DOM stuff, I'm happy using jQuery for now and falling back to the native functions in the cases where performance is an issue. But I was surprised at how much stuff I had to write myself or live without, e.g. formatting numbers (including localisation), parsing dates, searching arrays, const, etc. Some of it is in newer language versions, which sadly I can't use until widely supported by browsers. Other holes are filled by jQuery, but often it runs very slowly compared to writing your own clunky manual loop or whatever.

superh
Oct 10, 2007

Touching every treasure

Suspicious Dish posted:

The big issue I ran into was sound and multimedia support. The state of <video> doesn't seem to be getting better, and it doesn't allow for any sort of integration on iOS -- I can't use <video> as the background to an app there.

When I used <audio>, it seemed to lag behind like it was refetching the sound from HTTP every single time I tried to play it. I've also been trying to use the new Web Audio API stuff, but it seems to again have issues with latency and accurate timing.

Yeah - there are certainly multimedia issues. I believe you're right, audio is not pre-cached, or even cached. Many devices only have a single channel limit on <audio>.

Web Audio is better - even if it has issues with accurate timing, you can pre load it properly. I was able to get lip-sync out if it for one game by tying an animations progress to the progress of a sample so it is doable.

Video is a total nightmare, and on iPhone can only run in full screen. I personally would try to do anything but use video as a background, but I'm sure there are use cases where it would be necessary.

Obsurveyor
Jan 10, 2003

Rottbott posted:

I've had to use it seriously for the first time recently. For a language without static typing it seems pretty neat, but who wants that for more than a few hundred lines? I can't express how annoyed I get at finding bugs at runtime which a proper language would have caught in the compiler immediately.

Dynamic typing completely changes the way you think about programming. When you can stop thinking about what things are and start thinking about what they do and just use them as such, it's very liberating. Using a test or behavior driven development methodology will do a lot to prevent runtime bugs in a dynamic language.

As a programmer, you shouldn't be a snob about what language you're using. Programming languages are tools to get jobs done, not political or philosophical platforms. There's never going to be a perfect programming language. Embrace new languages when you have to, it will make you a better and more versatile programmer.

Javascript is kind of a Frankenstein with tons of warts. Heck, there's a whole book dedicated to sussing out the good parts and warning you well away from the bad ones("Javascript The Good Parts", very useful book, definitely recommend). However, it's not too horrible once you get used to how to manage it.

edit: weird, if you type Javscript and a colon, it turns it into "java script:"

Obsurveyor fucked around with this message at 14:04 on Sep 28, 2013

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

Rottbott posted:

For a language without static typing it seems pretty neat, but who wants that for more than a few hundred lines?

This is probably more to do with mindset/programming style than any actual deficiency with dynamic typing.

Paniolo
Oct 9, 2007

Heads will roll.
He's not wrong though. There are entire classes of very common runtime bugs in dynamic languages that are caught by the compiler in static languages; as a result, unit testing even trivial code is absolutely required. (That doesn't automatically shift the balance, it just has to be factored into any consideration about how productive you are in a given language.) It just so happens that programming languages never exist in a vacuum and libraries, platform support and available expertise tend to overwhelm any considerations about the language itself.

A theoretical exercise, would anyone with non-trivial experience with Unity (i.e. has actually shipped a game) choose Boo over C# for their next project?

Paniolo fucked around with this message at 17:27 on Sep 28, 2013

Obsurveyor
Jan 10, 2003

Paniolo posted:

A theoretical exercise, would anyone with non-trivial experience with Unity (i.e. has actually shipped a game) choose Boo over C# for their next project?

A theoretical exercise of what, you know Boo is statically typed right? Type inference is not the same thing as dynamic typing. Has Boo ever been anything but a toy language for .NET? That's a seriously loaded/slanted question.

Paniolo
Oct 9, 2007

Heads will roll.
Well that's just my Unity ignorance showing through, as I don't know anything about Boo other than it being Python flavored.

xgalaxy
Jan 27, 2004
i write code
Speaking of Unity and dynamic types. I was playing around with C# anonymous types recently.
https://gist.github.com/xgalaxy/6743756#file-gistfile1-cs

It's pretty neat but its got a lot of drawbacks. Too bad 'dynamic' isn't available for Unity.
Or in particular ExpandoObject: http://msdn.microsoft.com/en-us/library/system.dynamic.expandoobject.aspx

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

Paniolo posted:

He's not wrong though. There are entire classes of very common runtime bugs in dynamic languages that are caught by the compiler in static languages; as a result, unit testing even trivial code is absolutely required. (That doesn't automatically shift the balance, it just has to be factored into any consideration about how productive you are in a given language.) It just so happens that programming languages never exist in a vacuum and libraries, platform support and available expertise tend to overwhelm any considerations about the language itself.

A theoretical exercise, would anyone with non-trivial experience with Unity (i.e. has actually shipped a game) choose Boo over C# for their next project?

Uh yes, this was my point.

Languages don't exist in a vacuum, and if eschew a language just because it's dynamic typing and not because of platforms/libraries/whatever, it's not unlikely that you don't understand how to use them effectively.

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.

Paniolo posted:

A theoretical exercise, would anyone with non-trivial experience with Unity (i.e. has actually shipped a game) choose Boo over C# for their next project?
I think you mean JS over C#, I've never seen anyone use Boo.

Adbot
ADBOT LOVES YOU

Obsurveyor
Jan 10, 2003

SupSuper posted:

I think you mean JS over C#, I've never seen anyone use Boo.

UnityScript is a bastardization of Javascript and should be abolished and any traces of it scrubbed out of existence.

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