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
The Cheshire Cat
Jun 10, 2008

Fun Shoe

Mr Underhill posted:

So how does that work when you're speeding through neighborhoods? I'm not being sarcastic, I'm genuinely curious. Or is it just the behavior that's "spawned"?

Well to give you an idea, here's a map of all the "Idle" nodes in Saints Row 2:


Each one of those red dots represents a location where an NPC can spawn performing some kind of special interaction (like workers doing road work, or a barbershop quartet, or just someone sitting down and reading). So if you're just zooming past, on top of NPCs spawning walking along sidewalks and such, it will also populate the area with NPCs doing some specific behaviour to keep it more interesting. I think the game also has areas like street corners marked as places where NPCs might spawn standing around talking to each other rather than just walking down the street - basically it's a lot of little tricks in order to create NPCs around you that look like they were already there doing something before you arrived.

xzzy posted:

The game tends to delete stuff behind you as soon as it leaves the screen to make room for the stuff you're heading towards.

That's why that awesome car you just passed is nowhere to be found if you slam on the brakes and do a u-turn. Recent GTA's have gotten better about not purging cars instantly, but the first couple 3D games were horrible.. literally as soon as the car was offscreen it got deleted.

Yes, this is one potential annoyance of that kind of system - if the player DOES become interested in something they saw a block back and turns around to go back for it, it will have despawned which tends to break immersion for things like road work which should really still be there. There are approaches you can take to try to avoid that though - "bigger" events like traffic stops or road work or whatever could be given a larger radius of persistence so that even if the rest of the area despawns, they'll stick around until the player is farther away. Something similar can be done to tag vehicles the player has used recently to keep them from disappearing the moment they're out of your sight, or for event spawned entities that might be considered "interesting", like if police cars spawn in response to a crime, they won't just disappear as you drive away.

The Cheshire Cat fucked around with this message at 18:57 on Dec 10, 2014

Adbot
ADBOT LOVES YOU

Nition
Feb 25, 2006

You really want to know?
Oh yes, GTA 3 basically had a keep-the-car-you-want-on-the-screen mini-game. Mafia, which was a similar game released the year after, did much better with keeping cars and things persistent. I don't know if they did anything special though or just had a wider persistence radius.

Tac Dibar
Apr 7, 2009

Resource posted:

I laughed when I saw the running guy, so, I guess that's a good sign? :)

feedmyleg posted:

Love it. He looks like a guy who just did something terribly wrong and is trying to play it cool while he runs away.

Excellent, thanks guys. Working on more animations as we speak.

Dewgy
Nov 10, 2005

~🚚special delivery~📦

The Cheshire Cat posted:

Well to give you an idea, here's a map of all the "Idle" nodes in Saints Row 2:


Each one of those red dots represents a location where an NPC can spawn performing some kind of special interaction (like workers doing road work, or a barbershop quartet, or just someone sitting down and reading). So if you're just zooming past, on top of NPCs spawning walking along sidewalks and such, it will also populate the area with NPCs doing some specific behaviour to keep it more interesting. I think the game also has areas like street corners marked as places where NPCs might spawn standing around talking to each other rather than just walking down the street - basically it's a lot of little tricks in order to create NPCs around you that look like they were already there doing something before you arrived.

Weren't there also tons of spots where you could just stand in one spot, and your Boss would just start doing something special too? Like spontaneously having a fishing pole or joining the cheerleaders?

The Cheshire Cat
Jun 10, 2008

Fun Shoe

Dewgy posted:

Weren't there also tons of spots where you could just stand in one spot, and your Boss would just start doing something special too? Like spontaneously having a fishing pole or joining the cheerleaders?

Yeah, a lot of those red dots had the secondary purpose of acting as triggers for those interactions.

Shalinor
Jun 10, 2002

Can I buy you a rootbeer?

Nition posted:

Oh yes, GTA 3 basically had a keep-the-car-you-want-on-the-screen mini-game. Mafia, which was a similar game released the year after, did much better with keeping cars and things persistent. I don't know if they did anything special though or just had a wider persistence radius.
It had way fewer cars / buildings / everything and everything went slower to boot, so they could get away with a lot more. With how fast GTA cars screamed around, they probably had to cycle through things FAST to avoid all the terrible edge-cases you get if you try temporary persistence. They wouldn't have had much leeway to work with, given the type of game it was and consoles at the time.

