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
Corbeau
Sep 13, 2010

Jack of All Trades
Huh.

So when debugging your framerate-tracking auto-adjusting performance system, make sure you don't have the editor running at a quality setting that includes v-sync. I just could not understand why I was getting so few Updates per FixedUpdate...

Adbot
ADBOT LOVES YOU

KillHour
Oct 28, 2007



Oh no poor owl :(

al-azad
May 28, 2009



TooMuchAbstraction posted:

Hmm, interesting metric. I guess a lot of roguelites don't qualify under that definition, since I assume you're talking about a resource that must decrease (or at any rate can't increase) so long as you aren't making progress. Which rules out resources like Binding of Isaac's health/bombs/keys, or 20XX's health/weapon energy. Something more like Teleglitch's ammunition would qualify though, as you have to use ammunition to defeat enemies (knifing everything isn't practical).

Tunicate posted:

Cardinal Quest?

Like there's a shitton of roguelites that don't have a ticking timer mechanic

A "clock" in this case doesn't take the form of a literal timer, it's an abstract concept to keep the player moving. Bombs and keys in Isaac absolutely count, you can continue without them but hidden rooms have higher chances for better rewards. In Metroid you never have to manage your missiles because a lack of missiles would bar your progress. If Metroid were a roguelike it would be closer to Isaac where missiles act as both a weapon and a key and the player has to weigh in every scenario whether it's worth losing a key to make a challenge harder.

Chev posted:

Since in metroidvanias a lot revolves around the "castle"'s layout, then procedural play could be built around the understanding of that castle. Maybe accessing the final boss, the true ending or the local inverted castle equivalent requires you to observe how the world is put together and what key fits where. I remember an old article on gamasutra, about mysteries in games I think, where they had the fairly simple but extendable example of a game where if you observed the layout of the world you could guess where secret rooms should be because of gaps and your knowledge of the world's general shape (a pyramid in that case). Ther'es a lot that can be explored as to how to hint that a space exist but you found the route to it yet, or that you should wear specific glasses against a given enemy, or hints to weirder rituals that'd seem more like something out of druaga.

I think this is where my conception of metroidvanias clashes with everyone else. The mechanics tend to be weak so they make up for it with bespoke content in a process of constantly refining your play to become more and more efficient. Metroid challenges you to speed run it, Igavanias flood you with items and abilities to experiment with, and in both series the games train you how to advance. Rain World is very much what your describing, it's a game about mapping an abstract labyrinth using your knowledge of its rules to discover secrets but I also don't find it very Metroid-like because you start with everything you need to traverse its world.

Your Computer
Oct 3, 2008




Grimey Drawer

kaffo posted:

I don't have a lot to add to the slope discussion I'm afraid, except don't use the default character controller because it's not great. Always better to spin your own, even if you get half of it from some genius on the Internet.

care to elaborate on this? What makes the character controller bad and where do I find these genius implementations on the internet? :v:

Nebalebadingdong
Jun 30, 2005

i made a video game.
why not give it a try!?

KillHour posted:

Oh no poor owl :(

it survived unharmed

Lucid Dream
Feb 4, 2003

That boy ain't right.
I've been working on mod support, and one of the things that has me a bit stuck is the best way to distribute the mods. Right now I have a Mods folder with a subfolder for each mod, but I want to be able to package the individual mods into a single file. I tried zipping it and just reading the data directly out of the zip stream at runtime, but ran into issues with Lua paths that was going to require me to set up some kind of virtual file system stuff that was honestly over my head. It seems like my best bet at this point is to unzip the mod files into a specific directory at runtime, but I'm not sure what the best practice for that sort of thing is. Should I just unzip it to the temp directory and delete it when they close the game or something? Does anyone know if there are any caveats or issues I need to watch out for in terms of file permissions or anything?

Tunicate
May 15, 2012

al-azad posted:

A "clock" in this case doesn't take the form of a literal timer, it's an abstract concept to keep the player moving

I think at that point you're so vague that literally every game counts as having one including like, mario or chess

Bongo Bill
Jan 17, 2012

Tunicate posted:

I think at that point you're so vague that literally every game counts as having one including like, mario or chess

Both of those games have literal timers, however.

Tunicate
May 15, 2012

Bongo Bill posted:

Both of those games have literal timers, however.

Even without a timer it'd still be the case.

al-azad
May 28, 2009



There’s never a situation in Mario where you don’t have the tools to succeed. Beyond the arcadey games with literal clocks you have infinite time to tackle the puzzles.

I’ll just say straight up if a procgen game doesn’t use permanence to drive it’s systems then I don’t know why it’s bothering with procedural content. Strafe is the first thing that comes to mind, a game with really solid gameplay but every level is structured the same with pre-built pieces flipped around to obfuscate how little actual content there is. The game doesn’t drive the player to experiment, you just hope you get lucky with random drops.

Invisible inc is still the best In class. The level generation is smart enough to create scenarios you can 100% stealth but every turn escalates the challenge. The longer you remain the more aggressive enemies become. You know when the game will escalate, the tension then becomes how much you can accomplish before it becomes unbearable.

Lucid Dream
Feb 4, 2003

That boy ain't right.
Procedural content can be a good way to fill in space and allow for incremental development in certain kinds of games. I knew I wanted my game to take place on a "planet", and building it by hand would A) take a very long time, and B) would make adding new terrain features (new ore types, biomes, etc) a lot more time consuming. There was (and still is) significant overhead related to writing all the procedural stuff, but I was able to add platinum ore to my game in a few minutes and if I need to increase or decrease the amount in the world generator I can adjust it with simple variables.

