Current Events > I've been working on a 3d platformer game (in unity)

Topic List
Page List: 1, 2, 3, 4, 5
Fluttershy
02/26/24 4:55:57 AM
#51:


ganbare

---
https://imgur.com/a7zbPmp.gif
... Copied to Clipboard!
Pororin
02/26/24 5:29:35 AM
#52:


Fluttershy posted...
ganbare
Pororin!
... Copied to Clipboard!
Hejiru
02/26/24 6:36:16 AM
#53:


instead of a hub world where you enter levels, each self-contained level is connected to others by branch paths.

So kinda like Metroid Prime?

---
The difference between fiction and reality is that fiction has to make sense.
... Copied to Clipboard!
TheGoldenEel
02/26/24 11:45:53 AM
#54:


Hejiru posted...
So kinda like Metroid Prime?
Yeah thats kind of the structure Im going for, but I want each area to be structured like your classic collectathon platformer level. just with entrances and exits that lead to other levels, rather than returning to some hub world

there would also be a fast travel system to each level once unlocked to minimize unwanted backtracking

---
BLACK LIVES MATTER
Games: http://backloggery.com/wrldindstries302 \\ Music: http://www.last.fm/user/DrMorberg/
... Copied to Clipboard!
#55
Post #55 was unavailable or deleted.
TheGoldenEel
02/27/24 10:13:46 AM
#56:


[LFAQs-redacted-quote]

Im just trying to make simple assets myself, then if it gets to point where I decide its something I want to try to sell Ill see what my options are

ive Spent the past two nights trying to make a decent walking animation tho x_x

then I have to do jumping, falling, idling, swimming, climbing.

---
BLACK LIVES MATTER
Games: http://backloggery.com/wrldindstries302 \\ Music: http://www.last.fm/user/DrMorberg/
... Copied to Clipboard!
TheGoldenEel
02/28/24 12:16:45 AM
#57:


After a bunch of effort I think I got the bones all set up in my character the way I want them
https://gamefaqs.gamespot.com/a/forum/c/c93ef105.png

but something about the way the bones deform the mesh is off because that's as far forward as the legs will go. if I move them up just a little bit more the whole thing gets stretched out in a bad way

https://gamefaqs.gamespot.com/a/forum/2/2e6246cc.jpg

must have something to do with the way the weights are set for deforming

https://gamefaqs.gamespot.com/a/forum/5/51039047.jpg

but I can't figure out how to get it to look decent

---
BLACK LIVES MATTER
Games: http://backloggery.com/wrldindstries302 \\ Music: http://www.last.fm/user/DrMorberg/
... Copied to Clipboard!
TheGoldenEel
02/28/24 1:02:19 AM
#58:


alright i came up with a decent placeholder walking animation

https://youtu.be/t73ModLrB0w

---
BLACK LIVES MATTER
Games: http://backloggery.com/wrldindstries302 \\ Music: http://www.last.fm/user/DrMorberg/
... Copied to Clipboard!
TheGoldenEel
02/28/24 2:58:55 PM
#59:


now that I got the hang of the animation editor with walking, I was able to get some decent jump, fall, shimmy, climb, and hanging animations too.

almost ready to export and start working with them in unity

---
BLACK LIVES MATTER
Games: http://backloggery.com/wrldindstries302 \\ Music: http://www.last.fm/user/DrMorberg/
... Copied to Clipboard!
#60
Post #60 was unavailable or deleted.
TheGoldenEel
02/28/24 11:32:51 PM
#61:


[LFAQs-redacted-quote]

tbh this specific problem wasn't all that different from any other problem in programming/development.

ultimately I just had to find the right answer online, which in this case was that the character's bone rig was set up incorrectly. Basically every bone in an armature has a 'roll' that defines, among other things, the direction it will rotate in 3D space, and in a symmetrical character they have to be set up to mirror each other, e.g. if the right arm has a 90 degree roll, the left arm should be -90 degrees.

they weren't on my rig, and it was causing copying and pasting poses to not work correctly (which helps with flipping poses in movement animations). Once I got that figured out, I came away with a better understanding of how it works, and was able to knock out the rest of the animations in like an hour

