• Ever wanted an RSS feed of all your favorite gaming news sites? Go check out our new Gaming Headlines feed! Read more about it here.
Status
Not open for further replies.

qq more

Member
Oct 25, 2017
3,781
Hey, I've finally released a demo of my indie game, Prototype N, that I've been working on for years. It's a short demo (one level) because I rebooted the game's development a few weeks ago and built it upon a more completed gameplay engine I've recently programmed.

arrietty.itch.io

Prototype N by Arrietty

A side-scroller shooting platformer! Featuring Nadine!

Some screenshots:
FBPIRe.png
M8Pjk%2B.png
 

Jintor

Saw the truth behind the copied door
Member
Oct 25, 2017
32,401
sick, looks megamanny. I'll give it a shot if I have a mo
 

BlazeHedgehog

Member
Oct 27, 2017
702
Long time no post, Indie Game Dev Era. Lately I have been lazily prodding at a terrible thing



This was originally envisioned as an April Fools joke of sort, inspired by the legit Digital Foundry Bubsy documentary from last year. I've always had a soft spot for Bubsy, though I wouldn't call myself an apologist or anything like that. Most Bubsy games are indeed pretty bad, and even that first game only really starts strong. Around the game's halfway point it becomes too difficult and janky to deal with.

But I've always wondered... what if somebody actually just, like, made a good Bubsy game? It's actually something I've wondered on an off for a really long time, to the point where at least a decade ago (probably more) I was considering looking in to who owned Bubsy and trying to put together a pitch. It never moved beyond idle day dreaming, though.

The only reason this exists now is because Sonic fans have all kinds of codebases and frameworks for implementing Sonic physics in a thing. So this is running in a heavily modified and stripped down version of Sonic Worlds, the same codebase that powered the first Freedom Planet and Spark the Electric Jester. Thus it was pretty easy to indulge my whim of importing Bubsy sprites over Sonic's, though at this stage quite a bit more work has gone in to it than just reusing Sonic stuff verbatim. I tore out lots of unnecessary code, tweaked the physics, wrote new abilities, coded like 11 different enemies, etc.

I ran out of steam hard once I missed the April 1st deadline, though. Lately I've been trying to force myself to go back to it, but I only usually put in a few minutes of work per day, fixing bugs and trying to figure out what Bubsy level design even is. Did you know that a lot of Bubsy levels don't really have much in the way of walls? As it turns out, that makes it weirdly difficult to design and pace levels for! I'm not sure I'm happy with the way the level in the above video plays, but I'm at a loss for what even is the right way. Making Bubsy levels is like nothing I'm used to.

Anyway maybe this'll come out some day. The original plan was to do 2-3 levels and a boss for April Fools, so maybe if I ever get to that point...
 

Mike Armbrust

Member
Oct 25, 2017
528
Hey, I've finally released a demo of my indie game, Prototype N, that I've been working on for years. It's a short demo (one level) because I rebooted the game's development a few weeks ago and built it upon a more completed gameplay engine I've recently programmed.

arrietty.itch.io

Prototype N by Arrietty

A side-scroller shooting platformer! Featuring Nadine!

Some screenshots:
That's your own engine? That's really cool!
Long time no post, Indie Game Dev Era. Lately I have been lazily prodding at a terrible thing



This was originally envisioned as an April Fools joke of sort, inspired by the legit Digital Foundry Bubsy documentary from last year. I've always had a soft spot for Bubsy, though I wouldn't call myself an apologist or anything like that. Most Bubsy games are indeed pretty bad, and even that first game only really starts strong. Around the game's halfway point it becomes too difficult and janky to deal with.

But I've always wondered... what if somebody actually just, like, made a good Bubsy game? It's actually something I've wondered on an off for a really long time, to the point where at least a decade ago (probably more) I was considering looking in to who owned Bubsy and trying to put together a pitch. It never moved beyond idle day dreaming, though.

The only reason this exists now is because Sonic fans have all kinds of codebases and frameworks for implementing Sonic physics in a thing. So this is running in a heavily modified and stripped down version of Sonic Worlds, the same codebase that powered the first Freedom Planet and Spark the Electric Jester. Thus it was pretty easy to indulge my whim of importing Bubsy sprites over Sonic's, though at this stage quite a bit more work has gone in to it than just reusing Sonic stuff verbatim. I tore out lots of unnecessary code, tweaked the physics, wrote new abilities, coded like 11 different enemies, etc.

I ran out of steam hard once I missed the April 1st deadline, though. Lately I've been trying to force myself to go back to it, but I only usually put in a few minutes of work per day, fixing bugs and trying to figure out what Bubsy level design even is. Did you know that a lot of Bubsy levels don't really have much in the way of walls? As it turns out, that makes it weirdly difficult to design and pace levels for! I'm not sure I'm happy with the way the level in the above video plays, but I'm at a loss for what even is the right way. Making Bubsy levels is like nothing I'm used to.

Anyway maybe this'll come out some day. The original plan was to do 2-3 levels and a boss for April Fools, so maybe if I ever get to that point...


As a person who's never played Bubsy, that looks pretty authentic. Maybe you could find the rights owner and make it official. Sometimes owners are pretty open towards new games.
 

PeterVenkman

Member
Oct 25, 2017
1,770
Weird Vector3.Distance question ahead: So we tried implementing a basic combo system in Unity last week and it works pretty well - it has a timer where you need to do a trick within a few seconds or you'll drop the combo. You also drop the combo if you crash. But as a bit of a more complex idea, we programed in a super basic "stale moves" calculator to encourage players to move around the map more. We basically just compare the jump position to the land position with Vector3.Distance:
Code:
 landVec = theBoard.GetComponent<Transform>().position;
                landVec.y = 0;
                var staleDist = Mathf.Round(Vector3.Distance(jumpVec, landVec));
And if that number is less than 1, then you haven't moved far enough so stale moves kicks in. This usually works well - at full speed, you can skate around and jump to get just above 0 and continue the combo. We're also setting y=0 for both jumpVec and landVec so that you can't just jump really high in the same spot and avoid the stale moves penalty.

The weird thing happens every once in awhile where you can jump in one area but get a staleDist of some absurd number - we're talking live well over 20 or 30, which should just be reserved for longer jumps. I can't seem to trigger it when jumping on the ground, only off jumps. But I thought zeroing out the y value would lock that problem off? So I'm at a bit of a loss since I can't always replicate this. Am I understanding Vector3.Distance correctly?

Console log showing the value for a series of jumps I did off the same jump - almost all of them 0 except one that's over 30...

FAAm93p.jpg


Bonus clip of it actually working, which is i dunno...75% of the time? Maybe more on just ground to ground jumps.

 

Bearwolf

