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
Nition
Feb 25, 2006

You really want to know?
That's right!

As you say, Time.deltaTime is the time in seconds since the last frame (so it's usually like 0.0167). Since you're moving by "speed" amount every frame, dividing by the time since the last frame will make your speed the "actual" speed.

Like if your speed is 10m/s, and you do 30 frames a second, (10m/s * (1 / 30)) * 30 = 10. Without the deltaTime you'd be doing 10 * whatever your framerate is.

You can also use FixedUpdate() instead of Update() for smoother physics movement. It goes on the physics tick rate (which you can set in the project settings) instead of the current frame rate, so it's more stable. And there's Time.fixedDeltaTime for that.

Nition fucked around with this message at 03:50 on Aug 1, 2014

Adbot
ADBOT LOVES YOU

demota
Aug 12, 2003

I could read between the lines. They wanted to see the alien.
Is there any reason why you'd want to use Update instead of FixedUpdate? Same question for fixedDeltaTime.

Forer
Jan 18, 2010

"How do I get rid of these nasty roaches?!"

Easy, just burn your house down.

demota posted:

Is there any reason why you'd want to use Update instead of FixedUpdate? Same question for fixedDeltaTime.

if I remember right

Update is grouped with deltaTime, FixedUpdate is grouped with fixedDeltaTime so you don't want to cross them over

FixedUpdate is used when you absolutely want something to run every certain time no questions asked. Update is grouped with the framerate and if your game starts to slow down then the rest starts to slow down.

FixedUpdate sometimes run slower than Update, and sometimes Faster. If you have a physics system and want to make sure that even if the game slows down the physics also doesn't slow down then you slap that in FixedUpdate, if you're afraid the physics will get into a spiral of death you slap that in update.

That's as I understand it, but you always use fixedDeltaTIme in FixedUpdate, and deltaTme in Update

Nition
Feb 25, 2006

You really want to know?
You'd always use deltaTime inside Update() and fixedDeltaTime inside FixedUpdate(), because they match the time between the calls to those methods.

FixedUpdate (runs every physics tick) is mostly intended for physics-based stuff that can't be framerate dependent.

Update (runs every frame) is useful for everything else because it scales with the user's machine. If their PC sucks and can only manage 5fps, you'll be slowing down everything in Update as well, which is good from a performance perspective. If you're running all your stuff in FixedUpdate, it'll keep trying to go full speed even though they're not seeing most of the update ticks anyway, and bog down their PC more than necessary.

Nition fucked around with this message at 04:01 on Aug 1, 2014

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.

demota posted:

Is there any reason why you'd want to use Update instead of FixedUpdate? Same question for fixedDeltaTime.


Variable time in your physics is very dangerous and can cause unpredictable behavior (eg. crazy time amounts, skipping past events, etc).

SupSuper fucked around with this message at 03:59 on Aug 1, 2014

Nition
Feb 25, 2006

You really want to know?
Oh yeah, sort of the flip side of what I said above: You also really want FixedUpdate to be able to keep up, so not bogging it down unnecessarily is good in that way too.

DeathBySpoon
Dec 17, 2007

I got myself a paper clip!
Working on the Carny, the fiery circus performer. Now you can volunteer your allies for circus work.

xgalaxy
Jan 27, 2004
i write code

Nition posted:

You'd always use deltaTime inside Update() and fixedDeltaTime inside FixedUpdate(), because they match the time between the calls to those methods.

This isn't necessary as deltaTime equals fixedDeltaTime for the duration of the FixedUpdate call. The only reason to do so is for the sake of clarity if you are reading the code months later and forget this fact.

Nition
Feb 25, 2006

You really want to know?

xgalaxy posted:

This isn't necessary as deltaTime equals fixedDeltaTime for the duration of the FixedUpdate call. The only reason to do so is for the sake of clarity if you are reading the code months later and forget this fact.

Bah, I forgot about that. Right, so there's no actual reason to use fixedDeltaTime because deltaTime is fixedDeltaTime when used inside FixedUpdate(), which is the only place you'd usually use it.

Sometimes I think Unity tries a little bit too hard to be helpful.

Coldrice
Jan 20, 2006


Shalinor posted:

This is fantastic. Any chance the Male Captain has a higher than average chance to try and romance you? He even has the Kirk lean / smug look going on. It's perfect. :love:

I think I'm actually going to change some of the planned dialogue to make him a bit more smarmy :) Actually this seems to have been pretty popular and has really helped to give me a good self esteem boost!

Nition
Feb 25, 2006

You really want to know?
Yeah, I also think the captain looks great.

xgalaxy
Jan 27, 2004
i write code
Huh. Apparently Crypt of the NecroDancer was made using this:
http://www.monkey-x.com/

I always find it interesting what other people use to make games and I dont remember hearing about this thing before. Seems kind of neat, although I'm not really a fan of the language grammar.

Shalinor
Jun 10, 2002

Can I buy you a rootbeer?

xgalaxy posted:

Huh. Apparently Crypt of the NecroDancer was made using this:
http://www.monkey-x.com/

I always find it interesting what other people use to make games and I dont remember hearing about this thing before. Seems kind of neat, although I'm not really a fan of the language grammar.
This was released back in 2011 as "Monkey", apparently... and I'm almost positive it started life as Script Monkey or Monkey Script / there was a game scripting language back in the Game Script Wars of the 00's with a remarkably similar name and logo.

The wikipedia article is surprisingly content-rich. Looks like they may be working on Monkey3D, etc.

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.

Shalinor posted:

This was released back in 2011 as "Monkey", apparently... and I'm almost positive it started life as Script Monkey or Monkey Script / there was a game scripting language back in the Game Script Wars of the 00's with a remarkably similar name and logo.

The wikipedia article is surprisingly content-rich. Looks like they may be working on Monkey3D, etc.
Never heard of it before, but the VB-like syntax gives me the heeby-jeebies :ohdear:

Yodzilla
Apr 29, 2005

Now who looks even dumber?

Beef Witch

SupSuper posted:

Never heard of it before, but the VB-like syntax gives me the heeby-jeebies :ohdear:

It reminds me of Visual Basic...sort of.

Nition
Feb 25, 2006

You really want to know?

Shalinor posted:

...the Game Script Wars of the 00's...

SupSuper posted:

Never heard of it before, but the VB-like syntax gives me the heeby-jeebies :ohdear:

The Game Script Wars of the 00's™ are all about VB-like syntax. I remember getting DarkBasic on a PC Gamer demo CD.

al-azad
May 28, 2009



Nition posted:

The Game Script Wars of the 00's™ are all about VB-like syntax. I remember getting DarkBasic on a PC Gamer demo CD.

Man, I had a summer camp at a college where we learned DarkBasic and VisualBasic. Don't remember a single thing about it except playing Baldur's Gate 2 and Starcraft all loving day, it was pretty awesome.

Zvezda
Dec 12, 2009

Coldrice posted:

I've been delaying and putting off doing any human graphics for a while, mostly due to my own insecurity when it came to drawing people.



So far its my favorite portrait yet

I would definitely be seduced by this captain. I wouldn't want to be, but I would. Such a space charmer.

Polio Vax Scene
Apr 5, 2009



This isn't much of a game but I like playing with it.

Here
Left click to change tile shapes and shift click to rotate.

Shalinor
Jun 10, 2002

Can I buy you a rootbeer?
There's a stream of all the SA GameDev games going right now, if you want to see what was made this year. Some really, really impressive entries.

ZealousQuakeFan
Feb 13, 2011

Got a handle on Unity's 2D physics, now seeing what it'll let me get away with :)

