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
Your Computer
Oct 3, 2008






Grimey Drawer

Zaphod42 posted:



Why isn't this working?!

Its clearly rendering the texture to the UVs to the model, but texture paint won't change it.

The weird part is the image even shows an asterisk * after I try painting, like its been modified, and then it'll save the change and the asterisk goes away, and then if I paint again it gets the asterisk again.

But it just stays solid black. I can't change anything.

All I wanna do is paint FRONT and BACK and TOP on it so its obvious which UV is which in photoshop, this shouldn't be rocket science I am so frustrated right now

without knowing anything about texture painting in Blender, does the material on your model use the same texture as the one you're painting and have you set the viewport shading to show textures? (rather than just material color or w/e)

Adbot
ADBOT LOVES YOU

Your Computer
Oct 3, 2008






Grimey Drawer

I just tried it in an empty project and it seems really straightforward?

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

you shouldn't have to mess with around with nodes or cameras or anything

Your Computer
Oct 3, 2008






Grimey Drawer

Zaphod42 posted:

Yes it does seem straightforward :| that's not really helping
...which is why I included a clip of setting everything up?

I notice in your screenshot in the property manager you're on the Texture tab and it looks like you've set your texture to the Brush Texture? You should be setting your material's base color to an Image Texture and then select your newly created texture from the list, like I show in the clip.

Zaphod42 posted:

... I'm not messing with nodes or cameras to try to set up texture painting. I did that as I explained in my post because it created duplicates in Unity and I didn't want them, and didn't realize it might cause an issue in Blender. I am now asking how to add them back because I don't know and I worry that may be part of the problem.
I'm sorry, I didn't see that part of your post. It doesn't cause an issue (as you can see there are no lights or cameras in my scene either), in fact I deleted them from the Blender default file because I don't want them 90% of the time. The only problem you get from not having a camera is not being able to render your scene in Blender to an image, and likewise not having a light is only a problem if you're using the viewport renderer (rather than lookdev or viewport shading)

Your Computer
Oct 3, 2008






Grimey Drawer

Zaphod42 posted:

Yeah I found an article saying that may be the issue, its trying to paint textures instead of painting color ON the texture, which explains why its showing changes being made to the texture (its adding textures, which are ... empty and invisible I guess?)
Sort of. You made a new texture (to be painted on) but then you also set your brush to use the color of that texture. You're painting the texture with itself, and the texture is black so the result is just black.

You shouldn't be in the Texture part of the properties window at all if you just want to paint. It overwrites the brush color with whatever texture you give it, so you could "stamp" one texture onto another or stuff like that.


KillHour posted:

Yeah, you'll have to hand-tweak it. Just wildly overdo it. Like make the legs go down way too fast and grow to like 150% of their normal length and see how it looks.
I'm not sure you understand. Doing that would just make the legs clip through the ground and it would look very awkward and disconnected. There's no code that says "keep feet on ground" and the only way I could keep the feet lined up with the ground while the character is moving upwards is to stretch/move the legs downwards at the same exact rate that the gameobject is moving upwards (which if not impossible is at the very least unrealistic). Again, I'm not using root motion so the player (which is to say the model and hitbox) moves exactly where the code says, the animations just happen "on top" and don't include any motion themselves.

Your Computer fucked around with this message at 20:25 on Oct 25, 2019

Your Computer
Oct 3, 2008






Grimey Drawer

let me try it in pictures


Your Computer
Oct 3, 2008






Grimey Drawer

Zaphod42 posted:

In your video as soon as you create the new material it gets applied automatically? It doesn't do that for me. It stays purple in texture paint unless I manually add the material to the node graph in shading...
no, nothing gets applied automatically. I am also not creating a material, I am creating a texture. I then tell the object's material (all objects have one by default) to use the texture like so:





it looks like you haven't assigned the texture in your gif above.

Your Computer
Oct 3, 2008






Grimey Drawer

I don't get why you're being mad at me for trying to help you with a question you asked for help with but it's good that you got it working at least

Your Computer
Oct 3, 2008






Grimey Drawer

rolling!
https://i.imgur.com/kcRKYbz.mp4