Member
Oct 27, 2017
477
On a semi-related topic, anyone know of a windows application that tracks time spent in each software? I want to use this to track development, but all the software I look at you have to make "tasks" and enter manually. It would also be great if it didn't count idle time.
 
Oct 26, 2017
3,915
Weird Vector3.Distance question ahead: So we tried implementing a basic combo system in Unity last week and it works pretty well - it has a timer where you need to do a trick within a few seconds or you'll drop the combo. You also drop the combo if you crash. But as a bit of a more complex idea, we programed in a super basic "stale moves" calculator to encourage players to move around the map more. We basically just compare the jump position to the land position with Vector3.Distance:
Code:
 landVec = theBoard.GetComponent<Transform>().position;
                landVec.y = 0;
                var staleDist = Mathf.Round(Vector3.Distance(jumpVec, landVec));
And if that number is less than 1, then you haven't moved far enough so stale moves kicks in. This usually works well - at full speed, you can skate around and jump to get just above 0 and continue the combo. We're also setting y=0 for both jumpVec and landVec so that you can't just jump really high in the same spot and avoid the stale moves penalty.

The weird thing happens every once in awhile where you can jump in one area but get a staleDist of some absurd number - we're talking live well over 20 or 30, which should just be reserved for longer jumps. I can't seem to trigger it when jumping on the ground, only off jumps. But I thought zeroing out the y value would lock that problem off? So I'm at a bit of a loss since I can't always replicate this. Am I understanding Vector3.Distance correctly?

Console log showing the value for a series of jumps I did off the same jump - almost all of them 0 except one that's over 30...

FAAm93p.jpg


Bonus clip of it actually working, which is i dunno...75% of the time? Maybe more on just ground to ground jumps.



Can you post the whole code involved in getting the vectors?

Also, in your debug log output the values of the vectors, not just the result. It might be the case that your Y clamp is not working as you expect.
 

Weltall Zero

Game Developer
Banned
Oct 26, 2017
19,343
Madrid
I've been banned for just a week and you guys already post too much cool stuff to reply to everything, hahah.

Weird Vector3.Distance question ahead: So we tried implementing a basic combo system in Unity last week and it works pretty well - it has a timer where you need to do a trick within a few seconds or you'll drop the combo. You also drop the combo if you crash. But as a bit of a more complex idea, we programed in a super basic "stale moves" calculator to encourage players to move around the map more. We basically just compare the jump position to the land position with Vector3.Distance:
Code:
 landVec = theBoard.GetComponent<Transform>().position;
                landVec.y = 0;
                var staleDist = Mathf.Round(Vector3.Distance(jumpVec, landVec));
And if that number is less than 1, then you haven't moved far enough so stale moves kicks in. This usually works well - at full speed, you can skate around and jump to get just above 0 and continue the combo. We're also setting y=0 for both jumpVec and landVec so that you can't just jump really high in the same spot and avoid the stale moves penalty.

The weird thing happens every once in awhile where you can jump in one area but get a staleDist of some absurd number - we're talking live well over 20 or 30, which should just be reserved for longer jumps. I can't seem to trigger it when jumping on the ground, only off jumps. But I thought zeroing out the y value would lock that problem off? So I'm at a bit of a loss since I can't always replicate this. Am I understanding Vector3.Distance correctly?

Console log showing the value for a series of jumps I did off the same jump - almost all of them 0 except one that's over 30...

FAAm93p.jpg


Bonus clip of it actually working, which is i dunno...75% of the time? Maybe more on just ground to ground jumps.



Are you zeroing jumpVec's y too? I don't see it in your code, and if you're not, that would account for the disparity between the two. Otherwise, you need to log the result of the substraction itself, not just the distance, to see which vector component is the one contributing to the unexpected distance, and go from there. Just knowing if it's the y, as opposed to x/z, will let you zero in on the issue.
 

Poodlestrike

Smooth vs. Crunchy
Administrator
Oct 25, 2017
13,489
I... have... a fully functional combat algorithm ahhhhhhhhh

Now I need to get combat visualization and unit control up and working and I'll be in business and ready to start making content. Holy shit.
 

Jintor

Saw the truth behind the copied door
Member
Oct 25, 2017
32,401
i've got enough systems down i need to actually start thinking about what my combat system is going to be. now ripping sprites from other games to slot into things so I can figure it out lmao because turns out you can't tune gamefeel without some placeholder animations and i'm way too lazy to animate stuff without know how it will feel first
 

PeterVenkman

Member
Oct 25, 2017
1,770
Can you post the whole code involved in getting the vectors?

Also, in your debug log output the values of the vectors, not just the result. It might be the case that your Y clamp is not working as you expect.
Are you zeroing jumpVec's y too? I don't see it in your code, and if you're not, that would account for the disparity between the two. Otherwise, you need to log the result of the substraction itself, not just the distance, to see which vector component is the one contributing to the unexpected distance, and go from there. Just knowing if it's the y, as opposed to x/z, will let you zero in on the issue.

I had a friend help out last night and debugging all three Vector3 values is exactly where we started - turns out the higher numbers are the correct values whereas the 0s and 1s were incorrect. I was correctly zeroing the y on both jump and land, but I wasn't assigning the jump value at the right moment in my code. So instead of checking for values greater than 0, I needed to be looking for values greater than like 120.

tldr is that I tripped on my own spaghetti code and debug logging saved the day.
 

Frobert

Member
Oct 28, 2017
188
Hey all, been lurking a long time because I love seeing the different projects people are working on. Hoping to be more active here and participate more in the future!

I want to share some experiences I'm currently having with porting a project from GameMaker Studio to Unity. My team (just me and another) has been building our project in GameMaker for a while now and have been approaching a point where we could show it to the public, but our code is...a little all over the place. With the new GML features in public beta we thought now would be a good time to refactor a bunch of stuff, but we first wanted to experiment with porting the game to Unity since we'd be looking at major rewrites either way. And I've gotta say, I feel like Unity makes development SO much easier.

Part of it, I'm sure, is that I had quite a bit of experience coding before jumping into GMS. I always felt like I was very slow coding in GML, like I could never just do things how I was used to and had to always rethink my approach to make it work with GameMaker. I could always find a way, but that becomes draining after a while.

Aside from that, though, Unity has a lot of nice features. Being able to easily create lights is great and adds so much to our environments. The GameObject and Component system seems a lot more flexible and friendly than how GameMaker handles objects.

It helps that we're recreating something rather than building from scratch, but development just seems so much faster for me in Unity. Even with the time lost by porting it, I can see the project being finished much earlier (and at higher quality).

I think the biggest thing honestly is that GML just never felt natural to me, and so coding always felt a little bit like a chore.