xzzy
Mar 5, 2009

A game that lets you shoot enemies all over the map and then shoot them with bullets, why has this not been done before.

Omi no Kami
Feb 19, 2014


This might be a bit esoteric, but does anyone happen to know what kind of overhead unity trigger colliders have? One of the fundamental parts of my game is a shifting system of permissions, where different player and AI constructs are allowed in different places at different times. It seems like the most obvious way to keep track of which room you're in and whether you're supposed to be there would be to give each room a room-sized (box) trigger collider and have OnColliderEnter/Exit register and deregister each AI and player in that room's occupants list, but I'm planning on having dozens of rooms, so I'm worried that this might be a great small-scale idea that will kneecap my performance when I scale it up.

Stick100
Mar 18, 2003

Omi no Kami posted:

This might be a bit esoteric, but does anyone happen to know what kind of overhead unity trigger colliders have? One of the fundamental parts of my game is a shifting system of permissions, where different player and AI constructs are allowed in different places at different times. It seems like the most obvious way to keep track of which room you're in and whether you're supposed to be there would be to give each room a room-sized (box) trigger collider and have OnColliderEnter/Exit register and deregister each AI and player in that room's occupants list, but I'm planning on having dozens of rooms, so I'm worried that this might be a great small-scale idea that will kneecap my performance when I scale it up.