Nition
Feb 25, 2006

You really want to know?

Shalinor posted:

It had way fewer cars / buildings / everything and everything went slower to boot, so they could get away with a lot more. With how fast GTA cars screamed around, they probably had to cycle through things FAST to avoid all the terrible edge-cases you get if you try temporary persistence. They wouldn't have had much leeway to work with, given the type of game it was and consoles at the time.

Movement was certainly slower (end-game gimmick cars like the rocket car and the 1950s-style one excluded), but you might be misremembering how small the GTA 3 map actually was. The Mafia map is probably just as detailed:

Nition fucked around with this message at 04:54 on Dec 11, 2014

MockingQuantum
Jan 20, 2012



So at a local game dev meetup tonight, I had someone recommend to me that I not bother with Unity's built in 2D capability and instead go with something like Orthello. I don't have any particular experience with either, and I know it's sort of a sticking point for Unity beginners, so can anyone offer any experiences with something like this?

vanasenshi
Dec 10, 2014
Hey! A proper thread for this!

https://play.google.com/store/apps/details?id=com.ceruleangames.santasspecialdelivery

A few friends and I decided we wanted to make a game on our own instead of our slave drives at *insert major game publisher here*. We started on one project, but then decided we wanted to make a holiday game so we can be festive and poo poo. We decided this in mid november, so it didn't leave us much of a timeline, but everything is made by hand and brand spankin' knew, unlike most of the lame mobile games out there these days, and we actually aimed to have a fun quality product too (why be passionate about something if all you give a poo poo about is the cash grab >.>).

The game includes all things you'd want out of a christmas game! Deliver presents, coal and elves as the most vindictive Santa! Exploding Reindeer! Divebombing Elves! Super-Snowmen! and best of all... making GBS threads down the chimneys of those deemed most heinous.

So, please, check it out, rate it, share it if you had fun and liked it! This was just a fun, couple week project with some good friends and I'm just happy I can get the game out there and in peoples hands to play and say HEY! I DID THIS! (Even though apple sucks and thinks poop games are too offensive for their platform <.<).







https://play.google.com/store/apps/details?id=com.ceruleangames.santasspecialdelivery

Maide
Aug 21, 2008

There's a Starman waiting in the sky...
You registered yesterday and have posted in five threads only about your game (one of which you created). Doesn't that break some sort of advertising rule? Your inline images would also do much better as timgs, they are quite large.

vanasenshi
Dec 10, 2014

Maide posted:

You registered yesterday and have posted in five threads only about your game (one of which you created). Doesn't that break some sort of advertising rule? Your inline images would also do much better as timgs, they are quite large.

Each post is relevant, I'm not just going around spamming. Also, I've been lurking for years ;) Just made my first solo game and wanted to share it, dished out the bucks to be able to talk about it.

Resource
Aug 6, 2006
Yay!

vanasenshi posted:

Each post is relevant, I'm not just going around spamming. Also, I've been lurking for years ;) Just made my first solo game and wanted to share it, dished out the bucks to be able to talk about it.

This is a good reminder to myself that if I am going to do marketing on forums I should have some participation beforehand so I don't just look like I'm marketing my game. Though step one is still make a game... Congrats on making your first solo game though, that's cool :)

Coldrice
Jan 20, 2006


Oh god I hate to be a marketing and spamming the boards, but INTERSTELLARIA MADE THE indieDB TOP 100! Yayyy

Now votes are underway for top 10, as well as indie of the year. I am beyond ecstatic. I doubt I can compete with 5 nights at freddys, but top 10 would be amazing!

they have the voting http://www.indiedb.com/events/2014-indie-of-the-year-awards/top100 we're listed under platformer (unfortunately...). Any support would be amazing. I know indieDB isn't the most amazing place, but to go from a nobody to a top 100 is pretty cool!

retro sexual
Mar 14, 2005
Nice! Voted for you again now :D

