Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

1372066 Posts in 64693 Topics- by 56834 Members - Latest Member: Kamazs

January 26, 2020, 04:37:49 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogsApple and Worm: Patching Holes In Spacetime
Pages: 1 ... 19 20 [21] 22 23 ... 28
Print
Author Topic: Apple and Worm: Patching Holes In Spacetime  (Read 38412 times)
diegzumillo
Level 10
*****


This avatar is so old I still have a some hair


View Profile WWW
« Reply #400 on: August 22, 2019, 07:27:18 AM »

… Hahaha, ooooh wow, now I feel very thick for not realising I could just do exactly this with a texture instead of maths. Cheesy

lol never underestimate the keen eye for easy solutions of the lazy person. We ironically go to great lengths to walk less.

All right, I'll give this another stab with your shader. Thanks for sharing this! Smiley
Logged

JobLeonard
Level 10
*****



View Profile
« Reply #401 on: August 22, 2019, 08:18:46 AM »

OK, NOW wall of text is over. If you read this far, how could you? I asked so nicely. If you cheated and only read the final line that's better.
Oh, but I did read it all! Evil
Prinsessa for the win!
Living up to the Scandinavian metal tradition by reading a wall of text until she bleeds Hand Metal Left Evil Hand Metal Right


Maybe I'm being dumb but isn't this more of a visual communication issue that should be solved by an art asset? Or perhaps something dynamic like dust particles that show the distortion as they float through space
Logged
diegzumillo
Level 10
*****


This avatar is so old I still have a some hair


View Profile WWW
« Reply #402 on: August 22, 2019, 12:30:22 PM »

Maybe I'm being dumb but isn't this more of a visual communication issue that should be solved by an art asset? Or perhaps something dynamic like dust particles that show the distortion as they float through space

I'm hoping the distortion itself will help with that, like every sprite and local decoration stuff and maybe particles etc, but I'm afraid it won't be enough. If it turns out the wireframe is almost unnecessary and in the face I can always tone it down and make it more transparent down the road.

Logged

diegzumillo
Level 10
*****


This avatar is so old I still have a some hair


View Profile WWW
« Reply #403 on: August 22, 2019, 05:11:32 PM »

Today my attention deficit was particularly nasty. I was making a level, then stopped making the level to roll back the LWRP thing, then I remembered the shader PRincessa made and went to mess with it but, I don't know why, I found myself writing a wireframe solution using GL.LINES instead. At some point of the afternoon I spent reading ProBuilder's API because it has definition for face instead of just triangles but that's what draw me in, not why I was reading it later.

Miraculously I finished the implementation today. It even has rippling effects! And a function called "Bloop()" which, when called, makes a "bloop" ripple on the mesh. Aaaaand it is absolutely unusable. FPS drops by 60%! I mean, who would've thought directly calling gl lines would have such a terrible performance? I was betting on the opposite.

I'm not sure what I learned today. Oh, yeah, the physics of the player controller is mistakenly tied to the frame rate. I learned that.
Logged

Prinsessa
Level 10
*****


Ava Skoog


View Profile WWW
« Reply #404 on: August 22, 2019, 10:52:17 PM »

Living up to the Scandinavian metal tradition by reading a wall of text until she bleeds Hand Metal Left Evil Hand Metal Right

heyyy I just wanted to use a devil emoji but they don't play nice with ancient TIG software so I had to pick the closest thing :'c

FPS drops by 60%! I mean, who would've thought directly calling gl lines would have such a terrible performance?

Ahhh, what a bummer!! Anything that doesn't go through the fancy pipeline, I guess. :E I wonder if Unity has any way to choose to render using lines instead of triangle strips at all, but you probably have to delve into custom pipelines and redo the whole thing from scratch which is way overkill… I'd definitely go for the UV trick. Tongue
« Last Edit: August 22, 2019, 11:34:42 PM by Prinsessa » Logged

JobLeonard
Level 10
*****



View Profile
« Reply #405 on: August 23, 2019, 03:22:48 AM »

Quote
heyyy I just wanted to use a devil emoji but they don't play nice with ancient TIG software so I had to pick the closest thing :'c
Aww - I hear your pain re:emojis. Even though that would still be pretty metal, no? Wink
Logged
Prinsessa
Level 10
*****


Ava Skoog


View Profile WWW
« Reply #406 on: August 23, 2019, 05:49:40 AM »