got most of the base moveset now so I think the next step would be to fine tune and make everything just right, as well as cleaning up some of the code. I've already done a lot of refactoring on the player code to avoid unnecessary "is[action]" bools when checking the current animator state will suffice and so on. One thing I find a bit hard to make nice and readable is the code for the different moves since they affect a lot of different parts - I've tried dividing the player code into methods that do one thing (calculate velocity, rotate the player, etc.) but the moves do a lot of things at once so their code inevitably ends up spread around rather than in one neat place.

Your Computer
Oct 3, 2008






Grimey Drawer

Zaphod42 posted:

Its also more artificial and videogamey, in canon your character doesn't know what they don't know! It also spoils potential alternative playthroughs.
otoh you don't know what you're missing so you might not feel like doing more playthroughs. Or have any idea what you should do differently in your following playthroughs for that matter.


I like it when games give you the option - put a "show/hide dialogue options you don't fulfill reqs for" option in the settings and I'll always turn it on, but don't make it mandatory. It can make dialogue trees a bit cluttered if there are truly a ton of choices, but for most RPGs I feel like it's the best option.

Your Computer
Oct 3, 2008






Grimey Drawer

Stick100 posted:

It sounds like for DE it would be WAY too many options. There are something like 30 skills, so it's possible later in the game that many convo tree would have like 30+ options, instead of 4. Since there are skill checks for many skills and non-skill check options as well.
like I said, for most

Your Computer
Oct 3, 2008






Grimey Drawer

Synthbuttrange posted:

Looks like a good start for simple stuff, and currently free while its in testing:

https://twitter.com/AmplifyCreates/status/1189269145382277127?s=20
It's wild to me how much you can do within the Unity editor itself. I think the only major 3D modeling software functionality that it doesn't have yet is skinning and rigging? (unless someone also made tools for that and I just haven't heard of them)

Now if only Unity could update ProBuilder to include some of the badly needed basic features (target welding, removing vertices) I would straight up do half my 3D work just in Unity.

Your Computer
Oct 3, 2008






Grimey Drawer

Lanth posted:

Also apparently you'll have to assign a "fake user" to each animation in blender or else it'll only use one of the actions/animations when you export it, or at least that's what the tutorials I've been checking said and it worked for me, not sure if that's still true in the newest version.

Phone posting or I would share a link.
yeah I still haven't wrapped my head entirely around how the 'fake user' thing works in Blender (I know it's about how Blender decides what data should be thrown away and what should be kept) but luckily this is as easy as pressing a button right next to the button you pressed to create a new action so it's not really a problem



I've been using Actions when animating and importing to Unity on this project, and while it took me a few attempts before I understood how to do it properly it makes everything a lot cleaner and it makes it so much easier to tweak and edit animations. It imports really well into Unity too, each action imports as a separate "take" in Unity, and it fills everything in automatically so the only thing you have to do is click "loop" on the animations you want to loop.

Your Computer
Oct 3, 2008






Grimey Drawer

Lanth posted:

Have fun!
This one is so, so easy to forget when this hobby starts feeling like work.
That's why looking at all you guys' stuff and everyone sharing their progress on twitter can be a huge motivation/determination boost!
awesome little project! You got an impressive amount of stuff done in that short amount of time.

Imhotep posted:

I never thanked you, or Chev, for your amazing posts that lead me down some amazing rabbit holes, and now I'm feeling comfortable and in the zone learning Blender, it's sort of clicked in the most basic way, like, I'm picking up shortcuts pretty regularly because it's basically necessary and also helps as a learning device in a weird way, but I feel confident that I can make unshaded Katamari style versions of whatever object I can think of, and it rules.
that's great to hear!

Imhotep posted:

Reading your posts seems like a true nightmare though! Like, is video game development still this hard, or are you experiencing this particular difficulty because of the restrictions, or rather, stylistic choices wrt gravity, etc. or lack of rigid bodies, or whatever. I've been loving all of your updates, and I'm curious since you're coming up with a moveset, but how do you decide on what moves the character should be able to do and like how does that affect your level design, or vice versa? Does one inform the other?
my difficulties are mostly of my own creation First of all I'm still pretty new to gamedev (this is as far as I've gotten in a project before) so I'm learning as I go along, but I'm also not making it any easier for myself by trying to force a square peg into a round hole. Unity has so many tools to let you make sleek-looking modern games with realistic physics and PBR materials and all of that but I specifically want to do away with all of that, so I'm basically fighting the engine at the same time as I'm trying to learn how to use the engine.

