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
poemdexter
Feb 18, 2005

Hooray Indie Games!

College Slice

shs posted:



It's not much, but it's the first time my game dev charade has earned me a tangible reward and not just grief or misery (I got the phone for free).

High five free windows phone buddy? Is that a 925? That's the one I won at the Unity porting session at Microsoft a few weeks ago.

Adbot
ADBOT LOVES YOU

Angryhead
Apr 4, 2009

Don't call my name
Don't call my name
Alejandro




shs posted:



It's not much, but it's the first time my game dev charade has earned me a tangible reward and not just grief or misery (I got the phone for free).

poemdexter posted:

High five free windows phone buddy? Is that a 925? That's the one I won at the Unity porting session at Microsoft a few weeks ago.

High five to both of you! Finally received my 625 a few days ago (posted about the "jam" that we won them at here) but I haven't done much with it yet.
Unfortunately, libGDX does not port to Windows phone. Maybe I'll check out Unity again...

Mercury_Storm
Jun 12, 2003

*chomp chomp chomp*
Can someone explain how bad the performance impact in Unity of using Instantiate() and Destroy() for objects like bullets, or even using audio.PlayOneShot without having a pool of junk to recycle?

The main game I'm working on is strictly PC/Mac/Linux and I haven't noticed any huge performance hits from just firing an automatic weapon or even a minigun that fires tons of rounds a second. Does it cause memory leaks over time or something like that?

ThisIsNoZaku
Apr 22, 2013

Pew Pew Pew!

Mercury_Storm posted:

Can someone explain how bad the performance impact in Unity of using Instantiate() and Destroy() for objects like bullets, or even using audio.PlayOneShot without having a pool of junk to recycle?

The main game I'm working on is strictly PC/Mac/Linux and I haven't noticed any huge performance hits from just firing an automatic weapon or even a minigun that fires tons of rounds a second. Does it cause memory leaks over time or something like that?

I don't know Unity, so I looked up answers by someone more knowledgeable first but I feel pretty :smug: that what I thought it would be looks mostly correct.

Basically, there's lots of overhead involved in constructing and destructing objects and littering your heap with detritus increases the likelihood of garbage collection, which is a processing-intensive task.

The problem is one of scale. If your game is likely to get fairly significantly bigger, I would implement an alternative. Especially since if it becomes a problem later, it will be an even worse hassle to fix.

ThisIsNoZaku fucked around with this message at 09:39 on May 11, 2014

Angry_Ed
Mar 30, 2010




Grimey Drawer
Apologies if someone answered this recently, but I'm (finally) fed up with Unity's built-in input management system and would like to know of what other Unity devs in this thread are using. Preferably I would like something that either has a nice UI that can be adjusted to fit different game visuals, or one that'll just let me call the inputs as variables to be displayed as text so I can communicate to players what the controls are without having to consult a README all the time. I know a couple ones were mentioned a long time ago in this thread but I can't seem to find that info.

Obsurveyor
Jan 10, 2003

Angry_Ed posted:

Apologies if someone answered this recently, but I'm (finally) fed up with Unity's built-in input management system and would like to know of what other Unity devs in this thread are using. Preferably I would like something that either has a nice UI that can be adjusted to fit different game visuals, or one that'll just let me call the inputs as variables to be displayed as text so I can communicate to players what the controls are without having to consult a README all the time. I know a couple ones were mentioned a long time ago in this thread but I can't seem to find that info.

cInput is the one I've heard mentioned the most often around here. I've been using it after picking it up from a sale and it's pretty easy to use. Since it matches Unity's Input API, it's real easy to drop in and replace Input in other assets. The built-in configuration GUI is good enough for development testing.

full point
Jan 21, 2006

^ :argh:

Check out cInput. I think the price is around $15-20. I found it very easy to set up and use.

You define inputs like this:

code:
cInput.SetKey("Use", Keys.Enter, Keys.Joystick1Button5);
cInput.SetKey("Move Up", Keys.UpArrow, Keys.Joy1Axis2Negative);
cInput.SetKey("Move Left", Keys.LeftArrow, Keys.Joy1Axis1Negative);
cInput.SetKey("Move Down", Keys.DownArrow, Keys.Joy1Axis2Positive);
cInput.SetKey("Move Right", Keys.RightArrow, Keys.Joy1Axis1Positive);
You can define axes using those inputs:

code:
cInput.SetAxis("HorizontalAxis", "Move Left", "Move Right");
cInput.SetAxis("VerticalAxis", "Move Down", "Move Up");
If you look at the video tutorials (specifically #3 and #4), you will see how to either integrate the pre-made input menu into your game or build your own custom menu. Once you've set up the in-game menu, your players can easily re-bind their controls during gameplay.

full point fucked around with this message at 15:59 on May 11, 2014

Bocom
Apr 3, 2009

No alibi
No justice
No dream
No hope
Alternatively check out InControl, which is open-source but also available on the Asset Store for $15.

high on life and meth
Jul 14, 2006

Fika
Rules
Everything
Around
Me
Anyone doing LowRezJam? It's a bastard and a half making a game in 32 by 32 pixels.

xgalaxy
Jan 27, 2004
i write code
I've got a Unity serialization question.

I've got three classes:
1. Node - plain C# class
2. Link - plain C# class
3. Connections - MonoBehavior

Link is a tuple of Nodes.
Connections has Editor exposed List<Node> and List<Link>.
The List<Node> in Connections is the list of all nodes, where as Link represents the set of Nodes actually connected with each other.

The problem is Unity serialization serializes out the Nodes in Link as separate instances from those in Connection's List<Node>.
Anyone know how I can fix this?


code:
public class Node
{
   //
}

public class Link
{
   public Node[] nodes;
}

public class Connections : MonoBehaviour
{
   public List<Node> Nodes; // serialized by unity
   public List<Link> Links; // serialized by unity
}

// pseudo code
var node1 = new Node();
var node2 = new Node();
var node3 = new Node();
var link = new Link();
link.nodes[0] = node1;
link.nodes[1] = node2;
Connections.Nodes.Add(node1);
Connections.Nodes.Add(node2);
Connections.Nodes.Add(node3);
Connections.Links.Add(link);

xgalaxy fucked around with this message at 17:53 on May 11, 2014

dupersaurus
Aug 1, 2012

Futurism was an art movement where dudes were all 'CARS ARE COOL AND THE PAST IS FOR CHUMPS. LET'S DRAW SOME CARS.'

xgalaxy posted:

I've got a Unity serialization question.

I've got three classes:
1. Node - plain C# class
2. Link - plain C# class
3. Connections - MonoBehavior

Link is a tuple of Nodes.
Connections has Editor exposed List<Node> and List<Link>.
The List<Node> in Connections is the list of all nodes, where as Link represents the set of Nodes actually connected with each other.

The problem is Unity serialization serializes out the Nodes in Link as separate instances from those in Connection's List<Node>.
Anyone know how I can fix this?


code:
public class Node
{
   //
}

public class Link
{
   public Node[] nodes;
}

public class Connections : MonoBehaviour
{
   public List<Node> Nodes; // serialized by unity
   public List<Link> Links; // serialized by unity
}

// pseudo code
var node1 = new Node();
var node2 = new Node();
var node3 = new Node();
var link = new Link();
link.nodes[0] = node1;
link.nodes[1] = node2;
Connections.Nodes.Add(node1);
Connections.Nodes.Add(node2);
Connections.Nodes.Add(node3);
Connections.Links.Add(link);

I get the feeling that maybe Unity's serialization isn't meant to be used like that. If you populated the lists via the editor it would work out the same way, so that may just be how it works. Unless there's a way you can get it to use your own serialization routine, you're probably going to have to do it like you store verts and triangles: Nodes remains a list of all the nodes, but Link is a list of indexes from Nodes. Save it like that, and then at runtime you can turn that list of indexes into references on load, or fetch them when needed.

Edit: probably wouldn't be hard to pull off with an editor script if you need editor-entry-support

dupersaurus fucked around with this message at 18:10 on May 11, 2014

xgalaxy
Jan 27, 2004
i write code
Found this in the Unity docs:

quote:

Unity serializes all primitive types, strings, arrays, lists, types specific to Unity such as Vector3 and your custom classes with the Serializable attribute as copies belonging to the object they were declared in.

ScriptableObject fields, or any UnityEngine.Object fields, such as MonoBehaviour, Mesh, GameObject and so on, are stored by reference as opposed to by value.

Seems kind of heavy to make Node inherit from ScriptableObject though, not to mention you have to instantiate it differently.
But this is neat. Now I know what ScriptableObject can be good for I guess.

Mercury_Storm
Jun 12, 2003

*chomp chomp chomp*

ThisIsNoZaku posted:

I don't know Unity, so I looked up answers by someone more knowledgeable first but I feel pretty :smug: that what I thought it would be looks mostly correct.

Basically, there's lots of overhead involved in constructing and destructing objects and littering your heap with detritus increases the likelihood of garbage collection, which is a processing-intensive task.

The problem is one of scale. If your game is likely to get fairly significantly bigger, I would implement an alternative. Especially since if it becomes a problem later, it will be an even worse hassle to fix.

Oh thanks, sometimes I forgot to look at the answers site. It seems like it's primarily a mobile issue, though if I ever see any hiccups on PC it seems like it would be easy just to convert any Instantiates to work with the pooling system.

Nition
Feb 25, 2006

You really want to know?

Obsurveyor posted:

cInput is the one I've heard mentioned the most often around here. I've been using it after picking it up from a sale and it's pretty easy to use. Since it matches Unity's Input API, it's real easy to drop in and replace Input in other assets. The built-in configuration GUI is good enough for development testing.

full point posted:

^ :argh:

Check out cInput. I think the price is around $15-20. I found it very easy to set up and use.

I was put off buying cInput because cInput 1 is open source and when I looked at the source... it wasn't great. Not the worst, but a lot of copy-paste code that could easily have been put in an array and a loop. How's the code in cInput 2?

Shalinor
Jun 10, 2002

Can I buy you a rootbeer?

Mercury_Storm posted:

Oh thanks, sometimes I forgot to look at the answers site. It seems like it's primarily a mobile issue, though if I ever see any hiccups on PC it seems like it would be easy just to convert any Instantiates to work with the pooling system.
Bingo - it's a HUGE mobile issue, and something you will absolutely have to address if you want to do phones.

... but for PC? Yeah, you probably won't notice it. It's a bad habit to get into, but it isn't likely to matter anyways, especially for a smaller game.

Bocom posted:

Alternatively check out InControl, which is open-source but also available on the Asset Store for $15.
Unless you really (really really) want input rebinding, definitely use InControl. Gamepad management even in cInput is pretty miserable - on the one hand, it allows rebinding of inputs, but on the other, pretty much guaranteed the player will have to rebind before they can do anything. Real bad for that first-execution impression. I use cInput, and am resigning myself to a "it's your first time? ok! let's rebind those controls!" flow.

I'm guessing the ideal solution would be InControl layered over cInput right now, though InControl dude says he's working on adding rebinding support / that's a "someday" feature.

Shalinor fucked around with this message at 23:24 on May 11, 2014

Obsurveyor
Jan 10, 2003

Nition posted:

I was put off buying cInput because cInput 1 is open source and when I looked at the source... it wasn't great. Not the worst, but a lot of copy-paste code that could easily have been put in an array and a loop. How's the code in cInput 2?

I just skimmed through the code and it doesn't look terrible. Pretty pedantic input management stuff. Everything has sane names. There are for loops and dictionaries and no deep if/switch trees or any huge red flags jumping out at me. I looked at the cInput 1 source and it does look much better written(but still one large file) than that.

No input binding is a deal killer for me. I hate it when games don't let you bind your controls how you want when some dumb layout is used.

Nition
Feb 25, 2006

You really want to know?
Cool. I imagine he cleaned it up a lot once he wanted to sell it.

Tann
Apr 1, 2009

First of my weekly games that I don't hate!


Tann fucked around with this message at 05:42 on May 26, 2014

Crudus
Nov 14, 2006

Hahaha, I absolutely love what happens if you hold jump too long

JossiRossi
Jul 28, 2008

A little EQ, a touch of reverb, slap on some compression and there. That'll get your dickbutt jiggling.
People need to stop putting links in images :colbert:

Because I am not smart enough to follow contextual clues... :saddowns:

JossiRossi fucked around with this message at 07:25 on May 12, 2014

Tummyache
Oct 30, 2013

"Disapproval"
Got fed up with my starter characters armor and redid all of them this weekend. I went with a completely different art style and learned a valuable lesson, pixel-art in 3D is something that requires a gently caress ton of effort. So I dropped trying to make everything crisp and clean and made these instead.




And here are the old ones for scale



I tweaked a little bit of the geometry too. Glad I've been taking these historical screenshots because it's crazy to see how different things look.

Fur20
Nov 14, 2007

すご▞い!
君は働か░い
フ▙▓ズなんだね!
Shoot, that's ballin'. It looks like it could've come straight out of a triple-A DS or PS1 title.

Hel
Oct 9, 2012

Jokatgulm is tedium.
Jokatgulm is pain.
Jokatgulm is suffering.

Shalinor posted:

Unless you really (really really) want input rebinding

I'm sorry Shalinor but unless your input devices only have one button, you always really(really really) want input rebinding.

Let's say you hard code the movement to WSAD, congratulations you just hosed over all of France, anything hardcoded to Y or Z makes it awkward for Germany and a lot of eastern Europe. I don't even know how it would be with non-Latin keyboards. All that before we even get to people with disabilities or just plain different preferences.

Hel fucked around with this message at 12:36 on May 12, 2014

Shoehead
Sep 28, 2005

Wassup, Choom?
Ya need sumthin'?
I got scrolling working :3:


Also today I found out about the sprite limit on GM and uh.. I'm not really sure I want to drop €40 on the Standard ed.

Polio Vax Scene
Apr 5, 2009



Your ui bars don't scroll! Make sure to add view_xview[view_current] and view_yview[view_current] to their coordinates.

xzzy
Mar 5, 2009

Nope, if you want to know how much health you have you gotta run all the way back to the start of the map. Working as intended, won't fix.

Shoehead
Sep 28, 2005

Wassup, Choom?
Ya need sumthin'?

Manslaughter posted:

Your ui bars don't scroll! Make sure to add view_xview[view_current] and view_yview[view_current] to their coordinates.

UI bars? Those are part of the building! :v: (Thanks!)

Catgirl Al Capone
Dec 15, 2007

Shoehead posted:

I got scrolling working :3:


Also today I found out about the sprite limit on GM and uh.. I'm not really sure I want to drop €40 on the Standard ed.

Make as much of your game as you can and decide once you're up against that limit. You should be able to at least make a solid 1-2 level demo and decide whether GM is working for you well enough to warrant dropping ~50 bucks. If not there are other options available.

Also watch out for steam sales, I got my copy for only ~$25 that way.

Polo-Rican
Jul 4, 2004

emptyquote my posts or die
If any of you guys live in NYC, we're going to be at a Destructoid event in a few weeks with an all-new, 2-player "Arcade Edition" of Icarus Proudbottom Teaches Typing:

http://events.disqus.com/nyc/dtoid-game-night/

Crap... just read the page again and saw that another dev is going to be showing off some sort of typing game... whoops...


Gimmicky Indie Game Idea: a game where the GUI doesn't scroll with you on purpose, the gameplay is designed so you have to travel back and forth from the GUI to other parts of the game. Example - a quest gets added to your quest log, but you actually need to travel back to your quest log to see it.

Polo-Rican fucked around with this message at 14:59 on May 12, 2014

Internet Janitor
May 17, 2008

"That isn't the appropriate trash receptacle."
Tummyache: Just gonna chime in that your new models look fantastic. I think you're really getting the hang of this.

mutata
Mar 1, 2003

Polo-Rican posted:


Gimmicky Indie Game Idea: a game where the GUI doesn't scroll with you on purpose, the gameplay is designed so you have to travel back and forth from the GUI to other parts of the game. Example - a quest gets added to your quest log, but you actually need to travel back to your quest log to see it.

So a fetch quest where you have to go fetch the fetch quest...?

Zaphod42
Sep 13, 2012

If there's anything more important than my ego around, I want it caught and shot now.

Polo-Rican posted:

Gimmicky Indie Game Idea: a game where the GUI doesn't scroll with you on purpose, the gameplay is designed so you have to travel back and forth from the GUI to other parts of the game. Example - a quest gets added to your quest log, but you actually need to travel back to your quest log to see it.

Get out of here Molyneux!

If any of you haven't read it already: https://twitter.com/PeterMolydeux

quote:

Imagine if UI was the enemy?

:allears:

Shoehead
Sep 28, 2005

Wassup, Choom?
Ya need sumthin'?
"And it would lie to you"

Oh man that would be great\awful

Internet Janitor
May 17, 2008

"That isn't the appropriate trash receptacle."
Further evidence that Kirby Super Star had the most creative bosses:

https://www.youtube.com/watch?v=qEIDmPvTB20

StickFigs
Sep 5, 2004

"It's time to choose."

Internet Janitor posted:

Further evidence that Kirby Super Star had the most creative bosses:

https://www.youtube.com/watch?v=qEIDmPvTB20

You earned 4 Tenderness points!

Shoehead
Sep 28, 2005

Wassup, Choom?
Ya need sumthin'?

Internet Janitor posted:

Further evidence that Kirby Super Star had the most creative bosses:

https://www.youtube.com/watch?v=qEIDmPvTB20

I honestly think Kirby Superstar is the closest I've ever gotten to finding the perfect game for me.

Fur20
Nov 14, 2007

すご▞い!
君は働か░い
フ▙▓ズなんだね!
There we go, that's the last of my most major bugs solved: the game would crash if you minimized the window when you brought it back up (ObjectDisposedException Texture2D not found). The problem? A sneaky bastard spriteBatch.Dispose() that I threw in when poo poo-shotgunning different solutions to my RAM management problem eight, nine months ago and by this point, it'd been in my code so long and not doing anything intrusive that it didn't stick out to me.

Of course, this creates a secondary problem in that I now feel very accomplished for today despite having only deleted a single line of code :v:

shs: Also you were right; I compiled a press demo copy with proper Build For Release rather than that "Publish Project" impostor. Took a 2.5GB debug build to a 480MB Release build, which further rars down to 400MB, so the final size estimate is leaning more towards the 1.8-2.2GB range, give or take if WinRAR is as good at compressing a larger project than it is now. You a bro :hf:

Fur20 fucked around with this message at 01:44 on May 13, 2014

Ulta
Oct 3, 2006

Snail on my head ready to go.
Ever want to blackjack battle while poorly drawn missiles fly around?



Here we see the hero destroying missiles and actually winning a hand, doing some damage to his opponent.



and here we see some missiles getting through to the bottom and lowering our health to 0, causing us to lose the match.

https://www.youtube.com/watch?v=_YBD29ea3Js

Learned some stuff already but pushing onward. Already have the ideas for more scenarios. Art is still in a very temporary state.

Cirrial
Oct 24, 2012
With Flash dead, Unity's future looking uncertain (Unity 5 sure is a thing), UDK not being suited for it, and Game Maker being a bit too basic for my liking, what is even a valid thing to make 2D games with these days? I'm sort of spinning around in circles here wanting a framework to work with but I'm starting to drift further and further into the idea that making my own engine would be the best option.

It isn't the best option. I know it's far, far from the best option, because that way lies madness and no game.

I just don't know what is a sensible tool to use anymore. It feels like everything is losing favour and/or support and everything is terrible.

Adbot
ADBOT LOVES YOU

Hat Thoughts
Jul 27, 2012
What's wrong with Unity?

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