Stick100
Mar 18, 2003

Coldrice posted:

Oh god I hate to be a marketing and spamming the boards, but INTERSTELLARIA MADE THE indieDB TOP 100! Yayyy

Now votes are underway for top 10, as well as indie of the year. I am beyond ecstatic. I doubt I can compete with 5 nights at freddys, but top 10 would be amazing!

they have the voting http://www.indiedb.com/events/2014-indie-of-the-year-awards/top100 we're listed under platformer (unfortunately...). Any support would be amazing. I know indieDB isn't the most amazing place, but to go from a nobody to a top 100 is pretty cool!

How do you vote? I don't have any buttons to vote when I go to the page. This one right? http://www.indiedb.com/games/interstellaria

retro sexual
Mar 14, 2005
Go to the top 100 list:
http://www.indiedb.com/events/2014-indie-of-the-year-awards/top100

Go to upcoming games - platformer and click it to expand. Then click vote beside Interstellaria

Shoehead
Sep 28, 2005

Wassup, Choom?
Ya need sumthin'?
Oh wow thats awesome. Time to vote for you again!

captain_g
Aug 24, 2007
Implemented multi-barreled weapons:

_jink
Jan 14, 2006

got immediately sidetracked last time I started gamecrafting, but I'm back at it! This time trying to make something vaguely rougelike-ish? can anyone help me define roguelike


kept the art simple

then tried to come up with the simplest possible game, which led me to a sort of.. 1D roguelike. Movement (and object generation) is grid based, and limited to left/right. Actions use a stamina system that refills when you end your turn, letting enemies take theirs (using the same systems).



grid overlay: on. Using 'search' scavenges for items at your current position.



hitting an enemy! A crab, who I couldn't draw competent legs on, so just used its torso (rip). The dots mean I'm in its sight range (orange) and attack range (red). It's glowing from a 'got hit' flash rendered by a shader, my first foray into them, and is about the extent of what I managed. Either I was looking in the wrong places, or it is an unbelievably large step up in complexity to make a shader that actually moves pixels around.

just got a basic skill system built, and it's been fun coming up with skills to make 1D combat more tactical. You can see sprint (halves movement costs for 3 turns) active in the first screenshot.


I wanted to do some art though! first pass:


2x zoom

not much there yet beyond copy and pasted rocks, and it looks a bit washed out at the moment with no foreground objects (except you and torso crab), but it was nice taking a break from coding :sweatdrop:

BUT, to be honest, I'm kind of into the minimalist style of the current version, and might try mocking up a better + cleaned up version of that. It'd certainly speed up content generation. :sweatdrop::sweatdrop::sweatdrop:
<<< 12 seconds to draw a whole fuckin heap of rocks, wow!

Lucid Dream
Feb 4, 2003

That boy ain't right.

That looks really good.

Jackard
Oct 28, 2007

We Have A Bow And We Wish To Use It
Cave is giving Another World flashbacks here, looks good

Synthbuttrange
May 6, 2007

Mr Underhill posted:

Oh, you mean the thing that you stick to your monitor and it calibrates it? I thought you meant some kind of overall permanent screen that auto-fixes everything. *sigh*


It's called your eyes!
:goonsay:

https://www.photofriday.com/calibrate.php

Mr Underhill
Feb 14, 2012

Not picking that up.
@SynthOrange - thanks for that! I tried and failed. I shall try again!

@Jink - that looks great! Photoshop?

evilentity
Jun 25, 2010
QuadTrees are cool. The plan is to implement two tiered A*, quad tree for large scale and simple grid for small scale pathfinding. Currently single tiered works ok. Got to fiddle around with heuristics. Fun!
Click for higher res view.

DeathBySpoon
Dec 17, 2007

I got myself a paper clip!
Ludum Dare inspired me to try working on smaller projects, so I think I'm gonna start trying to do the one game a month thing. I started a little Mega Man inspired shooter, here's a gif of the basic mechanics finished:



Swapped to GM for this, it's nice to only focus on gameplay and not have to think too much about the technical side of things.

FraudulentEconomics
Oct 14, 2007

Pst...