---
BLACK LIVES MATTER
Games: http://backloggery.com/wrldindstries302 \\ Music: http://www.last.fm/user/DrMorberg/
... Copied to Clipboard!
Trumble
02/28/24 11:34:11 PM
#62:


Did you implement the fart button yet?

---
Do, or do not. There is no Trumble.
... Copied to Clipboard!
TheGoldenEel
02/28/24 11:35:37 PM
#63:


now I'm working on refactoring movement to better accommodate animations. I had previously had my movement set up using the newer input system in unity, and had it set up as a state machine with the various states like walking, jumping, falling, etc. The tutorial I posted in the OP, while much more in depth, is just one giant file and uses the older input style. So I'm working on moving all the newly implemented movement and calculations back into the state machine I had initially set up

---
BLACK LIVES MATTER
Games: http://backloggery.com/wrldindstries302 \\ Music: http://www.last.fm/user/DrMorberg/
... Copied to Clipboard!
#64
Post #64 was unavailable or deleted.
TheGoldenEel
02/28/24 11:47:32 PM
#65:


[LFAQs-redacted-quote]

you have to make sure the editor package is installed in the unity package manager, and visual studio is your default editor. then when you open up your scripts through unity it'll show up

https://docs.unity3d.com/Manual/VisualStudioIntegration.html

---
BLACK LIVES MATTER
Games: http://backloggery.com/wrldindstries302 \\ Music: http://www.last.fm/user/DrMorberg/
... Copied to Clipboard!
TheGoldenEel
03/01/24 1:39:52 AM
#66:


broke everything in my movement scripts and now it compiles again but I don't have any actions beyond horizontal movement

feels good to be working in code again after a bunch of time spent building assets

---
BLACK LIVES MATTER
Games: http://backloggery.com/wrldindstries302 \\ Music: http://www.last.fm/user/DrMorberg/
... Copied to Clipboard!
SomeLikeItHoth
03/01/24 4:55:05 AM
#67:


I found some free Digimon sprites and some cool UI and tileset images so going to start working on a sim this weekend.

---
FAM FOREVER | https://iili.io/HSJO4Uv.jpg
... Copied to Clipboard!
TheGoldenEel
03/01/24 11:36:26 PM
#68:


got the moving, jumping, and falling animation states done for the character. Still have to work out the more specific details of some of the physics but I'm making progress

https://youtu.be/x2Hek8SmKsg

---
BLACK LIVES MATTER
Games: http://backloggery.com/wrldindstries302 \\ Music: http://www.last.fm/user/DrMorberg/
... Copied to Clipboard!
TheGoldenEel
03/01/24 11:36:59 PM
#69:


also if anyone is interested I do have it on github, code is kind of a mess right now as I'm working through some problems

https://github.com/dm-2028/unity-3d-project

---
BLACK LIVES MATTER
Games: http://backloggery.com/wrldindstries302 \\ Music: http://www.last.fm/user/DrMorberg/
... Copied to Clipboard!
TheGoldenEel
03/02/24 11:34:37 AM
#70:


Having a weird problem where suddenly part of my level mesh isnt being recognized as ground

i walk forward and suddenly the character switches to a falling state, but doesnt fall through the ground

cant figure it out

---
BLACK LIVES MATTER
Games: http://backloggery.com/wrldindstries302 \\ Music: http://www.last.fm/user/DrMorberg/
... Copied to Clipboard!
divot1338
03/02/24 12:56:03 PM
#71:


You should add an idle animation where it just goes to sleep. I think that would be fun.

---
Moustache twirling villian
https://i.imgur.com/U3lt3H4.jpg- Kerbey
... Copied to Clipboard!
TheGoldenEel
03/02/24 2:57:35 PM
#72:


divot1338 posted...
You should add an idle animation where it just goes to sleep. I think that would be fun.
thats the type of polish that I would eventually add if it got to that. Right now Im focusing on the functional animations so I can nail down movement and start focusing on other gameplay mechanics

---
BLACK LIVES MATTER
Games: http://backloggery.com/wrldindstries302 \\ Music: http://www.last.fm/user/DrMorberg/
... Copied to Clipboard!
TheGoldenEel
03/02/24 9:21:41 PM
#73:


TheGoldenEel posted...
Having a weird problem where suddenly part of my level mesh isnt being recognized as ground

i walk forward and suddenly the character switches to a falling state, but doesnt fall through the ground

cant figure it out
Well, I figured this out. Turns out I had an invisible trigger in the area this was happening. The old version of my code was ignoring the trigger (the correct behavior) but the new refactor was treating it water and switching to a not on ground stateand since I dont have swimming implemented yet it defaulted to falling.

glad it wasnt something with the mesh, that would have been a pain in the ass to figure out

---
BLACK LIVES MATTER
Games: http://backloggery.com/wrldindstries302 \\ Music: http://www.last.fm/user/DrMorberg/
... Copied to Clipboard!
TheGoldenEel
03/03/24 1:52:50 AM
#74:


spent some time fiddling with jump height. the way i was doing double jumps would cause the second jump to be affected by the downward movement of the falling action from the first jump, so if you jumped halfway through falling from a jump, it would only be half as high. "realistically" those physics make sense but I think the second jump should be the same height, or at least a consistent height

---
BLACK LIVES MATTER
Games: http://backloggery.com/wrldindstries302 \\ Music: http://www.last.fm/user/DrMorberg/
... Copied to Clipboard!
TheGoldenEel
03/04/24 12:33:18 PM
#75:


swimming is tough. I'm having trouble detecting the exact surface of the water because of the difference in calculations on frame/update cycles. So I have it mostly working but it's easy to break free of the surface and start swimming in the air

https://youtu.be/7EwsgAXnkwI

---
BLACK LIVES MATTER
Games: http://backloggery.com/wrldindstries302 \\ Music: http://www.last.fm/user/DrMorberg/
... Copied to Clipboard!
TheGoldenEel
03/05/24 12:24:01 PM
#76:


swim jumping achieved

https://youtu.be/B-OrzcFxXC4

it was a combination of a few different issues. I'm using a raycast from the center of the character to detect whether it's swimming or not, so now when it's in the swim state, and it leaves the swimming trigger area (but isn't on ground), vertical movement up is zeroed out.

then, if it's in this position (outside of the swimming trigger, but still in the swimming state) the jumping action is enabled.

the jump state was checking if the character started from the ground (to determine if it was a double jump and thus if another jump after is enabled), so I had to change that to starting from the ground, or from swimming

finally, there was some residual code from the tutorial i did that reduced jump velocity if the character was in water, based on how submerged it was, that was causing jumps to be very small. I just removed that entirely

next: climbing

---
BLACK LIVES MATTER
Games: http://backloggery.com/wrldindstries302 \\ Music: http://www.last.fm/user/DrMorberg/
... Copied to Clipboard!
TheGoldenEel
03/05/24 10:43:23 PM
#77:


Just continuing the cycle of getting something 90% implemented, then banging my head against the wall for hours trying to figure out why its not working with the climbing state

i can stick to walls but for some reason movement is being zeroed out

---
BLACK LIVES MATTER
Games: http://backloggery.com/wrldindstries302 \\ Music: http://www.last.fm/user/DrMorberg/
... Copied to Clipboard!
#78
Post #78 was unavailable or deleted.
TheGoldenEel
03/05/24 11:22:52 PM
#79:


[LFAQs-redacted-quote]

I mean, learning unity is what it is. Its the same with any framework/engine

the point of the engine is that it can handle the underlying boilerplate stuff for you

i will say its worth finding tutorials that walk you through building custom versions of the stuff Unity handles for you. I keep pointing to those catlikecoding tutorials but its because I think they do a good job of that

---
BLACK LIVES MATTER
Games: http://backloggery.com/wrldindstries302 \\ Music: http://www.last.fm/user/DrMorberg/
... Copied to Clipboard!
TheGoldenEel
03/06/24 1:21:03 AM
#80:


TheGoldenEel posted...
Just continuing the cycle of getting something 90% implemented, then banging my head against the wall for hours trying to figure out why its not working with the climbing state

i can stick to walls but for some reason movement is being zeroed out
bah, I finally figured out what's wrong. the code I'm basing this on uses a spherical collider, so when it contacts a plane there is one single contact point. I switched that to a capsule collider, so it was creating many contact points which broke functionality.