Quick Googling suggested to me that porting a project to Unity from GameMaker or another tool isn't entirely uncommon. Has anyone else here done something like this? Is this a bad idea and a waste of time?
 

SaberVS7

Member
Oct 25, 2017
5,234
Well, a large part of the problem is that, despite the engine revolving around "Objects", GML is just plain not a proper Object Oriented language. They can add Methods and stuff like that, but as long as it's still based around putting all the code in Events on Objects instead of in Classes with proper full-featured Polymorphism, it'll still have the same core problems inherent to the baseline for GML coming from the easy-to-use-for-beginners nature of the Drag-and-Drop visual-scripting that GM was original built around.

I know some people meme the hell out of a certain Hitman clone's bad code, but they'd have a heart-attack if they saw the kind of design patterns GML scripting forces coders into.

I'm still in absolute amazement that Hyper Light Drifter and Heat Signature were developed in GameMaker, given just how ambitious they were in comparison to other successful GM games like Hotline Miami.
 
Last edited:
Oct 26, 2017
3,915
debug logging saved the day

This is still true 7 years into my carreer. Glad you got it figured out!

Quick Googling suggested to me that porting a project to Unity from GameMaker or another tool isn't entirely uncommon. Has anyone else here done something like this? Is this a bad idea and a waste of time?

Its not uncommon at all. Unity is a fair bit more scalable than GM, particularly when you want to target additional platforms.

That said, with Unity you need to be super, super careful with your code. Make sure you're not doing uncecessary allocations and you understand where allocations happen in your code otherwise the garbage collector can really screw you up if you decide to target lower-powered platforms such as mobile.
 

jarekx

Member
Oct 25, 2017
623
Ahhhhh, setup a way to progress through the floors. Game now has a basic loop where you can proceed through three floors of fights. Not much, but it works and it's becoming less and less toy-like and more and more game-like. Really, all i need to have something that's 'playable' is:

title screen and end screen,
game over (lol),
change the shops / bonus rooms to be less static and have an assortment of items pulled from a list specific to that floor / whatever.
and thats it?



I mean it'll have no sound unless I just go and grab some free music to throw in, and no sprites cause I'm just focusing on the raw game...but it'll be enough to test out and really know for sure how I feel about it. It's the furthest I've taken something in a while, so I'm hoping it'll prove interesting enough to me to continue with it.
 

Weltall Zero

Game Developer
Banned
Oct 26, 2017
19,343
Madrid
Ahhhhh, setup a way to progress through the floors. Game now has a basic loop where you can proceed through three floors of fights. Not much, but it works and it's becoming less and less toy-like and more and more game-like. Really, all i need to have something that's 'playable' is:

title screen and end screen,
game over (lol),
change the shops / bonus rooms to be less static and have an assortment of items pulled from a list specific to that floor / whatever.
and thats it?

I mean it'll have no sound unless I just go and grab some free music to throw in, and no sprites cause I'm just focusing on the raw game...but it'll be enough to test out and really know for sure how I feel about it. It's the furthest I've taken something in a while, so I'm hoping it'll prove interesting enough to me to continue with it.

I think I've already said that but I find it so admirable (and enviable) that you're able to focus on gameplay and ignore the aesthetics until the end. This is, of course, the "ideal" way to develop games, for several reasons:
- Much smaller time investment makes scrapping ideas that don't work less painful.
- Rapid iteration.
- Aesthetics cannot distract from gameplay faults.
- Easy to change the game's entire theme, especially if gameplay evolution offers a key insight (like your proposed "school" theme).

And yet I don't think most developers, sadly including myself, are able to resist the siren's call of prettifying it up to feel validated. I really, really envy your ability to focus on pure gameplay first, and I have no doubt this will result in an extraordinary game as a result.

They say one way to work that skill is to participate in game jams; I find the very thought stressing, but perhaps I should try to make several tiny games before I commit to a bigger one after Divinoids.
 

HayaoYamaneko

Member
Feb 15, 2018
205
In Unity, I created a player shadow by duplicating the player sprite, making it black and adjusting transparency.

How can I get this shadow to use the player animator controller so that its movements are synced up? I thought it might be as simple as childing the shadow game object to the player and then applying the player animator controller to the shadow, but no dice. I know the animator controller is sort of working, because I can see it cycle through my idle animation (character blinks) in the inspector, but it's not registering any directional movement. Could it have something to do with my movement script, which uses rigidbody?
 
Last edited:

Weltall Zero

Game Developer
Banned
Oct 26, 2017
19,343
Madrid
In Unity, I created a player shadow by duplicating the player sprite, making it black and adjusting transparency.

How can I get this shadow to use the player animator controller so that its movements are synced up? I thought it might be as simple as childing the shadow game object to the player and then applying the player animator controller to the shadow, but no dice. I know the animator controller is sort of working, because I can see it cycle through my idle animation (character blinks) in the inspector, but it's not registering any directional movement. Could it have something to do with my movement script, which uses rigidbody?

I would recommend you removed the animation controller from the shadow entirely, and instead added a small script that sets its sprite to be the same as the main character each frame instead. Literally just shadowSpriteRenderer.sprite = mainCharacterSpriteRenderer.sprite during LateUpdate ().

I'm however slightly confused by one thing. Are you moving your character or otherwise affecting its rigidBody through your animator / animations?
 

HayaoYamaneko

Member
Feb 15, 2018
205
I would recommend you removed the animation controller from the shadow entirely, and instead added a small script that sets its sprite to be the same as the main character each frame instead. Literally just shadowSpriteRenderer.sprite = mainCharacterSpriteRenderer.sprite during LateUpdate ().

I'm however slightly confused by one thing. Are you moving your character or otherwise affecting its rigidBody through your animator / animations?

I am not, but I will go back and review my animator controller and code just to make sure I haven't done anything dumb. I did cobble it together from different tutorials, so there might be conflicting approaches in there.

Thanks for the tip, I'll make a small script.

Edit: Worked like a charm, thanks again Weltall Zero
 
Last edited:

Jintor

Saw the truth behind the copied door
Member
Oct 25, 2017
32,401
well good to find out the way I was envisioning my moves to work doesn't actually work because of x y and z lol. I need to rethink my control scheme... at least I can see my 3 move sequential input buffer does actually work. Probably should refactor the way my state cancelling system works so I don't have to copy-paste code everywhere... probably time to write up a script...
 

Jintor

Saw the truth behind the copied door
Member
Oct 25, 2017
32,401
Hmmm, can you elaborate? I'm curious now, and maybe writing about it will help you come up with a solution.

I think I have a few ideas to try out already but I need to think on it a bit more and look at other contempories in the field (and actually write down what their control schemes are like instead of just trying to keep it all in my head)