DeathBySpoon posted:

Ludum Dare inspired me to try working on smaller projects, so I think I'm gonna start trying to do the one game a month thing. I started a little Mega Man inspired shooter, here's a gif of the basic mechanics finished:



Swapped to GM for this, it's nice to only focus on gameplay and not have to think too much about the technical side of things.

Gonna go ahead and say if you like GM for it's ease of use, give Construct 2 a try as well. My wife's dad is buying me the personal license for Christmas so I'm starting to really delve into the way to make things work with it. I just figured out how to make a baldur's gate style click and move system with properly rotating and animating sprites. I haven't delved into proper Z sorting with it, but I know this part of it is at least possible. I also picked up Spriter when it was during the early adopter sale and it's got a plugin that automatically imports the animations you made into construct 2. So you get near unity level animation quality on a budget.

One thing I will mention however, is that I'm not sure if Spriter supports target nodes to move parts of an animation toward something, and that's something I know Unity does.

captain_g
Aug 24, 2007
We just went public with the libgdx music events tool that we created for the space game with the audio guy that I work with.



It's most useful for people who work with libgdx. The core concept is that your audio guy specifies audio tracks and transitions between the tracks. You load the exported file, and fire events such as 'calm' or 'combat' , when your game changes state.

The tool can be found at:
https://github.com/ollipekka/gdx-soundboard

It:
-requires intellij or eclipse to run.
- is MIT licensed.

We got nice small amount of attention on twitter and I'm pretty proud of it. It's such a small concrete thing that does something useful.

Yodzilla
Apr 29, 2005

Now who looks even dumber?

Beef Witch
So here's a general question about Unity, should you try to never use GetComponent at all during runtime or is it acceptable to use it when absolutely needed.


For example, if I'm trying to do something on a collision or trigger, I'll need to use GetComponent to get access to the script of the thing I want to take action on, right? Is there a cleaner way of doing this or is it considered okay?

overeager overeater
Oct 16, 2011

"The cosmonauts were transfixed with wonderment as the sun set - over the Earth - there lucklessly, untethered Comrade Todd on fire."



Yodzilla posted:

So here's a general question about Unity, should you try to never use GetComponent at all during runtime or is it acceptable to use it when absolutely needed.


For example, if I'm trying to do something on a collision or trigger, I'll need to use GetComponent to get access to the script of the thing I want to take action on, right? Is there a cleaner way of doing this or is it considered okay?

I haven't heard of anyone steering away from GetComponent completely - I think it's OK so long as you don't call it with a string, and you store references instead of calling it multiple times.

Yodzilla
Apr 29, 2005

Now who looks even dumber?

Beef Witch
Yeah I'm never calling it with a string but with all kinds of possible objects colliding there's really no way of storing direct references.

Unless you store a collection of all possible objects and search for that object in the collection? I'm not sure if that's any better really.

xgalaxy
Jan 27, 2004
i write code
I thought I read somewhere that in, I think Unity 5 or something, they are making changes so that they are caching the GetComponent calls for you behind the scenes. But maybe I'm mistaken.

Shalinor
Jun 10, 2002

Can I buy you a rootbeer?

xgalaxy posted:

I thought I read somewhere that in, I think Unity 5 or something, they are making changes so that they are caching the GetComponent calls for you behind the scenes. But maybe I'm mistaken.
They are, but as with everything Unity - probably best not to count on it actually working until 6 months have gone by and it's been proven in the wild.

... anyways, if you can't cache the reference, your second best option is to create a public member on a relevant component in your prefab and drag the component you want a reference to into it. Then access the component ref via that member. I do a mixture of that, and just calling GetComponent runtime. It's fine for most things, you just can't lean too heavily on it.

Nition
Feb 25, 2006

You really want to know?
GetComponent is really very fast in general (it does get slightly slower with more components on an object), so you'd probably be creating more work than its worth to eliminate it completely.

For something like collisions you could keep it down to one at least: Have all your collidable objects have like a CollidableObjInfo script of whatever, do a GetComponent on that, and have that script point to any other scripts you need on that object rather than doing multiple GetComponent calls. That's just my idea though, not some expert suggestion.