knew it would be something dumb

---
BLACK LIVES MATTER
Games: http://backloggery.com/wrldindstries302 \\ Music: http://www.last.fm/user/DrMorberg/
... Copied to Clipboard!
TheGoldenEel
03/06/24 2:58:25 PM
#81:


Semi figured out how to fix the problem, but climbing is still pretty wonky. I have a 'grip strength' factor that was set to .9f that was causing movement to be so slow as to be almost zero. cutting that in half allows for movement when there are multiple collision points as with a capsule collider

https://gamefaqs.gamespot.com/a/forum/6/6f0bdb09.png

have to do some extra calculations in the collision evaluation that involve adding already evaluated collision points to a list, I'm not sure this is particularly efficient but I just want to get it working right now and can worry about optimization in the future

https://gamefaqs.gamespot.com/a/forum/3/3740920b.png

still not handling climbing outside of the available surface area for climbing (and thus setting the state back to jumping/falling) and also sometimes jumping off the wall doesn't work and I'm not quite sure why

---
BLACK LIVES MATTER
Games: http://backloggery.com/wrldindstries302 \\ Music: http://www.last.fm/user/DrMorberg/
... Copied to Clipboard!
TheGoldenEel
03/06/24 3:20:37 PM
#82:


Alright, I got the bigger bugs worked out with climbing so my core movements are complete. Now I can focus on doing some of the more "fun stuff" like level design and working on collectibles and placement

https://youtu.be/ROE_ASyO4e8

---
BLACK LIVES MATTER
Games: http://backloggery.com/wrldindstries302 \\ Music: http://www.last.fm/user/DrMorberg/
... Copied to Clipboard!
#83
Post #83 was unavailable or deleted.
TheGoldenEel
03/06/24 11:58:49 PM
#84:


[LFAQs-redacted-quote]

I would go with something small in scope since the purpose is to learn the process from end to end.

I spent a few weeks on mine and ended up making a scrolling space shooter type deal. Grabbed some free assets, implemented some simple saving and loading, UI, and scene switching.

it's still up on the play.unity site

https://play.unity.com/mg/other/webgl-builds-314385

---
BLACK LIVES MATTER
Games: http://backloggery.com/wrldindstries302 \\ Music: http://www.last.fm/user/DrMorberg/
... Copied to Clipboard!
TheGoldenEel
03/07/24 12:09:18 AM
#85:


now I'm looking into how to implement collectibles in a way that can be scaled up.

Want to have one e.g. Banjo-Kazooie notes that there are about 100 of per level and whose collected status is saved

and then one e.g. Power Stars or Jiggies that there are about 10 of per level, also saved

found an example that seems promising

https://github.com/SplendidByteInc/collectable-example/tree/main

I probably would save as part of an overall save file that's a .json (here uses a binary formatter). This also uses an extension of the Editor class which I'm not really familiar with yet

---
BLACK LIVES MATTER
Games: http://backloggery.com/wrldindstries302 \\ Music: http://www.last.fm/user/DrMorberg/
... Copied to Clipboard!
TheGoldenEel
03/07/24 10:44:00 AM
#86:


I didn't realize how powerful the Editor itself can be in unity

https://learn.unity.com/tutorial/editor-scripting#

working through this tutorial and there's a lot you can do to validate game objects, set their values, etc through scripting directly in the editor

this solves one of the problems I was trying to figure out which was, how do I ensure a collectible is always the same distance from the ground without calculating it every time?

---
BLACK LIVES MATTER
Games: http://backloggery.com/wrldindstries302 \\ Music: http://www.last.fm/user/DrMorberg/
... Copied to Clipboard!
Torgo
03/07/24 10:45:27 AM
#87:


Keep at it and don't get discouraged!


---
Current signature not available.
... Copied to Clipboard!
Rexdragon125
03/07/24 10:52:52 AM
#88:


Nice. I tried learning Unity a few years ago and gave up because the vast majority of the documentation was in the form of 6 hour Youtube lectures, and it was soul crushing having to sift through them every time I needed a few lines to do something. Dunno if it's gotten better since then.
... Copied to Clipboard!
TheGoldenEel
03/07/24 11:04:49 AM
#89:


Rexdragon125 posted...
Nice. I tried learning Unity a few years ago and gave up because the vast majority of the documentation was in the form of 6 hour Youtube lectures, and it was soul crushing having to sift through them every time I needed a few lines to do something. Dunno if it's gotten better since then.
The actual Unity docs are pretty good

there are a decent amount of tutorials in Unity learn that are in text form but its hit and miss

i keep suggesting that catlikecoding site, I really like the way those are broken down

https://catlikecoding.com/unity/tutorials/

Torgo posted...
Keep at it and don't get discouraged!
Thanks! Been working on it a couple hours a day (thats all I get with work + a toddler) for about a month. Trying to stick with it

---
BLACK LIVES MATTER
Games: http://backloggery.com/wrldindstries302 \\ Music: http://www.last.fm/user/DrMorberg/
... Copied to Clipboard!
TheGoldenEel
03/07/24 1:14:48 PM
#90:


still looking for some solid open source games I can use as examples to see how others implemented things

I'm looking at respawning after falling in a pit; where to place the user, how to handle it, etc. and I have a way that works, which is to save the previous safe ground the player was on and just teleport them there when they fall in a pit, but Id like to see other ways people handled such a thing

---
BLACK LIVES MATTER
Games: http://backloggery.com/wrldindstries302 \\ Music: http://www.last.fm/user/DrMorberg/
... Copied to Clipboard!
kirbymuncher
03/07/24 1:38:53 PM
#91:


I did that in a game of mine (a 2D game, though) by having invisible checkpoints that record the last one you touched and put you back there if you fall into a pit

Obviously it's not as fine-grained as just doing any ground, but it might be more approrpiate if you have something that's a multi-step platforming challenge you're expected to do all at once

---
THIS IS WHAT I HATE A BOUT EVREY WEBSITE!! THERES SO MUCH PEOPLE READING AND POSTING STUIPED STUFF
... Copied to Clipboard!
TheGoldenEel
03/07/24 2:14:05 PM
#92:


kirbymuncher posted...
I did that in a game of mine (a 2D game, though) by having invisible checkpoints that record the last one you touched and put you back there if you fall into a pit

Obviously it's not as fine-grained as just doing any ground, but it might be more approrpiate if you have something that's a multi-step platforming challenge you're expected to do all at once
That seems like a good approach. Might be a lot more complicated in 3D as Id have to make sure I surround every pit with such a trigger, and make sure theres no way the player can get around of over the trigger

i was also looking at giving each pit a set location it spawns a player back to but a player may come at one from different directions

maybe a combination of these approaches would work

---
BLACK LIVES MATTER
Games: http://backloggery.com/wrldindstries302 \\ Music: http://www.last.fm/user/DrMorberg/
... Copied to Clipboard!
kirbymuncher
03/07/24 5:04:14 PM
#93:


I think surrounding the pits with them is sort of the wrong way of thinking about it. You don't mark the pits, you mark the platforms. If they find some bizarre way to get around or over the trigger, it's kinda their fault, and at worst they just go back one extra platform to the one there instead.

then again maybe it's not so easy in 3D. in 2D it's easy to just make a tall trigger that there's basically no way to accidentally miss (three of them pictured here)
https://gamefaqs.gamespot.com/a/forum/e/eefc6684.png

---
THIS IS WHAT I HATE A BOUT EVREY WEBSITE!! THERES SO MUCH PEOPLE READING AND POSTING STUIPED STUFF
... Copied to Clipboard!
TheGoldenEel
03/07/24 7:13:10 PM
#94:


kirbymuncher posted...
I think surrounding the pits with them is sort of the wrong way of thinking about it. You don't mark the pits, you mark the platforms. If they find some bizarre way to get around or over the trigger, it's kinda their fault, and at worst they just go back one extra platform to the one there instead.

then again maybe it's not so easy in 3D. in 2D it's easy to just make a tall trigger that there's basically no way to accidentally miss (three of them pictured here)
https://gamefaqs.gamespot.com/a/forum/e/eefc6684.png
thats how Id imagine it would be implemented, but with an open world 3D platformer you cant make assumptions about where a player came from or where theyre going

but I definitely should implement something like this more generally as a checkpoint system