But basically the issue is I was hoping I could have two bottons for attacks (call them P and K using bayonetta notation) and with special attacks by using combos ofDownP, LeftP/RightP, and UpP etc. That works fine for down and up cos in my game you're not normally using those buttons, but it turns out the way that 'feels right' to play at the moment causes lots of button misreads.

Also my bloody inputComboReader is broken slightly but that's just because I haven't tuned it properly yet to reduce the input window, figure out how to account for button holds, etc.

this is what happens when you just patchwork together solutions. On the other hand, I wouldn't have a handle for gamefeel if I didn't do the patchworking, so... ah well. That's what experimentation is for!

I haven't even rigged up the inputManager framework yet so I can test it with a gamepad. Gonna cause some headaches trying to figure out how to get the LStick to read '180, return to neutral, 180' as a single input...

anyway, check this



I think I need to pause for a while on dev implementation anyway, I'm burning out a little. Need to go back to planning.
 
Last edited:

Weltall Zero

Game Developer
Banned
Oct 26, 2017
19,343
Madrid
I am not, but I will go back and review my animator controller and code just to make sure I haven't done anything dumb. I did cobble it together from different tutorials, so there might be conflicting approaches in there.

Thanks for the tip, I'll make a small script.

Edit: Worked like a charm, thanks again Weltall Zero

Glad to help! :)

I think I have a few ideas to try out already but I need to think on it a bit more and look at other contempories in the field (and actually write down what their control schemes are like instead of just trying to keep it all in my head)

But basically the issue is I was hoping I could have two bottons for attacks (call them P and K using bayonetta notation) and with special attacks by using combos ofDownP, LeftP/RightP, and UpP etc. That works fine for down and up cos in my game you're not normally using those buttons, but it turns out the way that 'feels right' to play at the moment causes lots of button misreads.

Also my bloody inputComboReader is broken slightly but that's just because I haven't tuned it properly yet to reduce the input window, figure out how to account for button holds, etc.

this is what happens when you just patchwork together solutions. On the other hand, I wouldn't have a handle for gamefeel if I didn't do the patchworking, so... ah well. That's what experimentation is for!

I haven't even rigged up the inputManager framework yet so I can test it with a gamepad. Gonna cause some headaches trying to figure out how to get the LStick to read '180, return to neutral, 180' as a single input...

anyway, check this



I think I need to pause for a while on dev implementation anyway, I'm burning out a little. Need to go back to planning.


Is the issue that you inadvertently perform forward + P when you just meant to get closer to an enemy and do neutral + P? This happens a lot in so many games; I just went with "forward + attack and back + attack are the same as neutral + attack" (except for one of the characters while he's climbing, since he can't move horizontally).

One thing that helps is using diagonals. E.g. for one of my characters, down-forward + attack is different than down + attack. That does work surprisingly well, and is also pretty satisfying.
 

Mike Armbrust

Member
Oct 25, 2017
528
In November I went to my first and currently only developer event and showed the terrain system running on PS4 Pro.

WKv6VG8l.jpg


Was great and made me want to get more involved in the developer community. That of course has been difficult recently with the pandemic, so I switched gears and publicly "not announced" my game: https://vizioneck.com/games/forged_odyssey

Obviously I've already been talking publicly about it for years but this way it's actually easy to find instead of being tucked away in random places.

foherologo.png


I also changed the game's name and made a non placeholder logo ("Mike Armbrust Presents" is still a placeholder). I changed the name to make it shorter, a bit more thematically interesting, and less legally questionable from a trademark point of view.
 

Qwark

Member
Oct 27, 2017
8,017


I haven't done Screenshot Saturday in a while, but I've still been hard at work. Not a lot of graphical updates, but been working on usability. Finally got a working UI in place with win/lose conditions so there's actually a "game". Also got touch pan/zoom controls so it's fully playable on mobile. Pan wasn't too hard to get implemented, but pinch zoom was very finicky. GMS2 has built in gestures but I'm working on GMS1 (cuz Vita) so I had to figure that out myself. It still feels a bit sensitive, but I'm fairly happy with it so far.

Next up, going to work on a stats system and have the enemies attack back so it's actually an RPG with at least some difficulty.
 

Jintor

Saw the truth behind the copied door
Member
Oct 25, 2017
32,401
Is the issue that you inadvertently perform forward + P when you just meant to get closer to an enemy and do neutral + P? This happens a lot in so many games; I just went with "forward + attack and back + attack are the same as neutral + attack" (except for one of the characters while he's climbing, since he can't move horizontally).

One thing that helps is using diagonals. E.g. for one of my characters, down-forward + attack is different than down + attack. That does work surprisingly well, and is also pretty satisfying.

yeah basically something along those lines. The thing is i'm not 100% on how I want my game to control anyway, so it's worth fucking around for the moment in any event
 

Saybrook

Member
May 1, 2019
28
Cleveland OH
Hey, I've finally released a demo of my indie game, Prototype N, that I've been working on for years. It's a short demo (one level) because I rebooted the game's development a few weeks ago and built it upon a more completed gameplay engine I've recently programmed.

arrietty.itch.io

Prototype N by Arrietty

A side-scroller shooting platformer! Featuring Nadine!

Some screenshots:
Just gave this a play. It is coming along great so far! Once you create more levels I would make the secret areas a little harder to locate. I loved the part near the end where you continued to jump higher on the springboard. It would be neat to see a level with a number of those with obstacles and enemies in between.
 
Oct 26, 2017
3,915
Hey folks, sorry for not giving you more prior warning (I have been very busy these past few weeks...career things :/) but I wanted to let you all know / give you a reminder that the next "Pitch Ya Game" event will be happening on twitter on the 28th July

"Pitch Ya Game" is a cool new incentive to get more visibility to various indie games in development. Essentially, you come up with a short pitch for your game (That fits in a twitter post), attach some screenshots or gifs, and then post it along with the #pitchyagame hashtag.

I've done this twice now, and so far it has ended up getting me a lot more visibility on my game than I typically would from a general twitter post in the #gamedev etc. tags. Remember you can always add additional hashtags in with the PYG one too for extra exposure!

I'd really recommend it to everyone, even if you don't think your game is "ready" to present just yet, it doesn't matter! Get it in front of people and get it into their brains!

More details can be found here (Including times) at the PYG website

Good luck everyone!
 

Jintor

Saw the truth behind the copied door
Member
Oct 25, 2017
32,401
Is the issue that you inadvertently perform forward + P when you just meant to get closer to an enemy and do neutral + P? This happens a lot in so many games; I just went with "forward + attack and back + attack are the same as neutral + attack" (except for one of the characters while he's climbing, since he can't move horizontally).

so i bandaged in a really basic solution