I think that should be fine. This is CPU bound so it makes a bit of a difference what platform your developing for. Even if it was a problem you could fix that by just using collider's on adjacent volumes. In that case you could scale infinitely. There is an asset store product sectr that is right up this alley.

SuicideSnowman
Jul 26, 2003

Omi no Kami posted:

This might be a bit esoteric, but does anyone happen to know what kind of overhead unity trigger colliders have? One of the fundamental parts of my game is a shifting system of permissions, where different player and AI constructs are allowed in different places at different times. It seems like the most obvious way to keep track of which room you're in and whether you're supposed to be there would be to give each room a room-sized (box) trigger collider and have OnColliderEnter/Exit register and deregister each AI and player in that room's occupants list, but I'm planning on having dozens of rooms, so I'm worried that this might be a great small-scale idea that will kneecap my performance when I scale it up.

I seriously doubt you'd run into much issue doing it this way, but why not just have each "room" have a unique ID and then in all of your AI or players store the ID of which room they are in?

Omi no Kami
Feb 19, 2014


SuicideSnowman posted:

I seriously doubt you'd run into much issue doing it this way, but why not just have each "room" have a unique ID and then in all of your AI or players store the ID of which room they are in?

That might end up being the smarter way of doing things, right now the only reason I'm thinking this way is because of how other sections are designed: it's set in an office, and currently a whole lot of data handling is done by the room. AI actually do work by moving to the room whose employee roster they're on, ping the room's script for work, and have their responsibilities doled out by a function in the room script that keeps track of all of the work that department needs to accomplish, compares it against employee competencies, and divvies up responsibilities. Since I'm already doing so much with a centralized script, it made sense to make that script the literal room, and since it already knows who's supposed to be there, it seemed intuitive to also give the room the responsibility of telling people that they don't belong.

It seems clean in my head, in terms of grouping a bunch of very similar functions in one place, but I'm honestly not sure if this is the most logical way to go about things.

SuicideSnowman
Jul 26, 2003

Omi no Kami posted:

That might end up being the smarter way of doing things, right now the only reason I'm thinking this way is because of how other sections are designed: it's set in an office, and currently a whole lot of data handling is done by the room. AI actually do work by moving to the room whose employee roster they're on, ping the room's script for work, and have their responsibilities doled out by a function in the room script that keeps track of all of the work that department needs to accomplish, compares it against employee competencies, and divvies up responsibilities. Since I'm already doing so much with a centralized script, it made sense to make that script the literal room, and since it already knows who's supposed to be there, it seemed intuitive to also give the room the responsibility of telling people that they don't belong.

It seems clean in my head, in terms of grouping a bunch of very similar functions in one place, but I'm honestly not sure if this is the most logical way to go about things.

It's hard to say without knowing the exact details of your game but you could also have each room store it's world location and bounds and use that for checking whether or not an object should be there. If you're having objects move to and from rooms you're going to have to know their position in the world anyway. If you're dealing with mostly rectangular rooms this would be pretty efficient. Whether or not it's a 2D or 3D game wouldn't matter since all you'd really need to do is use a 2d rectangle (the floor).

Like I said though, you're going to have to do an awful lot to overload the physics engine on a modern CPU.

NorthByNorthwest
Oct 9, 2012

Manslaughter posted:

This isn't much of a game but I like playing with it.

Here
Left click to change tile shapes and shift click to rotate.

Curtis Steiner's 1000 blocks?
Oh man, I love this. I had a great time playing with the physical thing at the Seattle Art Museum, and had a C# implementation of this.
I tried to do this in Unity at one point. It's an awesome project. Props for finishing what I gave up on!


I found that adding a slight tint to the blocks can make it look pretty cool.
Here's a gif from the old unity build. I might pick this back up again...