As for coming up with a moveset, my first source is other games in the genre. What moves did I like? What moves did I not like? What moves would suit my character(s)? For example, attacking is often very awkward in 3D platformers so I always preferred the Banjo/DK64 rolling attack. Also, when it comes to 3D platformers I feel like the moveset absolutely has to precede the level design, because it's such an integral part in what makes the genre what it is. You reach different collectibles and objectives by using different moves, so having a moveset to refer to when creating levels makes the whole process work. That doesn't mean it can't go the other way a bit too of course, if you come up with a really clever puzzle or obstacle but you can't quite figure out how you want the player to interact with it you might come up with a new move, but introducing a new move after you've already created other levels would be a pain since then you gotta decide whether to go back and redo the old levels with that new move in mind or to only use it in newer levels (and I believe it's more fun for the player if most of their moveset unlocks relatively early)

Your Computer
Oct 3, 2008






Grimey Drawer

Imhotep posted:

But I guess I was sort of talking about more nebulous ideas for levels, and I could be wrong, but it feels like a lot of that sort of thing could be modular to a degree? I mean, certain levels absolutely require it and are based around moves, but I mean the general Ďvibeí of a level, or a general aesthetic assuming that youíre making a level thatís going to be played by a character with that general move set, or it seems like with Mario 64 style platformers where you donít learn more moves, you could possibly do a modular thing, but I have no idea. I agree tho and didnít think about how important those moves that make it fun to move around are, like the long jump, talon trot, the rolling move from Yooka Laylee.
oh right for sure, when it comes to stuff like vibe/aesthetics that was some of the first stuff I thought about. I'm just doing this a hobby project for my own sake so my only consideration when deciding what levels I want is what I want to play, pretty much Twisting jungles, ancient pyramids, spooky mansions, that's the kind of stuff I've always loved since I was a kid and would love to work on and play. I've put some thought into how it all connects, but one of the beautiful things about 3d platformers is that they often throw the whole "makes sense" thing out the window in lieu of fun aesthetics and setpieces.

Imhotep posted:

(did you play Yooka Laylee, and what did you think of it?)
I did! I enjoyed it more than a lot of people, I think. It got a lot of criticism for not evolving the genre past the N64 era but (to absolutely no-one's surprise) I like the genre just like that It wasn't groundbreaking and it had some issues (camera issues at launch, levels were too large/empty) but I really don't feel like it deserves the amount of hate it got.

Imhotep posted:

I donít see many 3D action games in here and this is sort of a dumb question, but as I move from being a Blender novice to working with Unity and putting together some rough project with assets, Iím trying to think of what sort of game I want to make, and I always thought I wanted to make a platformer but now, almost all of my favorite games are basically melee based action games. Letís say I wanted to rip off Sekiro, would that be stupidly hard? I donít mean every mechanic, just the sword based combat with the back and forth, rally system thatís based around, posture and deflecting and attacking. Or even just a dark souls-like, has anyone had experience making a game like that? I guess my question is really just like, is it possible/worth it for a complete noob to aim for something like that for their first project? Iím just trying to make something for fun, and not like hoping to release something, fwiw.
I'm gonna say yes, unfortunately. 3D action games are very complex, and few are as refined as Sekiro (or the Soulsborne games for that matter). Even getting a barebones skeleton of a game like that with satisfying mechanics would be a pretty big feat, and that's without the monumental task of creating all the content for the world, enemies, equipment, animations. I don't mean to be a downer, I just think it might be a bit too ambitious because these games were created by big developers with entire teams working on different parts. Heck, even other big developers with millions of dollars have tried imitating these games and come up short.

3D games are so much harder to get "right" in general (even the "simple" stuff like moving around, collisions and the camera) and that's before you add 'action'. I would probably either start by making a much simpler 3D game or focus on 2D gameplay with more complex mechanics (like the back and forth posture/deflect stuff) to start with.

Your Computer
Oct 3, 2008






Grimey Drawer

TooMuchAbstraction posted:

Either that dev ripped their animations from an existing game (or I guess purchased a "Dark Souls-style Animations" asset pack), or they're a professional-tier character animator, which is one of those skills you can specialize in and do basically nothing but that for a job. The same goes for the enemy model, their sound effects, particle effects, etc. You're looking at that video and thinking "one person did this", I'm looking at it and thinking "if one person actually did this then a) they've spent a lot of effort on developing a lot of disparate skills, and b) they spent a lot of time on that demo. More likely they made* this, and that asterisk is pretty loving important."