i was going for mischievous Sad((
Logged

ProgramGamer
Administrator
Level 10
******


The programmer of games


View Profile
« Reply #407 on: August 23, 2019, 05:56:26 AM »

Yeah, the lack of emojis is something I feel for as well. Hopefully one day we'll have the resources to move on to a more modern forum backend.
Logged

diegzumillo
Level 10
*****


This avatar is so old I still have a some hair


View Profile WWW
« Reply #408 on: August 23, 2019, 06:11:54 AM »

The forum is very gif friendly though. It's not as convenient as a tiny face within the reach of a click or a shortcut like Smiley But it's there



Logged

RealScaniX
Level 2
**


ScaniX


View Profile WWW
« Reply #409 on: August 23, 2019, 12:42:44 PM »

Hey, just dropping in to say that this game looks awesome and this devlog also contains lots of interesting tech stuff.
And last but not least: Grats on keeping at it for such a long time! Smiley
Logged

diegzumillo
Level 10
*****


This avatar is so old I still have a some hair


View Profile WWW
« Reply #410 on: August 23, 2019, 02:13:59 PM »

Hey, just dropping in to say that this game looks awesome and this devlog also contains lots of interesting tech stuff.
And last but not least: Grats on keeping at it for such a long time! Smiley

Thanks, Scancan! (complicated usernames get nicknames!) The length of this project is somewhat embarrassing, considering its current state, but in my defense I wasn't actually working on it all these years.
Logged

Superb Joe
Level 10
*****



View Profile
« Reply #411 on: August 23, 2019, 02:46:12 PM »

it's actually good to take too long to make a game in my opinion
Logged
RealScaniX
Level 2
**


ScaniX


View Profile WWW
« Reply #412 on: August 23, 2019, 02:53:02 PM »

Thanks, Scancan! (complicated usernames get nicknames!) The length of this project is somewhat embarrassing, considering its current state, but in my defense I wasn't actually working on it all these years.

Hehe, Scanix was taken. ^^
 
I know those projects. I failed to finish those after picking them up after years, though. So, I try to stick to them now. Smiley
Logged

diegzumillo
Level 10
*****


This avatar is so old I still have a some hair


View Profile WWW
« Reply #413 on: August 26, 2019, 10:27:05 AM »

Did some further fixes to physics. It seems like whenever I start working on actual game stuff some part of my 'engine' breaks (I know it's Unity, but I consider the top coating on unity my own engine). I know it's held together with spit and stubbornness but come on! hold it together!

Even though the physics could very well run at a variable frame rate it becomes undeterministic. A parabolic trajectory, for example, will look different if on the next run something else made the frame duration a bit longer. And since I'm using physics to control a character and the game is mostly platforming puzzle, I think I want deterministic.

Anyway, with that in mind I just put all the physics loop inside a FixedUpdate(), Unity's own function that runs at specific times. Unity's physics runs after Fixedupdate. I completely neglected this detail and was simply putting all scripts that needed to add forces inside their own fixedupdate without considering they might be running AFTER my physics loop. I never encountered a bug caused by this but it was only a matter of time. So I implemented some event delegate things so now I have PrePhysicsUpdate and PostPhysicsUpdate for any script that wants to run in sync with the simulation.

This is the first time I solved a bug before it happens. I feel like a PRECOG.

I found this bug trying to solve a very real bug though. With everything running at specific time intervals and my character controller using fixedupdate for all its commands, I was surprised to see frame rate dependence on the simulation. Quite by accident I had a frame drop and suddenly my character was jumping to the moon.

It turns out the error was subtle. It had to do with how one applies force to things. A constant force needs to be renewed every simulation tick. An impulse, like jump, needs to be exactly once. I didn't solve this in any clever way though. I just set up some flags inside the controller class and made sure gravity would be applied continuously, like other forces, and others would be fire only once. If I ever need more robustness then I might improve the physicsbody class to handle that internally through specialized functions like addconstantforce burstforce or whatever. For now this is good.

Debugging it was kind of a pain in the ass though. I even shared my workflow in the grumpy old programmer room topic, which means I was grumpy. To artificially lower the frame rate I made a class called "FPSHOGGER" that instantiates and removes gameobjects inside a loop. Change the loop length for a variable FPS and voila.

Logged

RealScaniX
Level 2
**


ScaniX


View Profile WWW
« Reply #414 on: August 26, 2019, 01:40:05 PM »

Physics... Framerate... too long to quote...

Yes, I often noticed problems like this, too. For physics and for normal stuff. Making things happen in the same speed independent of framerate is difficult, but important. ^^
I also have a method to slow down stuff to 10 frames per second. You can just use Thread.sleep() here. Smiley
 
Some things that I have learned (usually the hard way) is: Do physics stuff in fixed update, use Time.deltaTime (also in physics as for slow motion effects (changing Time.timeScale) I need to change the physics rate or physics goes crazy) and frequently test in low framerates. Which reminds me... I'll be back.
Logged

diegzumillo
Level 10
*****


This avatar is so old I still have a some hair


View Profile WWW
« Reply #415 on: August 26, 2019, 04:27:37 PM »

Quote
You can just use Thread.sleep() here.

Good tip! Beats my FPSHogger.cs
Logged

diegzumillo
Level 10
*****


This avatar is so old I still have a some hair


View Profile WWW
« Reply #416 on: August 28, 2019, 03:42:03 PM »



I made this pushing animation rather quickly. The legs are poorly animated and the head isn't at all. But it works I guess.

I did it mostly because I'm starting to feel burned out from this project and didn't really know what to do next. Maybe I should give it a rest for a while, I already made some great progress lately. I even sketched out the whole plot of the game, which took a surprising three pages of text.

Yeah, a little break sounds nice. See you all in a couple of weeks!  Coffee
Logged

RealScaniX
Level 2
**


ScaniX


View Profile WWW
« Reply #417 on: August 29, 2019, 01:05:49 AM »

I made this pushing animation rather quickly. The legs are poorly animated and the head isn't at all. But it works I guess.

Ha, I love that flat face, though. Looks cool! Smiley
Logged

JobLeonard
Level 10
*****



View Profile
« Reply #418 on: August 29, 2019, 04:01:03 AM »

I second that! The squishy skinfold makes it perfect!
Logged
diegzumillo
Level 10
*****


This avatar is so old I still have a some hair


View Profile WWW
« Reply #419 on: August 29, 2019, 06:02:20 AM »

Thanks, guys :D

I feel like I'm ripping off Cloudface animation (a now dead project from these forums that was amazing and had amazing animation) but I couldn't find a way around, since apple has no arms. Maybe using the top of the head?

My only gripe with it is that it only looks good against flat walls. Pushing a small object or when the box rotates a little, breaks the animation.
Logged

Pages: 1 ... 19 20 [21] 22 23 ... 28
Print
Jump to:  

Theme orange-lt created by panic