NorthByNorthwest fucked around with this message at 02:39 on Aug 2, 2014

Omi no Kami
Feb 19, 2014


SuicideSnowman posted:

It's hard to say without knowing the exact details of your game but you could also have each room store it's world location and bounds and use that for checking whether or not an object should be there. If you're having objects move to and from rooms you're going to have to know their position in the world anyway. If you're dealing with mostly rectangular rooms this would be pretty efficient. Whether or not it's a 2D or 3D game wouldn't matter since all you'd really need to do is use a 2d rectangle (the floor).

Like I said though, you're going to have to do an awful lot to overload the physics engine on a modern CPU.

Hmm okay, I'll look into this and run performance tests to compare colliders versus checking bounds, thank you very much for the suggestion!

Rupert Buttermilk
Apr 15, 2007

🚣RowboatMan: ❄️Freezing time🕰️ is an old P.I. 🥧trick...

I'm thinking of trying out GameMaker for a really basic idea I have, and I've never made a game before. Is the free version an ok taste of it? To put it another way, is the free version more "Shareware Doom" or "Daikatana demo level"?

Yodzilla
Apr 29, 2005

Now who looks even dumber?

Beef Witch
You can make a full game with the free version of GameMaker, it's more than enough to get a taste and start a prototype.

Rupert Buttermilk
Apr 15, 2007

🚣RowboatMan: ❄️Freezing time🕰️ is an old P.I. 🥧trick...

Yodzilla posted:

You can make a full game with the free version of GameMaker, it's more than enough to get a taste and start a prototype.

Glad to hear it, thanks!

Unormal
Nov 16, 2004

Mod sass? This evening?! But the cakes aren't ready! THE CAKES!
Fun Shoe
It's Spencer the helpful Slime!

DeathBySpoon
Dec 17, 2007

I got myself a paper clip!


Making an F-Zero like for GB Jam. I call it... Zero G. Super original, yeah.

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

xzzy posted:

A game that lets you shoot enemies all over the map and then shoot them with bullets, why has this not been done before.

One of the first Indie Game Jams at GDC was built around the question of "how many doom-like sprites can a (then-)modern machine blast out?" IIRC, there was one that basically had you hose down the terrain with NPCs while the other player tried to shoot them all.

Nition
Feb 25, 2006

You really want to know?

DeathBySpoon posted:



Making an F-Zero like for GB Jam. I call it... Zero G. Super original, yeah.

This also reminds me of OutRun 2019 on Mega Drive (Genesis).

feedmyleg
Dec 25, 2004

DeathBySpoon posted:



Making an F-Zero like for GB Jam. I call it... Zero G. Super original, yeah.

Um, yes please. Is it just a clone, or are you adding some more modern gameplay additions?

Ol Uncle Anime
Jul 3, 2009

And no one ate dinner that night.
Hello Making Games Megathread!

Have any of you made an FMV game before? I'm butt-deep in starting on one and I don't have a ton of people to ask about common pitfalls to avoid or stuff to look out for or general creative process. I know it's super niche but a shot in the dark is worth it, right?

I'm going for essentially a playable b-movie love letter to camp. Like sewer shark meets sharknado meets gameshark. So far I've got Greg Sestero (Mark from the movie The Room) and one of the leads from Birdemic and I'm not really allowed to announce more but I'm really really psyched about everyone else involved and want to make sure development goes as smoothly as possible.

Yodzilla
Apr 29, 2005

Now who looks even dumber?

Beef Witch
Are we allowed to ask what the actual gameplay portions are like? Is it a kinda lightgun game like Sewer Shark or Texas Ground Zero or is it menu driven movie watching ala Night Trap? Or is the gameplay normal with FMV interstitials like Off World Interceptor Extreme?

I guess the biggest technical thing is whether or not you want to emulate a laserdisk game where every action is stored as a separate scene vs most Sega CD games that had FMV cutout over top of separate FMV or CG backgrounds.

e: I think the new Tex Murphy game did a bang up job making a "modern" FMV game if you haven't seen it yet

Adbot
ADBOT LOVES YOU

retro sexual
Mar 14, 2005
Now there's a DREAD METER at the top right. If you don't keep it down (by placing monsters) BAD THINGS happen like monsters moving around!

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