basically there's two ways of getting the ForwardB input, you can input it fresh (two inputs w/in x frames of each other are counted as simultaneous) or you can cheat by hitting B while forward is already being held down. The second method is the problem that was triggering when you wanted to just walk forward and do neutralP

So I just told the inputHandler to stop listening for the second input when the player is in 'walk' state. So you can still enter into a ForwardB from walk, but you need to be more deliberate about it (well more precisely it dumps you back into idle for a few frames since you let go of the forward input to enter it again, but whatever)

It's not perfect since you can still hold forward mid-combo, but I think that's closer to 'intended behaviour' rather than for the start. I had to disable being able to cancel into it for the first frames of the neutralB state, but whatever.
 

PeterVenkman

Member
Oct 25, 2017
1,770
Hey folks, sorry for not giving you more prior warning (I have been very busy these past few weeks...career things :/) but I wanted to let you all know / give you a reminder that the next "Pitch Ya Game" event will be happening on twitter on the 28th July

"Pitch Ya Game" is a cool new incentive to get more visibility to various indie games in development. Essentially, you come up with a short pitch for your game (That fits in a twitter post), attach some screenshots or gifs, and then post it along with the #pitchyagame hashtag.

I've done this twice now, and so far it has ended up getting me a lot more visibility on my game than I typically would from a general twitter post in the #gamedev etc. tags. Remember you can always add additional hashtags in with the PYG one too for extra exposure!

I'd really recommend it to everyone, even if you don't think your game is "ready" to present just yet, it doesn't matter! Get it in front of people and get it into their brains!

More details can be found here (Including times) at the PYG website

Good luck everyone!

this is seriously cool, thanks for posting this. Gives me some incentive to finish a gameplay trailer by then.
 

iHeartGameDev

Member
Feb 22, 2019
1,114
Hey everyone! It has been quite a while since I shared here. Almost a month! I've been hard at work on my tutorial series for Unity's animation system. I just released a brand new tutorial covering one dimensional blend trees. It's a pretty thorough breakdown! I hope this helps some of the newer devs here 💛

 

PeterVenkman

Member
Oct 25, 2017
1,770
Unity will try to run your physics update at least as often as you tell it to. I believe this is 50 times per second by default

Things get really ugly really fast when either your physics are costly enough, or the hardware running it is underpowered enough, that your game can't keep up with that. Because the physics update is always running late, and it's actually running more often than frames are updated, it starts taking significant time away from the frame refresh. In the worst case scenario, physics themselves take all the CPU time leaving none for frame updates, meaning the game becomes a slideshow.

One solution you can try to solve this is to simply increase the physics step. Go to Edit -> Project Settings -> Time and increase Fixed Timestep (don't change Maximum Timestep, it's unlikely your game will ever hit that long in physics calculation). The higher the value, the less often Unity will calculate physics, and the less often FixedUpdate will be called. Unity interpolates and takes into account the time step for all its physics calculations so it should work fine; you may just lose a bit of precision.

Of course, this is assuming you're doing all of your FixedUpdate calculations by using Time.fixedDeltaTime as a factor of everything that is time-sensitive. If you don't, your physics code will run in slow motion when you change the timestep.

Revisiting this Fixed Timestep issue - changing the default value from .02 to something like .03 or .04 makes the game playable on laptops, which is great - the resulting issue though is that the actual player physics seem to be less accurate in a way I haven't been able to solve. I can take some screen recordings to demonstrate, but the issue is that the player will bounce off objects that they should be sliding on. Hitting a ramp at full speed on .04 will cause the player to ricochet off instead of smoothly sliding up the ramp on .02.

I've tried changing physics materials, changed sizes of the colliders, messed with the player physics settings but haven't had any positive results.
 
Oct 26, 2017
3,915
Hey everyone! It has been quite a while since I shared here. Almost a month! I've been hard at work on my tutorial series for Unity's animation system. I just released a brand new tutorial covering one dimensional blend trees. It's a pretty thorough breakdown! I hope this helps some of the newer devs here 💛



Another good one dude, keep it up! I'm not too familiar with Unity's blend spaces (and actually Unity's 3D anim system in general). Does it have support for event-track based animation sync? If so, that would be a good next tutorial if you don't already have one planned!

Revisiting this Fixed Timestep issue - changing the default value from .02 to something like .03 or .04 makes the game playable on laptops, which is great - the resulting issue though is that the actual player physics seem to be less accurate in a way I haven't been able to solve. I can take some screen recordings to demonstrate, but the issue is that the player will bounce off objects that they should be sliding on. Hitting a ramp at full speed on .04 will cause the player to ricochet off instead of smoothly sliding up the ramp on .02.

I've tried changing physics materials, changed sizes of the colliders, messed with the player physics settings but haven't had any positive results.

Yea, you don't really ever want to change that timestep unless you're very experienced working with physics systems. Pretty much every tutorial, example etc. under the sun for any physics simulation says something along the lines of "Changing the timestep of your physics simulation can result in unintented behaviors", which seems to be what you're encountering! 😂

As for your low FPS issues, lets split this into two parts:

1) Your physics logic appears to be frame-rate dependent, which is not what you expected
2) You get low FPS when playing on less powerful devices.

Both of these are going to be quite tricky to figure out. I can suggest some things you may want to look for and some fairly brute-force debugging methods. So:

Physics Sim inconsistency:

I think you're on the right track, making sure that your forces are all being applied in the Fixedupdate and not in the regular update. Check forces being applied as a response to input too! Also make sure that the logic you carry out in the fixedupdate is as minimal as possible. You really don't want to be coding in here unless its absolutely necessary. Don't do any input processing, calculations etc. as that should all be done in the regular update tick. Basically you just want to be applying forces and not really much else.