Nition fucked around with this message at 21:31 on Dec 14, 2014

dizzywhip
Dec 23, 2005

What is GetComponent doing that makes it so slow? Shouldn't it just be a simple dictionary lookup?

Yodzilla
Apr 29, 2005

Now who looks even dumber?

Beef Witch

Nition posted:

For something like collisions you could keep it down to one at least: Have all your collidable objects have like a CollidableObjInfo script of whatever, do a GetComponent on that, and have that script point to any other scripts you need on that object rather than doing multiple GetComponent calls. That's just my idea though, not some expert suggestion.

That's exactly what I'm doing. For different types of things that can collide with something I'm using tags to determine which script on the colliding object to call and then using GetComponent to access that script. Only ever one per colliding object though.

I'm never going to be the best programmer but I'm absolutely anal as hell about little things like that. It also doesn't help that all of our games so far have been fast action where those frames really matter. :v:

deck
Jul 13, 2006

Sure would be nice if GameObject just had a spare dangling object property, to use for whatever you want. It wouldn't be type safe, but sticking a reference to a class containing your cached component references would be fine if you're careful.

Someone with some clout have them add that please.

(Going back to the Visual Basic days, and even up through WinForms and WPF, all the UI objects had a Tag property for this purpose. Obviously the term 'tag' is overloaded in Unity, so it'd need to be called something else. Like UserData.)

deck fucked around with this message at 21:45 on Dec 14, 2014

FuzzySlippers
Feb 6, 2009

xgalaxy posted:

I thought I read somewhere that in, I think Unity 5 or something, they are making changes so that they are caching the GetComponent calls for you behind the scenes. But maybe I'm mistaken.

I haven't heard anything like that except some time in 4.x they started caching .transform so you no longer need to do it. What they did in 5.x is remove all the properties that were hiding GetComponent calls so you have to do it explicitly.

I've never seen GetComponent have a performance impact as long as you aren't doing something wonky like call it in an update loop. FWIW Unity goes monkey nuts with GetComponent in a lot of their examples scripts so they don't seem to worry about it.

One fun thing they added in 4.6 / 5 beta is that you can GetComponent an interface now. So for those damage scripts you can do a hit.transform.GetComponent<IDamagable> or whatever. Most of my gameplay logic lives in lua now so for a collision I do a GetComponent for a lua object interface and pass it back to the originating lua call.

Nition
Feb 25, 2006

You really want to know?

FuzzySlippers posted:

One fun thing they added in 4.6 / 5 beta is that you can GetComponent an interface now.

:eng101: You could actually already GetComponent on an interface, you just couldn't GetComponents on an interface (if you look closely at the changelog, it also only mentions the plural version). There was a bit of an ongoing discussion about it here, although you have to ignore the people who post saying it won't work without even testing it.

If you can GetComponent<IMyInterface>() now though, then they've improved GetComponent a bit as well. Previously you could GetComponent(typeof(IMyInterface)), but you couldn't GetComponents(typeof(IMyInterface)), or GetComponent<IMyInterface>(), or GetComponents<IMyInterface>().

Unity. :downs:

Nition fucked around with this message at 02:25 on Dec 15, 2014

FuzzySlippers
Feb 6, 2009

Yeah I forgot about the other ways to use GetComponent as I only ever use GetComponent<IBlah>() and you can use that one for interfaces now too.

Adbot
ADBOT LOVES YOU

Tummyache
Oct 30, 2013

"Disapproval"

Yodzilla posted:

So here's a general question about Unity, should you try to never use GetComponent at all during runtime or is it acceptable to use it when absolutely needed.


For example, if I'm trying to do something on a collision or trigger, I'll need to use GetComponent to get access to the script of the thing I want to take action on, right? Is there a cleaner way of doing this or is it considered okay?

I call it all the time and it doesn't seem to impact performance at all for me. That's anecdotal though since I don't have the profiler for it. But I've got tons of objects called getComponent right in the update and keep a constant framerate on my poo poo walmart pc.

I guess if you were being an optimization nazi you could cache the components by the gameObject reference the first time you get it like a few other people mentioned.

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