Basically, that demo represents a lot of work. Whether one person did it or several, don't underestimate how hard it was to produce.
that's Iudex Gundyr from DS3, though using some animations that I think come from other enemies (and obviously an untextured sword rather than his glaive)



I am also recognizing a lot of the sound effects.

Your Computer
Oct 3, 2008






Grimey Drawer

TooMuchAbstraction posted:

Why don't more games have a "go back" button in their dialog? I can understand it for games where every line has an accompanying cinematic action, but when it's just a bunch of talking heads, it's a nice quality-of-life thing and means if you accidentally skip over something important, you have a chance to recover. Unless it's the very last page I guess.
one thing I feel like I've been seeing more of lately (lately as in years, but y'know) is a chat log, especially in RPGs, and it's a really nice feature that should be in every game imo.

Your Computer
Oct 3, 2008






Grimey Drawer

Shoehead posted:

I went and changed my sprite size for this Zelda project, I just wasnt having fun with the LA/Oracles sized sprites. Which led to me resizing a lot of details on the world map. Which led me to make some double sized world rooms.

https://twitter.com/Shoehead_art/status/1220092260492218375

They big.
this still looks amazing with the video compression it's hard to get a good look at the sprites but from what I can tell it works really well!

speaking of video compression, is the stuttering when the camera move saround (when walking around larger areas) an artifact of the video?

Your Computer
Oct 3, 2008






Grimey Drawer

Bert of the Forest posted:

So the question is - how do I create an outline shader that simply outlines the final SEEN result? I don't want the individual makeup of sprites to all be outlined, which means I can't place a shader on the individual objects, but I also can't use a camera shader since it outlines everything in view instead of just the object being selected? I'm honestly baffled on where to even begin here.

my immediate thought is what about a second camera that only sees the selected object and creates the outline? if it's possible to change layers of an object on the fly as you're selecting them, I think that might be one way it could work?

Your Computer
Oct 3, 2008






Grimey Drawer

Bert of the Forest posted:

Hmmm okay yeah pervert vibes were not the goal. Whoops! I can see now that indeed the rug looks quite mattress-like, so that can at least be solved. The general vibe being dark and weird is unfortunately something I think perverts and conspiracy nuts have in common though.

fwiw I read it as a tinfoil hat shack even though I thought it was a mattress, but I agree it's probably best to change it now that I hear the other interpretation

Your Computer
Oct 3, 2008






Grimey Drawer

Bert of the Forest posted:

Speaking of which, I did a little poll in the Discord to help design this creepy alien dude. He turned out cuter than expected, but I'm hoping he'll look sufficiently creepy when contrasted against the much cuter birb characters:



I absolutely love this design, it's the perfect amount of creepy

Your Computer
Oct 3, 2008






Grimey Drawer

Chev posted:

Another approach is to just have a full wall and past the windows on top of that wherever you need them. You can use interior mapping or some other fancy trick to produce the illusion there's something on the other side of the window.