As for debugging, I would suggest doing something incredibly destructive to try and pinpoint your problem (I do this all the time, both personally and professionally so don't worry about it seeming a bit sketchy). Try commenting out everything in your fixed update except for a very basic physics instruction (e.g Apply a force based on the Fwd vector). Now run the game on the low-power device. If the frame rate is low, are the physics still behaving as you might expect? If so, start uncommenting things bit by bit and try again, see where the issue occurs!

However, if the issue does occur, then it means that the problem is elsewhere (likely due to things stemming from non fixedupdate methods). Just do the same there, comment everything out and re-enable it bit by bit. See what is screwing you over.

Low FPS on less power devices

Annoyingly, this could be due to many things. The first thing I always tell people to check (because Unity is NOTORIOUS for this) is GC Allocations (Garbage Collection). After that, check for OnGUI related calls. If you have any of those, get rid of them because they're awful and end up making a ridiculous amount of uneccessary draw-calls. Use a plug-in UI solution instead. Finally, comment out all your debug logs. These can absolutely tank the framerate!

After that, we're going to have to run this through a profiler. Have a read over this link to get familiar with how the profiler works, it can be a little confusing but essentially it will tell you where all the time is being spent during processing of a tick.


Here's an example of what mine looks like:
4MaNNaW.png


There's a lot to take in here so here are some tips:
  • Under "CPU Usage", you can click the coloured icons to turn on/off their display int he grpah (e.g in my case I dont care about Global Illumiation, UI etc. So I' m not looking at them)
  • Whilst "CPU Usage" is selected, Select the "Heirarchy" view mode just above the details panel. You can then click on a colum to sort based on that.
    • Sort by Time ms to find out which methods are taking the longest time to process
    • Sort by GC Alloc to find out where all your garbace collection allocations are being made.
      • This one can be a bit cryptic. It tells you the function in which they are being made but not the exact line. You'll have to comment out things line by line and then look and see if the number of allocations goes down, if you're unfamiliar with how to spot them. Once you've found them, either give me a shout or google "X METHOD without allocations c#" and you should hopefully find an answer

Hope that helps, let me know how you get on!
 

iHeartGameDev

Member
Feb 22, 2019
1,114
Another good one dude, keep it up! I'm not too familiar with Unity's blend spaces (and actually Unity's 3D anim system in general). Does it have support for event-track based animation sync? If so, that would be a good next tutorial if you don't already have one planned!

Thank you HandsomeCharles! :) I just looked up what even-track based animation is, and it appears that there's something similar to it. https://docs.unity3d.com/540/Documentation/Manual/animeditor-AnimationEvents.html

I've never used it, but it does seem pretty awesome!
 
Oct 26, 2017
3,915
Keeping you all in the loop:

#PitchYaGame has been rescheduled to 29th July

In response to the #NoSafeSpaceForJewHate hashtag (Which is a 48 hour twitter silence in protest of their inaction on antisemitism), PYG is being postponed until a day later , the 29th July. The timings remain the same. If you have scheduled any tweets (as I have), best update them now!
 

Weltall Zero

Game Developer
Banned
Oct 26, 2017
19,343
Madrid
Keeping you all in the loop:

#PitchYaGame has been rescheduled to 29th July

In response to the #NoSafeSpaceForJewHate hashtag (Which is a 48 hour twitter silence in protest of their inaction on antisemitism), PYG is being postponed until a day later , the 29th July. The timings remain the same. If you have scheduled any tweets (as I have), best update them now!

Thanks for the heads up. Let's hope it leads to something, Twitter is (glacially) moving in the right direction by banning shit like QAnon.

Regarding PitchYaGame, I'm wondering if I should embed my full trailer? I feel it would be more eye catching than any one gif or short video of my game, but it's obviously also much longer...
 
Oct 26, 2017
3,915
Thanks for the heads up. Let's hope it leads to something, Twitter is (glacially) moving in the right direction by banning shit like QAnon.

Regarding PitchYaGame, I'm wondering if I should embed my full trailer? I feel it would be more eye catching than any one gif or short video of my game, but it's obviously also much longer...

Well, this is a great opportunity to experiment! Videos have the disadvantage of not auto-playing on twitter but obviously can be much higher quality than a gif. I'd say give it a go and see what the results are!
 

PeterVenkman

Member
Oct 25, 2017
1,770
Another good one dude, keep it up! I'm not too familiar with Unity's blend spaces (and actually Unity's 3D anim system in general). Does it have support for event-track based animation sync? If so, that would be a good next tutorial if you don't already have one planned!



Yea, you don't really ever want to change that timestep unless you're very experienced working with physics systems. Pretty much every tutorial, example etc. under the sun for any physics simulation says something along the lines of "Changing the timestep of your physics simulation can result in unintented behaviors", which seems to be what you're encountering! 😂

As for your low FPS issues, lets split this into two parts:

1) Your physics logic appears to be frame-rate dependent, which is not what you expected
2) You get low FPS when playing on less powerful devices.

Both of these are going to be quite tricky to figure out. I can suggest some things you may want to look for and some fairly brute-force debugging methods. So:

Physics Sim inconsistency:

I think you're on the right track, making sure that your forces are all being applied in the Fixedupdate and not in the regular update. Check forces being applied as a response to input too! Also make sure that the logic you carry out in the fixedupdate is as minimal as possible. You really don't want to be coding in here unless its absolutely necessary. Don't do any input processing, calculations etc. as that should all be done in the regular update tick. Basically you just want to be applying forces and not really much else.

As for debugging, I would suggest doing something incredibly destructive to try and pinpoint your problem (I do this all the time, both personally and professionally so don't worry about it seeming a bit sketchy). Try commenting out everything in your fixed update except for a very basic physics instruction (e.g Apply a force based on the Fwd vector). Now run the game on the low-power device. If the frame rate is low, are the physics still behaving as you might expect? If so, start uncommenting things bit by bit and try again, see where the issue occurs!

However, if the issue does occur, then it means that the problem is elsewhere (likely due to things stemming from non fixedupdate methods). Just do the same there, comment everything out and re-enable it bit by bit. See what is screwing you over.

Low FPS on less power devices

Annoyingly, this could be due to many things. The first thing I always tell people to check (because Unity is NOTORIOUS for this) is GC Allocations (Garbage Collection). After that, check for OnGUI related calls. If you have any of those, get rid of them because they're awful and end up making a ridiculous amount of uneccessary draw-calls. Use a plug-in UI solution instead. Finally, comment out all your debug logs. These can absolutely tank the framerate!

After that, we're going to have to run this through a profiler. Have a read over this link to get familiar with how the profiler works, it can be a little confusing but essentially it will tell you where all the time is being spent during processing of a tick.


Here's an example of what mine looks like:
4MaNNaW.png


There's a lot to take in here so here are some tips:
  • Under "CPU Usage", you can click the coloured icons to turn on/off their display int he grpah (e.g in my case I dont care about Global Illumiation, UI etc. So I' m not looking at them)
  • Whilst "CPU Usage" is selected, Select the "Heirarchy" view mode just above the details panel. You can then click on a colum to sort based on that.
    • Sort by Time ms to find out which methods are taking the longest time to process
    • Sort by GC Alloc to find out where all your garbace collection allocations are being made.
      • This one can be a bit cryptic. It tells you the function in which they are being made but not the exact line. You'll have to comment out things line by line and then look and see if the number of allocations goes down, if you're unfamiliar with how to spot them. Once you've found them, either give me a shout or google "X METHOD without allocations c#" and you should hopefully find an answer

Hope that helps, let me know how you get on!

This was an incredibly helpful post - thank you for breaking down so many different systems for me; I'll certainly be referencing this again in the future. I started by just commenting out everything in the scene, and eventually expanded to disabling objects until I was left with pretty much a player on an empty ground plane. The culprit appears to be the colliders on my player character, which I admit are a bit of a mess. The character is made up of two large sphere colliders in the parent object, while the skateboard has four "wheels" in the child object. Disabling these four physical wheel colliders solves the unexpected physics behavior at low framerates. (As an aside - the whole mess is supposed to act as a bottom-heavy object that wobbles, but once all four wheels touch the ground, the object rights itself. It works great, apparently as long as your performance is high)

But I'm not sure why? The parent has a rigidbody while the children do not. Both have physics materials, as does the ground, and both have average or low friction. Why would the player be "stuck" and unable to rotate at lower framerates? So far I've tried moving the wheels to make sure they don't intersect with the other player objects, lowered/removed friction materials, changing collider sizes, etc. and the only thing that works is disabling the colliders completely.
 

jarekx

Member
Oct 25, 2017
623
Keeping you all in the loop:

#PitchYaGame has been rescheduled to 29th July

In response to the #NoSafeSpaceForJewHate hashtag (Which is a 48 hour twitter silence in protest of their inaction on antisemitism), PYG is being postponed until a day later , the 29th July. The timings remain the same. If you have scheduled any tweets (as I have), best update them now!

Sweet, might have something playable enough to put on itch and try to get some feedback on it.
Still, wanna work out a couple gameplay things that bother me such as:

I hardly add new numbers to the deck. Right now, using the event to upgrade a number in certain ways (add, subtract,divide, multiply) just seems better, even if the choices are random. You also get gold to buy skills if you choose not to add it to the deck, so maybe an incentive to having more stuff in your deck might work. I'm thinking maybe the total could be your HP. Or it may be as simple as adding a relic system like slay the spire and some of those buffs be tied to cards in your deck in that way. So you could gain starting shield for each card in your deck, bonus hp like before, things like that.

Oh, and multiply seems too strong from that event. Just using the basic sword which can accept three cards, I was able to steam through things. So balance is definitely off. I'll definitely need to scale enemies better as I go along.

I mean, I guess it's not NEEDED right now, but it's just on my mind while testing stuff out. lol
 
Oct 26, 2017
3,915
This was an incredibly helpful post - thank you for breaking down so many different systems for me; I'll certainly be referencing this again in the future. I started by just commenting out everything in the scene, and eventually expanded to disabling objects until I was left with pretty much a player on an empty ground plane. The culprit appears to be the colliders on my player character, which I admit are a bit of a mess. The character is made up of two large sphere colliders in the parent object, while the skateboard has four "wheels" in the child object. Disabling these four physical wheel colliders solves the unexpected physics behavior at low framerates. (As an aside - the whole mess is supposed to act as a bottom-heavy object that wobbles, but once all four wheels touch the ground, the object rights itself. It works great, apparently as long as your performance is high)

But I'm not sure why? The parent has a rigidbody while the children do not. Both have physics materials, as does the ground, and both have average or low friction. Why would the player be "stuck" and unable to rotate at lower framerates? So far I've tried moving the wheels to make sure they don't intersect with the other player objects, lowered/removed friction materials, changing collider sizes, etc. and the only thing that works is disabling the colliders completely.


My first thought was intersections perhaps causing some issues, but If you have moved the colliders into "debug" positions to prevent that collision and the issue is still happening, I would presume that the issue lies elsewhere. (As a side note, if you want to prevent "self collision", you can take a look at this: https://docs.unity3d.com/Manual/LayerBasedCollision.html)

Physics isn't my specialty, I only know a bit about it but something I'm a little suspicious of is the logic you spoke about for righting the player when all the wheels are on the ground. It could potentially be this, or indeed any other logic that relates to physics callbacks, checks etc. that would normally be skipped if the wheels are not present. It could be that you are doing something very computationally expensive there.

It's probably time to try out the profiler anyway. It super easy to do, just open the window and hit play in the Unity scene. If that doesn't give you enough info just post a screenshot of the Hierarchy and I'll see if I can point you in the right direction
 

PeterVenkman

Member
Oct 25, 2017
1,770
My first thought was intersections perhaps causing some issues, but If you have moved the colliders into "debug" positions to prevent that collision and the issue is still happening, I would presume that the issue lies elsewhere. (As a side note, if you want to prevent "self collision", you can take a look at this: https://docs.unity3d.com/Manual/LayerBasedCollision.html)

Physics isn't my specialty, I only know a bit about it but something I'm a little suspicious of is the logic you spoke about for righting the player when all the wheels are on the ground. It could potentially be this, or indeed any other logic that relates to physics callbacks, checks etc. that would normally be skipped if the wheels are not present. It could be that you are doing something very computationally expensive there.

It's probably time to try out the profiler anyway. It super easy to do, just open the window and hit play in the Unity scene. If that doesn't give you enough info just post a screenshot of the Hierarchy and I'll see if I can point you in the right direction

I thought the same about overlapping colliders, but I think I ruled it out by placing the wheels so far away from the player that there's no chance they were intersecting. I can re check the player righting code, but if I remember correctly it was all disabled during my tests last night.

Curiously, I've attempted to disable the wheels and just push forward on the player's single circle collider and even then my player's acceleration is slower on my laptop vs. desktop. That's what has me thinking it's friction related, but I have been at this so long that I might just be losing my sanity. I did try changing the friction type to One and Two sided in the player settings, and this did help a little - my player went from not being able to move at all to being able to move slowly. But it isn't the parity I'm looking for.

Working on getting the project cloned to my laptop so I can run the profiler there instead, then I'll hopefully find some more clues! Thank the lord for github.
 
Last edited:
Oct 26, 2017
3,915
Curiously, I've attempted to disable the wheels and just push forward on the player's single circle collider and even then my player's acceleration is slower on my laptop vs. desktop. That's what has me thinking it's friction related, but I have been at this so long that I might just be losing my sanity.


Don't be afraid to go to bed, haha! The number of times I have spent hours working on a solution only to give up in defeat, then solve it within 15 minutes the next day is staggering!

I'd say based on what you described there, I don't think its going to be the physics settings that cause the issue, because those settings will be consistent across all devices. What you need to look for is where there would be differences between devices. I think its probably that the application of your forces, velocities etc. are probably not being performed in the way you think they are, and that the updates are perhaps less frequent on the slower device.
 

PeterVenkman

Member
Oct 25, 2017
1,770
Don't be afraid to go to bed, haha! The number of times I have spent hours working on a solution only to give up in defeat, then solve it within 15 minutes the next day is staggering!

I'd say based on what you described there, I don't think its going to be the physics settings that cause the issue, because those settings will be consistent across all devices. What you need to look for is where there would be differences between devices. I think its probably that the application of your forces, velocities etc. are probably not being performed in the way you think they are, and that the updates are perhaps less frequent on the slower device.


Unfortunately this is me after a night's sleep.

I hadn't considered that it could be the force applications. Both the player speed (the pushing) and rotation read inputs int he Update and then apply force in the FixedUpdate. Here's the push force:

Code:
        if (isPush == true)
        {
            isPush = false;
            if (Math.Abs(this.GetComponent<Rigidbody>().velocity.magnitude) <= 100)
            {
                if (!goofy)
                {
                    this.GetComponent<Rigidbody>().AddForce(this.transform.right * 5000);
                }
                else
                {
                    this.GetComponent<Rigidbody>().AddForce(this.transform.right * -5000);
                }
            }
        }

and the rotation force:
Code:
if (rotateRight == true)
        {
            rotateRight = false;
            if (theBrain.GetComponent<WheelsTouch>().wheelsTouchCount >= 4)
            {
                this.GetComponent<Rigidbody>().constraints = RigidbodyConstraints.FreezeRotationX;
            }
            this.GetComponent<Rigidbody>().AddRelativeTorque(Vector3.up * 20f, ForceMode.Acceleration);
        }

        if (rotateLeft == true)
        {
            rotateLeft = false;
            if (theBrain.GetComponent<WheelsTouch>().wheelsTouchCount >= 4)
            {
                this.GetComponent<Rigidbody>().constraints = RigidbodyConstraints.FreezeRotationX;
            }
            this.GetComponent<Rigidbody>().AddRelativeTorque(Vector3.up * -20f, ForceMode.Acceleration);
        }

To cover my bases, I've tried testing the rotation code without the constraint line. I've also tried multiplying both by Time.FixedDeltaTime, but (aside from requiring drastically higher forces) the problem remained.

Here's a clip from the profiler as it's running on my laptop. I'm trying to make a bit more sense out of it but am not totally sure what all the actual causes of the various "waitFors" are referencing.

 
Oct 26, 2017
3,915
Unfortunately this is me after a night's sleep.

I hadn't considered that it could be the force applications. Both the player speed (the pushing) and rotation read inputs int he Update and then apply force in the FixedUpdate. Here's the push force:

Code:
        if (isPush == true)
        {
            isPush = false;
            if (Math.Abs(this.GetComponent<Rigidbody>().velocity.magnitude) <= 100)
            {
                if (!goofy)
                {
                    this.GetComponent<Rigidbody>().AddForce(this.transform.right * 5000);
                }
                else
                {
                    this.GetComponent<Rigidbody>().AddForce(this.transform.right * -5000);
                }
            }
        }

and the rotation force:
Code:
if (rotateRight == true)
        {
            rotateRight = false;
            if (theBrain.GetComponent<WheelsTouch>().wheelsTouchCount >= 4)
            {
                this.GetComponent<Rigidbody>().constraints = RigidbodyConstraints.FreezeRotationX;
            }
            this.GetComponent<Rigidbody>().AddRelativeTorque(Vector3.up * 20f, ForceMode.Acceleration);
        }

        if (rotateLeft == true)
        {
            rotateLeft = false;
            if (theBrain.GetComponent<WheelsTouch>().wheelsTouchCount >= 4)
            {
                this.GetComponent<Rigidbody>().constraints = RigidbodyConstraints.FreezeRotationX;
            }
            this.GetComponent<Rigidbody>().AddRelativeTorque(Vector3.up * -20f, ForceMode.Acceleration);
        }

To cover my bases, I've tried testing the rotation code without the constraint line. I've also tried multiplying both by Time.FixedDeltaTime, but (aside from requiring drastically higher forces) the problem remained.

Here's a clip from the profiler as it's running on my laptop. I'm trying to make a bit more sense out of it but am not totally sure what all the actual causes of the various "waitFors" are referencing.




So that code is contained within FixedUpdate() right? That should be fine if thats the case. Just as a heads up for performance (Though I dont think this is the root cause), you should cache those components in member variables via the Start() method and refer to them here. Saves having to do GetComponent() every frame.

I'm not seeing anything obvious in the code to cause performance issues. Would you be able to change the profile view from "Timeline" to "Heirarchy", and then sort by time? (Also expand some of the fields) That will help me track down whats taking the longest.

It looks like you're spending about 15ms of your frame time doing "Other" work, but you'll need to expand that to see what "Other" actually entails. If you haven't figured it out in a few hours I'd be happy to guide you through it via screenshare, if you'd find that helpful?
 

PeterVenkman

Member
Oct 25, 2017
1,770
So that code is contained within FixedUpdate() right? That should be fine if thats the case. Just as a heads up for performance (Though I dont think this is the root cause), you should cache those components in member variables via the Start() method and refer to them here. Saves having to do GetComponent() every frame.

I'm not seeing anything obvious in the code to cause performance issues. Would you be able to change the profile view from "Timeline" to "Heirarchy", and then sort by time? (Also expand some of the fields) That will help me track down whats taking the longest.

It looks like you're spending about 15ms of your frame time doing "Other" work, but you'll need to expand that to see what "Other" actually entails. If you haven't figured it out in a few hours I'd be happy to guide you through it via screenshare, if you'd find that helpful?

Yeah, the forces are all applied in the fixedUpdate - Here's a quick shot with the profiler outlined by hierarchy and time. I'll keep taking swings at it during the day if I can't figure out what's eating this playerloop.

rqtj5I8.jpg
 

EssBeeVee

Member
Oct 25, 2017
22,748
hey.
i entered my first game jam with my first game lol

creepypastasauce.itch.io

Sonar by OrangeTapioca

Score Jam 2020 Entry

i used construct3 for it.
its very tutorial tier level game but i made something xD

art/music isn't my thing so i just slapped something together.


also i took on the task to learn to use defold game engine (uses lua).

it looks almost like godot except different scripting language.


was just easier to understand following the tutorial.
hopefully the support is there.
 

Weltall Zero

Game Developer
Banned
Oct 26, 2017
19,343
Madrid
Yeah, the forces are all applied in the fixedUpdate - Here's a quick shot with the profiler outlined by hierarchy and time. I'll keep taking swings at it during the day if I can't figure out what's eating this playerloop.

rqtj5I8.jpg

Is your game capped at 30 FPS? Half of your wait time is spent waiting for the next frame, although it could be that it just misses the next frame by very little and this has to wait for the next.

Still, to get a more accurate picture of the frame times, disable VSync and have your game render at the max possible speed (on powerful computers you should do this only for the test, since it will otherwise tax your computer to the max: it's probably OK to leave it like that on a laptop that's already being overworked by the game itself).
 
Status
Not open for further replies.