---
BLACK LIVES MATTER
Games: http://backloggery.com/wrldindstries302 \\ Music: http://www.last.fm/user/DrMorberg/
... Copied to Clipboard!
TheGoldenEel
03/08/24 5:26:16 PM
#95:


On the subject of things that have been implemented a million times in a million different ways, I added collectible functionality, where you pick up collectibles that are in range.

every collectible has a trigger radius

https://gamefaqs.gamespot.com/a/forum/c/ce98d3d0.png

and when you enter that trigger, the character controller checks if it's a collectible

https://gamefaqs.gamespot.com/a/forum/a/aa655905.png

and it starts a coroutine to pull the collectible towards it, then sets the collectible to inactive

https://gamefaqs.gamespot.com/a/forum/9/9f629b7d.png

https://giphy.com/gifs/YDc0ys1OAApkWmTFvU

---
BLACK LIVES MATTER
Games: http://backloggery.com/wrldindstries302 \\ Music: http://www.last.fm/user/DrMorberg/
... Copied to Clipboard!
TheGoldenEel
03/08/24 5:38:49 PM
#96:


I'm working on a problem with swimming. in this video I posted earlier

https://youtu.be/ROE_ASyO4e8

you might notice that when you jump into the water at around 10 seconds, the character is slightly under the water, and then shortly after raises up (because I pressed the button to go up)

I want to prevent the player from "swimming" out of the top of the water, and I also want the player be able to jump if they're on the surface of the water. problem is when I jump into the water, the trigger that detects swimming doesn't always fire at the exact same time, so the height the player is at when they stop moving downward is always at slightly different places, just under the edge of the trigger. I'm detecting the top of the water by the point just where the player goes above the trigger. So there's a distance there that I'm trying to reconcile.

I'm thinking if I maybe perform a raycast down before the player enters the water, I can determine the exact top y value of the surface, and set that as the swimming max surface value? But that wouldn't allow for bodies of water with different heights at different places like underwater caves

idk of a better way to approach this

---
BLACK LIVES MATTER
Games: http://backloggery.com/wrldindstries302 \\ Music: http://www.last.fm/user/DrMorberg/
... Copied to Clipboard!
kirbymuncher
03/08/24 7:55:15 PM
#97:


TheGoldenEel posted...
But that wouldn't allow for bodies of water with different heights at different places like underwater caves
couldn't you just make these out of multiple bodies of water glued together? not like player would notice

---
THIS IS WHAT I HATE A BOUT EVREY WEBSITE!! THERES SO MUCH PEOPLE READING AND POSTING STUIPED STUFF
... Copied to Clipboard!
TheGoldenEel
03/08/24 8:04:52 PM
#98:


kirbymuncher posted...
couldn't you just make these out of multiple bodies of water glued together? not like player would notice
The specific method I mentioned would require the the player to enter the body of water from the top else it wouldnt know where the surface is

but maybe I could figure out a way to do it from under the surface raycasting up? Idk

---
BLACK LIVES MATTER
Games: http://backloggery.com/wrldindstries302 \\ Music: http://www.last.fm/user/DrMorberg/
... Copied to Clipboard!
TheGoldenEel
03/10/24 12:49:58 AM
#99:


Got save files that keep track of how many collectibles have been collected, and which specific ones, working.

I need to decide when is reasonable to save e.g. write the data to a json. Every time a collectible is picked up? is that overkill if a level has 100 beans to collect? Probably... to scale up I think I would need a less heavy-handed approach. Maybe just save at intervals, or at specific checkpoints?

---
BLACK LIVES MATTER
Games: http://backloggery.com/wrldindstries302 \\ Music: http://www.last.fm/user/DrMorberg/
... Copied to Clipboard!
TheGoldenEel
03/11/24 1:15:03 AM
#100:


Today I just worked on implementing a ui display with health and collectibles with a pause menu

its something I already did in a previous project I worked on so its basically just a matter of copy/pasting over a bunch of code.

---
BLACK LIVES MATTER
Games: http://backloggery.com/wrldindstries302 \\ Music: http://www.last.fm/user/DrMorberg/
... Copied to Clipboard!
Topic List
Page List: 1, 2, 3, 4, 5