Omi no Kami
Feb 19, 2014


I've been messing around with blender nodes, since I don't want to shell out for Substance and deal with Adobe:



The wood grain and planks look okay to me, but the varnish didn't turn out great- I tried simulating wear & tear on the clearcoat by layering a subtle musgrave texture on top of the rest of the normal, but it ended up looking weird.

Bert of the Forest
Apr 27, 2013

Shucks folks, I'm speechless. Hawf Hawf Hawf!

Your Computer posted:

as always the aesthetics are just perfect :allears:

Thank you! :3: Incidentally super happy to see new Bonejo work!

This week is shaping up to be all about UX/UI work. First thing's first, handling the UX of kid interaction. You can go up to any kid and do one of four things:

-Pick them up (to move them away from danger usually)

-Talk to them (check on their mood status)

-Open their inventory (to confiscate any bad things they might have picked up and maybe give them tools/etc?)

-Check their skills/stats.

Trying to get all that in a UX that is as frictionless as possible is uh, interesting. Made some mockups going over the different interactions.

TALKING:



INVENTORY:



SKILLS:

Stick100
Mar 18, 2003

Lucid Dream posted:

Procedural content can be a good way to fill in space and allow for incremental development in certain kinds of games. ...

Off topic, but speaking of procedureal content, Nuclear Throne is at max discount due to Covid-19. https://store.steampowered.com/app/242680/Nuclear_Throne/ It's $1.19, I think it's worth checking out for it's procedural generation. Additionally much of the game's development was live-streamed or blogged about so you can see how they made decisions.

Normally the game is $12 and doesn't do sales.

megane
Jun 20, 2008



Nuclear Throne is amazing; if you haven't played it you absolutely should.

I do really wish it ran at 60FPS, though.

Chev
Jul 19, 2010
Switchblade Switcharoo

al-azad posted:

I think this is where my conception of metroidvanias clashes with everyone else.
Prolly one key factor is where either side of the discussion stands regarding Metroid games' relation to the metroidvania genre. That is to say, historically they weren't included until several years after the genre had been established. The term was created by US journalists after the release of Aria to designate "those castlevania games that take after SotN" specifically (what some call igavanias today, although the term is problematic because it was really just made for Bloodstained marketing and also because not all of Igarashi's Castlevanias are metroidvanias), and it's only around the time Shadow Complex came out that the term expanded beyond the castlevania series and more years had to pass until the debate shifted from "we should find a better name since Metroid games are characteristically different from the metroidvania genre" to "the genre has widened enough that maybe now we could count Metroid as part of it" an so even today the metroid games and their more speedrun-oriented offsprings are still considered more of a subgenre by many while the genre in general is more exploratory with a slower pace, more like the igavanias.

And so, on the design side, it follows generating a procedural metroid-like map is a significantly different endeavor from generating a metroidvania map, as they have the abilities-as-keys ideas in common but not necessarily everything else.

kaffo posted:

I don't have a lot to add to the slope discussion I'm afraid, except don't use the default character controller because it's not great. Always better to spin your own, even if you get half of it from some genius on the Internet.

I have a dumb question of my own. Anyone know anything about tank physics? Specifically the tracks?
I was trying to model it in Unity and it's real pain to get the feel right for a tracked vehicle even by fudging it with directly applying the forces to the rigid body.
Using wheels then animating tracks over the top seems to be the "cool thing" to do on the asset store, but wheels in Unity make me want to jump out a window a little.

I'd appreciate any suggestions I could try out before I give in and waste hours of my life writing my own tank controller which doesn't actually work

It's a deep and fascinating subject! You know the basics, wheel directions are fixed and steering is accomplished by changing the relative velocities of each track, and the main constraint is that all wheels on one track can only rotate in unison. Friction should be a factor of how much of the track surface is touching something although you can get away with only considering the wheel contacts. Still, the track constraint can't be enforced without diving into code. What's less apparent but important for the tank feel is how the gears and transmission work on a tank, it's probalby worth looking into it: https://en.wikipedia.org/wiki/Tank_steering_systems

Anyway, the most complete discussion you can probably find on the subject is https://forums.unrealengine.com/community/work-in-progress/54936-assets-open-source-tanks-tracks-and-n-wheeled-vehicles with its resulting UE4 project. There also seems to be something along the same lines for unity there: https://www.youtube.com/watch?v=-_okNlCg7Kg

Chev fucked around with this message at 20:57 on Mar 17, 2020

Claeaus
Mar 29, 2010

Your Computer posted:

I'm officially back to working on my project :toot: until Animal Crossing comes out in a week then lord have mercy on my soul

I don't have much to show off, but today I implemented camera re-centering
https://i.imgur.com/cEpMRvP.mp4


You're really nailing the Banjo-Kazooie aesthetic and watching your screenshots/videos makes me happy.

Your Computer
Oct 3, 2008




Grimey Drawer
I'm still working on those darn slopes because it turns out my entire movement code was pretty naive (and all working on the same velocity vector) so I pretty much had to rewrite, well.... everything. This turned into a lot more work than I thought, huh! :sweatdrop: I'm making progress though, I've got the different forces separated, got my inputs aligned with the surface I'm on, etc. Still some things to work out like how the controller loses contact with the ground when going onto a slope, as seen in the clip

https://i.imgur.com/ZUcCYlP.mp4

also still gotta rewrite all the other movement code like rolling, jumping, etc. to work with the new code.

Your Computer posted:

care to elaborate on this? What makes the character controller bad and where do I find these genius implementations on the internet? :v:
just an update on this - I wasn't trying to be snarky or anything I legitimately want to know! I've tried rolling my own collision handling code before but it ended up being a bit of a mess since I didn't fully understand everything, making it hard to debug or expand upon


Claeaus posted:

You're really nailing the Banjo-Kazooie aesthetic and watching your screenshots/videos makes me happy.
Thank you! :3: Hopefully I'll be able to wrap up this new movement system and get back to actually making more new stuff. It's a bit of a bummer since I felt like I had all the base systems in place and was ready to start implementing fun stuff but then.... slopes.

Lork
Oct 15, 2007
Sticks to clorf

Your Computer posted:

I'm still working on those darn slopes because it turns out my entire movement code was pretty naive (and all working on the same velocity vector) so I pretty much had to rewrite, well.... everything. This turned into a lot more work than I thought, huh! :sweatdrop: I'm making progress though, I've got the different forces separated, got my inputs aligned with the surface I'm on, etc. Still some things to work out like how the controller loses contact with the ground when going onto a slope, as seen in the clip
Try adding a short grace period during which the character can lose contact with the ground but still be considered "grounded". Not only will this smooth over the issue you're having in that gif, but you're going to want something like this anyway to assist the player when jumping off of ledges at the last second, ie. "Coyote Time". All good platformers have it.

Your Computer
Oct 3, 2008




Grimey Drawer

Lork posted:

Try adding a short grace period during which the character can lose contact with the ground but still be considered "grounded". Not only will this smooth over the issue you're having in that gif, but you're going to want something like this anyway to assist the player when jumping off of ledges at the last second, ie. "Coyote Time". All good platformers have it.

that's a very good idea! I've now redone the ground check code (which previously only relied on checking the character controller's built-in isGrounded check) and added coyote time (which I cranked way the heck up to see if it worked)

https://i.imgur.com/GYX0glt.mp4

almost everything is work- hmmm

so it turns out the ground normal I get from the OnControllerColliderHit is interpolated somehow and "rounds off" near edges, causing all sorts of weird issues, such as rocketing into space and being magnetically pulled towards polygon edges due to the "ground force" falsely believing the ground normal is sticking out of the side.

e: to illustrate the interpolation it's doing

Your Computer fucked around with this message at 02:26 on Mar 18, 2020

Lork
Oct 15, 2007
Sticks to clorf
I could be misunderstanding what's going on, but it seems to me that it's not so much interpolation as it is the natural consequence of getting that normal from a non specific point. The side of the character is touching the side of the edge, so that's where the normal would point. In order to reliably get what you want, you probably need to get the normal from a fixed point and direction; in other words, a raycast straight down.

dreamless
Dec 18, 2013



Your Computer posted:

so it turns out the ground normal I get from the OnControllerColliderHit is interpolated somehow and "rounds off" near edges, causing all sorts of weird issues, such as rocketing into space and being magnetically pulled towards polygon edges due to the "ground force" falsely believing the ground normal is sticking out of the side.

Yeah, my guess is that's because it's using the capsule to do the check? Try turning on the collision display and see if it lines up. You still haven't hit a problem more raycasts won't fix.

Your Computer
Oct 3, 2008




Grimey Drawer

dreamless posted:

Yeah, my guess is that's because it's using the capsule to do the check? Try turning on the collision display and see if it lines up. You still haven't hit a problem more raycasts won't fix.
I would assume it is, yes. Like I said this is using data from the Character Controller's OnControllerColliderHit method, which uses its capsule collider. Guess I'll have to figure out how to add my own layer of raycasts!


e: Good news is that I think I've got it - movement up and down slopes is working well, coyote time is working well, etc. Bad news is that I still have to rewrite like half of the player code including everything that has to do with jumping since it also just applied directly to the velocity vector and this tiny issue turned into a pretty big one!

Your Computer fucked around with this message at 09:50 on Mar 18, 2020

kaffo
Jun 20, 2017

If it's broken, it's probably my fault

Chev posted:

It's a deep and fascinating subject! You know the basics, wheel directions are fixed and steering is accomplished by changing the relative velocities of each track, and the main constraint is that all wheels on one track can only rotate in unison. Friction should be a factor of how much of the track surface is touching something although you can get away with only considering the wheel contacts. Still, the track constraint can't be enforced without diving into code. What's less apparent but important for the tank feel is how the gears and transmission work on a tank, it's probalby worth looking into it: https://en.wikipedia.org/wiki/Tank_steering_systems

Anyway, the most complete discussion you can probably find on the subject is https://forums.unrealengine.com/community/work-in-progress/54936-assets-open-source-tanks-tracks-and-n-wheeled-vehicles with its resulting UE4 project. There also seems to be something along the same lines for unity there: https://www.youtube.com/watch?v=-_okNlCg7Kg

I thought I was pretty clued up on my tank transmission and gearing, but that wiki page has proved me wrong! I was modelling my setup off basically WW1 techniques of providing one transmission to both drives then just braking either side, which turns out causes exactly the issues mentioned on the wiki page... So now I want to try modelling some actual dual transmission and see if I can get it to drive nice before I give up and buy that nice look Unity asset you linked in the video :v:
Thanks very much for the info!

Your Computer posted:

I would assume it is, yes. Like I said this is using data from the Character Controller's OnControllerColliderHit method, which uses its capsule collider. Guess I'll have to figure out how to add my own layer of raycasts!


e: Good news is that I think I've got it - movement up and down slopes is working well, coyote time is working well, etc. Bad news is that I still have to rewrite like half of the player code including everything that has to do with jumping since it also just applied directly to the velocity vector and this tiny issue turned into a pretty big one!
Glad your controller is going well! Sorry I didn't answer earlier, everything has been nuts this week with COVID-19 shutting down everything and I haven't had time to lurk.
For the controller yeah I think the default Unity one is pretty nieve in the way it does ground checking, it's also got a really bad implementation of "stickyness" on moving stuff, so you basically need to re-write that. Then I always felt like it was very "slidy". I think the way they work out the final direction vector is nieve too IIRC, but I can't remember why.
As for the internet geniuses, I've found inspiration from controllers on https://unitylist.com/ since they are all free and mostly open source. And then there's that $60 Kinematic Character Controller on the asset store which is totally brillaint, but I've always been too poor to afford.
It's kinda annoying because movement is such a particular thing. I think it needs to be unique to your game to get what your going for. Is it going to be fast and twitchy with 1:1 inputs? Is it going to be smooth with a follow cam? Like, it's kinda a solved problem, but it's not one you can just componentise IMO.
Apologies, there's opinions in that post, but it looks like you've mostly sorted it out anyway

Hammer Bro.
Jul 7, 2007

THUNDERDOME LOSER

Your Computer posted:

Bad news is that I still have to rewrite like half of the player code including everything that has to do with jumping since it also just applied directly to the velocity vector and this tiny issue turned into a pretty big one!

I feel that.

Recently we decided that our little 2D basketball dudes should have their front arm on a separate layer, so it was in front of the things they were holding. So just separate out the arm sprite, right?

Oh now the thing they're holding needs to be a child of something between the base sprite and the front arm sprite. Completely threw off all the faux-3D interpolation logic, ended up necessitating a separate state machine just for animations (which I probably would've eventually wanted anyway).

I don't even want to think how the networking code's going to react. I might have choose to rewrite how objects are addressed just so the newly extended path to held objects still fits in one packet.

And now my y-sorts between players are bugged! Agh!

Omi no Kami
Feb 19, 2014


I've been finding that subdivision surface + proportional edit is a surprisingly great workflow for blocking out environmental props, but I know for games you generally want a low-poly mesh with a normal map baked from the high-poly base. But, like, take this couch as an example:



The cushions could be rectangles with a normal map faking the indentations, and the top and bottom of the frame would probably work, but the curved armrests and beveled front corners are 90% of what make this look decent, and as far as I can tell normal maps can't fake that. So would the idea to be to build an in-between couch with enough bevels to break up the sharp lines, then use the normal from the subdivision surface version to add a bit of nuance on top of everything else?

al-azad
May 28, 2009



That couch needs way more geometry before you subdiv. That workflow works well for hard surfaces but that couch looks distinctly fake.

ynohtna
Feb 16, 2007

backwoods compatible
Illegal Hen

Makes me wanna grow another pair of butt cheeks! :yosbutt: :yosbutt:

Gearman
Dec 6, 2011

Omi no Kami posted:

I've been finding that subdivision surface + proportional edit is a surprisingly great workflow for blocking out environmental props, but I know for games you generally want a low-poly mesh with a normal map baked from the high-poly base. But, like, take this couch as an example:



The cushions could be rectangles with a normal map faking the indentations, and the top and bottom of the frame would probably work, but the curved armrests and beveled front corners are 90% of what make this look decent, and as far as I can tell normal maps can't fake that. So would the idea to be to build an in-between couch with enough bevels to break up the sharp lines, then use the normal from the subdivision surface version to add a bit of nuance on top of everything else?


Your low poly mesh would have some bevels and curves in it, which are typically necessary to get good normal map bakes. An in-between would be entirely unnecessary.

Omi no Kami
Feb 19, 2014


ynohtna posted:

Makes me wanna grow another pair of butt cheeks! :yosbutt: :yosbutt:

That'd be an awesome game- you're a 4-cheeked man just trying to take a load off in a 2-cheek world. Like a butt version of the total recall character.

Geometry-wise I banged out another version. It's probably just a lack of basic observational and construction skills, but in a lot of ways I find it way, way harder to make straight-edged geometry look convincing than organic crud:

KillHour
Oct 28, 2007


That second couch looks way better and more like a real couch that would exist. That first one looks like someone just discovered the subdivide button for the first time.

Omi no Kami
Feb 19, 2014


KillHour posted:

That second couch looks way better and more like a real couch that would exist. That first one looks like someone just discovered the subdivide button for the first time.

I swear, like 80% of my 3d atrocities are "Discovered <X> feature for the first time," and the rest are "Discovered that <Y> feature, previously thought useless, actually does rad crap."

baby puzzle
Jun 3, 2011

I'll Sequence your Storm.
I'm doing a big fat sale this week - 70% off

https://twitter.com/SEQUENCE_STORM/status/1241138150459629568

Omi no Kami
Feb 19, 2014




Besides obvious stuff to improve like the edges on the drawers or chair, every single prop still kinda looks like a 3d model to me- is there any one specific thing causing that? Or is it just a general combination of low poly assets + relatively minimalist textures?

al-azad
May 28, 2009



I don’t know what you’re expecting, like what’s the level of fidelity where things stop looking like “3D models”

Your Computer
Oct 3, 2008




Grimey Drawer
despite Animal Crossing coming out I haven't stopped working on my project! In fact, I've been working a whole ton on it and....
....
I got absolutely nothing to show for it :negative: The thing is, I uh, kinda sorta ended up rewriting not just half of the player code but all of it. Everything was pretty naive in my old code, from velocity handling to state changes (bools, bools everywhere) so I decided if I'm gonna rewrite half of it anyway I might as well just redo it from scratch and implement a proper state machine for the player. The result is hopefully that on the surface it looks like nothing has changed, but under the hood is brand-new, way more readable and extensible code.

so uh.. I don't actually have anything new to show off but here's me running around on the new code anyway
https://i.imgur.com/C5Z5Lbm.mp4
as you can see I've chosen not to go with every animation being a state, like in the Unity Animator. Instead I've basically separated it into States and Actions where States each have their own gravity/movement/etc. handling, require some condition to be true and each has a separate sub-state machines in Animator and Actions only require a trigger and play out automatically within their given state (such as double-jumping, attacking, skidding, etc.)

Your Computer fucked around with this message at 07:52 on Mar 23, 2020

Omi no Kami
Feb 19, 2014


Maybe it's all in my head and this is just a blender version of the thing where anyone who works with unity a lot thinks the default unity renderer looks cheap purely because of how familiar with it they are, but you know that thing where low-quality 3d models often look noticeably artificial and CGI-y in games? I'm still getting that from a lot of the assets in that screenshot. The paper bag looks fine to me, the pencil holder & pencils look alright, inbox is okay, but the lamp, laptop, desk and chair all look a little funny to me. Maybe it's just because those have the most explicitly bad edges/seams?

al-azad
May 28, 2009



No, I don’t get it. If you can maintain consistency then you’ll keep the audience immersed. It’s a video game, I know it’s just artificial, but consistency is what keeps me from over analyzing every detail.

Omi no Kami
Feb 19, 2014


That's good to hear then, thanks- incrementally improving on all my stuff is fine, but I wanted to be sure there wasn't a core stylistic/executional problem with how I was churning those out. ^^

Adbot
ADBOT LOVES YOU

al-azad
May 28, 2009



Weeeeeeeell, I think you should pay a little more attention to scale. The desk and chair are fine but the laptop is maybe a quarter too large and everything else is so small an appropriately sized human could probably swallow them. I also couldn’t tell that was a paper bag until you said so, you’re relying on subdiv a lot for something that should be using a texture for most of the details.

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