yeah, this is a bit trickier with windows (since they're usually see-through) but it's a technique I've been paying attention to lately and see absolutely everywhere in games now that I'm looking for it. I'm used to modelling and rigging characters so I always try to make geometry that's connected rather than free-floating, but when it comes to environments it seems like the best, simplest and also easiest way is to just make separate pieces and clip them into each other.

Your Computer
Oct 3, 2008






Grimey Drawer

Shoehead posted:

I still have no real idea of what the story of this game is but I'm getting there with the features. There's like... REAL game features in now. FOR A REAL GAME
just tell me if this is getting old but aaaaaaaaaaaaaaaaaaah this project I can't help but comment on it every time. Not sure if I already posted about this but my very first gamedev project I ever did was actually an attempt at doing something similar, but uh... that was before I could code or knew anything about gamedev so it failed spectacularly. It just makes me so excited to see updates even if I'm not involved in the project.

Bert of the Forest posted:

Haven't posted in a minute;

as always the aesthetics are just perfect

Your Computer
Oct 3, 2008






Grimey Drawer

KillHour posted:

https://blogs.unity3d.com/2018/04/09/new-plans-for-unity-releases-introducing-the-tech-and-long-term-support-lts-streams/

TL;DR:

2019.4 LTS is going to be identical to 2019.3 with all the latest patches and will release around the time of 2020.1, which is still in alpha right now.

I'd recommend just switching to 2019.3 because that will "become" the LTS release in a few months.
I was gonna open my project for the first time in a couple of months and remembered reading this and decided hey, that sounds like a smart plan


well, it wasn't and my project is busted it's going to be fun trying to figure out everything that went wrong. At a first glance I can tell that somehow all the animations got messed up (how??) so the idle animation is now the rolling animation, the jumping animation is now the t-pose and so on. Oh the joys of updating software....


e: I guess updating has broken importing from Blender in some way? I looking at the animation import and it seems like every animation is using the same take, when previously they were all set up to use different takes (saved in Blender as Actions). There also doesn't even seem to be an option to choose source take anymore in the animation importer.

e2: turns out I was right! They changed how Unity imports from Blender and you have to edit the import script in order to get it to work how it did before. Apparently this isn't something they plan on fixing either, so if anyone else runs into it here's the solution:
https://issuetracker.unity3d.com/issues/using-multiple-animation-clips-in-blender-not-all-animation-clips-are-imported-using-a-blend-file

e3 because i don't want to doublepost with nothing interesting: on a whim I decided to upgrade my old LWRP test project to 2019.3 just in case the weird inconsistent lighting issues I was having were fixed and it turns out they were! Now I'm a bit torn - do I port all of the stuff I've done on the skeleproject over to URP and use that (long-term probably smart, but might run into other weird issues?) or do I stick with the old default 3D project where everything just works?

Your Computer fucked around with this message at 06:49 on Mar 13, 2020

Your Computer
Oct 3, 2008






Grimey Drawer

I'm officially back to working on my project 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

although it doesn't look like much has changed, I've redone the entire structure of skelly's Animator Controller! Butting my head against that and trying to come up with a solution is part of why I haven't been working on it for a while, but I suddenly had a flash of inspiration and it turned out wonderfully! Basically my problem was that states in the animator are equivalent to animations, and a lot of animations can transition into each other (especially stuff like almost anything->falling) but I also wanted a way to keep track of "player states" in a more broad sense. Finally it dawned on me that I could represent each "player state" by its own state machine, resulting in my current much more readable and extendable graph:

(swimming not quite implemented yet)

within the sub-state machines are the various actions that the player performs in that "state" such as rolling, crouching, doublejumping or climbing and as soon as the player's state changes (such as no longer being grounded) the control switches to another state machine. The way it's set up means that I can also extend it to work with any character as long as they implement a couple of variables such as IsGrounded, forward and vertical speed, and since it's not tied to direct input in any way it doesn't matter if those variables are set by the player, an AI, a scripted cutscene or whatever. The animations will transition as they should regardless! I don't know why I never thought of this before, but to be fair there's hardly any info to be found online about setting up an Animator Controller

Your Computer
Oct 3, 2008






Grimey Drawer

sorry to interrupt the roguelike metroidvania talk but I have One of Those Questionsô again

I've ran into another thing where it's easy to find a solution but all of them feel like hacks more than actual solutions, and I feel like this is one of the things I wanna get right - slopes. Specifically, handling walking/sliding down slopes in a sane way. Googling the topic brings up a hundred questions and a hundred solutions, such as adding several extra colliders, forcing -9000 gravity, doing a raycast and snapping the player to the slope, and so on. I guess my answer is this; do any y'all have any experience with this and what would you recommend? I'm not really happy with any of the solutions I've found online since they kinda just brute-force that one specific thing and are prone to causing issues elsewhere, or they're just massive overkill.

to not have a post entirely without content, here's some insight into my incredibly sophisticated debugging methods

the answer was yes

Your Computer
Oct 3, 2008






Grimey Drawer

dreamless posted:

That's my favorite. But in general when I'm moving a player on a walkable surface I move them parallel to the surface, and have some amount of vertical slop both ways so bumps and curbs don't block them or force them airborne.

this is one solution I've been thinking of, though I'm not quite there yet with the implementation I figure this is probably something that can be done super easily with quaternions but as I've stated previously quaternions are basically black magic to me. Another problem I've not quite figured out yet is that I'm using the built-in Character Controller for collisions and it only considers itself "grounded" if there's a downward force being applied. I've gotten around this with a bit of a hack just setting the downward velocity to like -0.5 or something while on flat ground but it obviously runs into some trouble now that I'm dealing with slopes

I mean, I know exactly why it behaves like it does - as I move down a slope the velocity moves me off the slope and into the air, and the gravity pulls me down on the slope again the next frame so I end up stuttering down the slope in lots of tiny "falls". That's why I figure the solution must be something like aligning the velocity to the ground normal in some way.

Your Computer
Oct 3, 2008






Grimey Drawer

Thanks!

I'm making good.....


progress...


I think I'm gonna have to spend a bit more time on this one I realize I have to rewrite some fundamental stuff because right now I'm naively applying a downward force, well.... downward. It's just directly applying to velocity.y. I feel like I'm on the right track though, so hopefully I'll have something to show for it soon. Here I was thinking I had most of the core stuff implemented and I just kinda.... forgot about slopes being a thing


vvv yeah! that sounds like exactly the kind of thing I should be doing. I'll work on implementing it tomorrow vvv

Your Computer fucked around with this message at 10:14 on Mar 16, 2020

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?

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! 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?
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! 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.

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 01:26 on Mar 18, 2020

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 08:50 on Mar 18, 2020

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 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 06:52 on Mar 23, 2020

Your Computer
Oct 3, 2008






Grimey Drawer

al-azad posted:

Your models are writing a check your textures can't cash. Like the paper bag is almost 1,000 tris for a small decorative object which is 3/4 the detail of the Persona 4 protagonist. If your target is PS2 Yakuza your textures need to be pulling the weight you want your models to be doing.



Most of the details in this scene are flat textures. The edges that look beveled? They highlighted the edges to make them appear worn, I can see at most one level of beveling on the couch arms to make it look smoother than it actually is but we're still talking about an arm rest that's basically a hexagon shape.
One thing that I wanna point out is that I look at this scene and I see pre-rendered textures everywhere. Hand-painting (or at least touching up textures) is an important skill if you want to make something low res work, but baking in details through pre-rendering was also a major part of games like this.

Hammer Bro. posted:

That's basically all of the work I do. It's fantastic and completely invisible!

I wouldn't have thought I cared about having nothing to show for my efforts, but I find that every once and a while it's motivating to do something deliberately visible, even if I know it doesn't really help with the progress of my game.

Gotta experience that "gamey" vibe from time to time or it starts to feel a little too much like work.

Your Computer
Oct 3, 2008






Grimey Drawer

I'm still working on these darn slopes today's breakthrough is making it so slopes gradually drag you towards the slope direction, essentially giving you a grace period of getting up/off a slope before you start sliding


(I know it would look better if the walking animation sped up rather than slowed down, I haven't gotten around to working on that detail yet)

other things I've done include fixing "walljumping" (had to completely redo ground check code) and redoing how rotation is handled to let each state decide how to rotate the player (or not)

and to give myself a little break from slopes I touched up some of the blob shadow caster code so the size of the shadow scales with how far away from the ground the object is to make it look a bit more dynamic


e: another edge case (heh) I've been racking my brains over - is there a way to detect a ledge's (i.e. any sharp drop-off) exact location and alignment short of putting a collider on it? I kinda like it when characters do that thing where they teeter on edges if you walk up to them, but that would require me to somehow know both where the edge starts and also which direction it's in and I can't figure out how you'd do that automatically.

Your Computer fucked around with this message at 21:09 on Mar 27, 2020

Your Computer
Oct 3, 2008






Grimey Drawer

Imhotep posted:

Or is Unity just wonky like that sometimes?
Thanks for the nice feedback! I'm not sure I understand this question though. It would be nice if Unity came with a robust third-person controller that handled everything from slopes to ledges just the way I wanted it to and whatnot but the thing is a lot of these things have to be coded and tuned on a per-game basis anyway so it's not the kind of stuff that you can just "solve" unfortunately.

TooMuchAbstraction posted:

I'd be inclined to say do a raycast pointing down, a short distance in front of the player. If it doesn't hit ground within a short distance then do the teetering behavior.
that was my first idea too, but a simple raycast just doesn't provide enough information to do this. For example, if there was geometry blocking the player from going forward but not from blocking the raycast downwards it would falsely detect a ledge where there is none. Or, if you approached a ledge from a sharp angle the raycast would go out of bounds while the character was barely facing the ledge and I only want the character to teeter if they're actually facing perpendicular to the ledge. Trying to figure out how to detect and calculate "perpendicular to ledge" is what I've spent most of my time doing

I've tried a bunch of stuff like doing multiple raycasts, capsule casting forward to check for obstructions, probing the ground in front of the player constantly to find the exact spot where it goes from solid ground to thin air, doing this multiple times with multiple raycasts to try and draw a line between them and so on. Basically anything that came to mind. All of these approaches had some serious problems though, until I finally realized that it doesn't have to be so complicated.

Rather than this mess of multi-stage raycasts, I can cast a single spherecast downwards in front of the player from the head down to whatever clearance I want a proper ledge to require. Having a radius the same size as the player's hitbox it will accurately detect if there is anything that would obstruct the player (similar to my capsule cast attempt) and likewise due to its thickness it will only clear the edge if the player is actually facing towards it. It's so simple and so obvious in hindsight!


The White Dragon posted:

you know how i love my nasty fixes but imo add some kind of hitbox or four, or sixteen near the player's feet, check for !angledSurfaceState and if more than a certain amount of it isn't intersecting with flat ground then switch to the ledge animation
might've been able to do something like this too but I quickly found out the problem with checking for ledges near the player's feet is that if they get close enough to a wall you might detect the void behind the wall as a ledge despite the fact that the player is well and truly obstructed I appreciate the help though, and I'm super psyched I figured this one out because I've literally been losing sleep over it

Your Computer
Oct 3, 2008






Grimey Drawer

Imhotep posted:

Trying to rig my own character to somewhat match the placeholder I've been using has been its own nightmare, so I'm constantly impressed by all these incredible animations that are perfect and don't have meshes flying around when you bend a leg a certain way etc, like mine do...
that honestly sounds to me like it's a much more complicated/complex rig with IK and the like, though I don't have any experience with Unreal to know more.

Imhotep posted:

But yeah, my question was supposed to have been edited but I must not have hit that edit button, whoops. But I guess I was asking if you were using the third person controller in Unity then adding to it, or did you basically roll your own? I thought I remembered you mentioning that because of how characters in N64 games jumped or something that you basically made your own, or a combination of using both the default Unity thing, but heavily edited and your own. And yeah, I assumed there was no simple solution to any of it for cases like that, but I just started panicking watching that after I've spent a while trying to model a character I like, and then rig it, and import it into Unreal when I wasn't that worried before, simply because the third person template mannequin, even when I replaced it with a Mixamo model and assigned like 10+ animations to it didn't act weird at all as far as the way it interacted with the terrain, and I was just assuming it would stay that way. But if I remember correctly, Unity's third person platformer template didn't have a controller that was quite as sophisticated.

I am still using the Character Controller, but the only purpose it really serves is to handle collision. It's the most basic approach possible; no physics forces interacting or root motion from animations or any of that, just a series of simple "move here" commands with the controller doing collision resolution for me. All the animations and everything is just a purely visual layer on top of a capsule collider, the animations and character model itself doesn't actually interact with the terrain or anything else in the game world. Everything that has to do with player movement is calculated manually and then fed into the controller so it moves where and how I want it to and only where and how I want it to That said, I'm flying by the seat of my pants here and I'm doing everything in a pretty rudimentary fashion so a lot of this probably isn't a suitable approach for a modern game with all the bells and whistles. Perfect for a rudimentary 3D game tho

Your Computer
Oct 3, 2008






Grimey Drawer

I apologize that this is another pretty uninteresting update, but the good news is that I've now completely rewritten all of the code and re-implemented everything I had previously and more! Got completely new ground checking code that's far more robust and can theoretically be used to give different properties to different types of terrain, proper handling of slopes, sliding is fully implemented and animated, plus the new architecture makes all of the code so much more tidy and readable, and as a result I've squashed all manner of bugs/quirks that were in the previous code.

https://i.imgur.com/7N4e8eW.mp4

it's not very flashy but it's a tremendous milestone for me. For the first time I feel like I would be comfortable letting other people run around with the character without fear that it will implode in some weird way

Your Computer
Oct 3, 2008






Grimey Drawer

thank you so much for the kind words everyone

xzzy posted:

At that big slide at the end, is that you aligning him with the slope or does that happen automatically? Because it's awesome if it's automatic, saves the annoyance of the player grinding against a wall as they struggle with the controls.
the sliding code tries to always slide the player in the direction of the slope, but it also takes input from the player to nudge the character a bit left and right. Haven't tested it in a more robust scenario than that slide though, it's gonna be interesting to test it against more devilish slides

a cyberpunk goose posted:

this isn't boring!! in fact, you're now required to enable all your debugging gizmos and show us more running around
your wish is my command, but I don't actually have that many interesting gizmos. To mix things up a bit I'm on the map I showed off earlier
https://i.imgur.com/PnoiKFr.mp4

- the magenta line is the movement direction (self-explanatory)
- the cyan sphere is for the ground checking which basically considers the character grounded if there's ground within that area (meaning bumps and changes in elevation won't knock you out of being grounded)
- the rig in front of the player is the ledge checking code which first does an OverlapSphere check to see if the point of casting is clear, then does a spherecast in the direction of the line to find an edge, which determines multiple things such as whether the player should begin sliding or falling (since the collider can't tell the difference between a steep ledge and a steep slope) and whether to start teetering, which I didn't show here but showed off earlier!
because of how I've segmented the code into different states this stuff is only handled while actually on the ground which is why the gizmos disappear when I jump, if that wasn't clear Anyway I've still got a tremendous amount of work to do and things I wanna try out, but this is a very exciting time for sure!

As an aside I remember asking if anyone could elaborate on why the built-in CharacterController was considered bad and I've also tried searching around for an answer, but now that I've spent as much time as I have using it (and I'm still using it!) I have some thoughts on my own. It's a very simple component. Very simple. At this point the only thing I'm using it for is collision resolution because the other functionality it has is too limited to be of use. I can see it working decent out of the box for a game with very basic movement requirements like an oldschool Doom-style FPS or something but it certainly doesn't cut it for a third person platformer. The smart thing to do at this point would be to go over to something like the Kinematic Character Controller from the Asset Store but I don't have $60 to throw around right now and besides, I'm learning a whole lot doing this the hard way! The upside to using so little of the CharacterController's functionality is that I could replace it with any other collision resolution code with minimal rewriting, since all I'm really doing with it is calling Move().

Your Computer
Oct 3, 2008






Grimey Drawer

kaffo posted:

I honestly have been tempted to start a community driven Unity "best practice" / "here's all the dumb poo poo Unity will do and how to avoid it" pdf.
But then I realise it'd probably be about a thousand pages long and I lose the will to live.
it's gone now but this reminds me of the best thing I found while diving in the Unity manual



literally in the official documentation

Adbot
ADBOT LOVES YOU

Your Computer
Oct 3, 2008






Grimey Drawer

Once again I've got nothing to show off but I've been working my butt off the last week! I finally got around to setting up source control on my project so now I don't have to be as stressed out about doing major changes that may or may not ruin the entire project. I also got one of them trello boards to write down and label all of my TODO's, ideas and planned features rather than just jotting them down all over the place and then forgetting about them which turned out to be surprisingly helpful and I've finished up a bunch of restructuring, bug fixes and so on that I had planned (and now they're all neatly in pile labelled "Done" which feels good )

I overhauled my new ground check code to be completely independent of the CharacterController's collisions, restructured the player controller/player states so the states don't have to handle the Move() command and it's all done on the player controller, fixed several bugs involving sliding and edges and yeah... I think I'm starting to get ready to make new stuff. Any day now!

I've also got a new codename for the project since I can't in good conscience keep calling it Bonejo Kaspooky, and I did a silly little logo



Shoehead posted:

I'm trying to get better at cutting gifs full of action together



I need..... to play..... this game!

TooMuchAbstraction posted:

The old scene was haunted, apparently.
I remember I had a similar problem happen at some point where I just couldn't figure out what was causing some bug in what seemed to be two completely identical projects. I think "it's haunted" is a valid enough answer

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