Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411589 Posts in 69386 Topics- by 58443 Members - Latest Member: Mansreign

May 07, 2024, 02:31:34 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)The happy programmer room
Pages: 1 ... 207 208 [209] 210 211 ... 279
Print
Author Topic: The happy programmer room  (Read 679415 times)
indie11
Level 2
**


View Profile
« Reply #4160 on: July 27, 2015, 06:27:21 AM »

How do the original graphics look like? O_O

**EDIT** I've just found out that the horizontal movement is jittery even though I am accelerating based on time ( Using Smooth Damp in Unity). Unity always gives me headaches!! This is the 3rd time trying to make a SMB like physics platformer but again getting stuck at a minor thing that makes the game look crap

This is why I hate physics based on delta time, they're awfully hard to get right. And yes, SMB uses a fixed framerate if you wonder.

This is some problem with the unity engine. Recently I've found out that a lot of people are facing this issue, there's no proper fix, some say to change monitor refresh rate, play with the editor physics settings but nothing is working out for me



I had several issues with jerky movement in unity which I ultimately resolved, here is what I did in case it helps:

1 ensure that the jerkyness is not in your camera, i found that my camera was updating out of sync with the objects. I got round this by ensuring the my cameras follow code was updated in "FixedUpdate".

2 ensure my objects did not have velocity altering code inside a "FixedUpdate" function (put it all in "Update")

the reason behind this is that unity can update its physics and rendering separately, Unity will potentially call fixed update multiple times per screen refresh (update)

Hope this helps (and doesn't just cause confustion) Smiley
I have disabled my camera follow script just to be sure that the issue is not because of the camera movement. There is a jerk even when there is a single object in the scene translating, It like happens after every second or two.. Which version of Unity3D are you using? I am downloading the last patch release of Unity3d 4.x series just to see if there is any issue with the current version I am using
Logged

Will Sykes
Level 0
**


View Profile
« Reply #4161 on: July 27, 2015, 06:37:56 AM »

How do the original graphics look like? O_O

**EDIT** I've just found out that the horizontal movement is jittery even though I am accelerating based on time ( Using Smooth Damp in Unity). Unity always gives me headaches!! This is the 3rd time trying to make a SMB like physics platformer but again getting stuck at a minor thing that makes the game look crap

This is why I hate physics based on delta time, they're awfully hard to get right. And yes, SMB uses a fixed framerate if you wonder.

This is some problem with the unity engine. Recently I've found out that a lot of people are facing this issue, there's no proper fix, some say to change monitor refresh rate, play with the editor physics settings but nothing is working out for me



I had several issues with jerky movement in unity which I ultimately resolved, here is what I did in case it helps:

1 ensure that the jerkyness is not in your camera, i found that my camera was updating out of sync with the objects. I got round this by ensuring the my cameras follow code was updated in "FixedUpdate".

2 ensure my objects did not have velocity altering code inside a "FixedUpdate" function (put it all in "Update")

the reason behind this is that unity can update its physics and rendering separately, Unity will potentially call fixed update multiple times per screen refresh (update)

Hope this helps (and doesn't just cause confustion) Smiley
I have disabled my camera follow script just to be sure that the issue is not because of the camera movement. There is a jerk even when there is a single object in the scene translating, It like happens after every second or two.. Which version of Unity3D are you using? I am downloading the last patch release of Unity3d 4.x series just to see if there is any issue with the current version I am using


I am now using unity 5 but I was using 4.x for a while and the only jerk issue I had was related to update/fixedupdate.

what method are you using to move the object? does the object have a rigid body component? could it be that you are overwriting translation of the rigid body (e.g. it tries to move based on its velocity and then you change this with a manual translation in your update function)?
Logged
cykboy
Level 2
**

ye


View Profile
« Reply #4162 on: July 27, 2015, 08:18:09 AM »

How do the original graphics look like? O_O



For standard bricks, we take a flat 2d isometric sprite, cut it in certain areas and then distort the image to result in a mappable texture. Then make a cube, apply correct UV mappings and its 3d. Primarily used for lighting calculations and fancy stuff. It has limitations with graphical quality (although resolution is adjustable), but imo it works pretty well. Ramps are even more complex...
Logged
Sik
Level 10
*****


View Profile WWW
« Reply #4163 on: July 27, 2015, 08:21:44 AM »

For a moment I thought it was isometric in its 2D form and then somehow that got mapped to a 3D cube.
Logged
indie11
Level 2
**


View Profile
« Reply #4164 on: July 27, 2015, 08:45:27 AM »

How do the original graphics look like? O_O

**EDIT** I've just found out that the horizontal movement is jittery even though I am accelerating based on time ( Using Smooth Damp in Unity). Unity always gives me headaches!! This is the 3rd time trying to make a SMB like physics platformer but again getting stuck at a minor thing that makes the game look crap

This is why I hate physics based on delta time, they're awfully hard to get right. And yes, SMB uses a fixed framerate if you wonder.

This is some problem with the unity engine. Recently I've found out that a lot of people are facing this issue, there's no proper fix, some say to change monitor refresh rate, play with the editor physics settings but nothing is working out for me



I had several issues with jerky movement in unity which I ultimately resolved, here is what I did in case it helps:

1 ensure that the jerkyness is not in your camera, i found that my camera was updating out of sync with the objects. I got round this by ensuring the my cameras follow code was updated in "FixedUpdate".

2 ensure my objects did not have velocity altering code inside a "FixedUpdate" function (put it all in "Update")

the reason behind this is that unity can update its physics and rendering separately, Unity will potentially call fixed update multiple times per screen refresh (update)

Hope this helps (and doesn't just cause confustion) Smiley
I have disabled my camera follow script just to be sure that the issue is not because of the camera movement. There is a jerk even when there is a single object in the scene translating, It like happens after every second or two.. Which version of Unity3D are you using? I am downloading the last patch release of Unity3d 4.x series just to see if there is any issue with the current version I am using


I am now using unity 5 but I was using 4.x for a while and the only jerk issue I had was related to update/fixedupdate.

what method are you using to move the object? does the object have a rigid body component? could it be that you are overwriting translation of the rigid body (e.g. it tries to move based on its velocity and then you change this with a manual translation in your update function)?

A simple 2d sprite with a BoxCollider2D on it and no rigidbody.. I have also posted a question on unity answers, there seems to be some rendering spike even with a single cube in the scene..

http://answers.unity3d.com/questions/1014889/translate-stutter-on-60fps.html
Logged

cykboy
Level 2
**

ye


View Profile
« Reply #4165 on: July 27, 2015, 09:37:25 AM »

For a moment I thought it was isometric in its 2D form and then somehow that got mapped to a 3D cube.

That may be a possibility, the only hurdle regarding that method is mapping a UV rhombus instead of a standard UV square. That is why we distort the image, but this can cause slight quality loss (not majorly noticeable)
Logged
surt
Level 7
**


Meat by-product.


View Profile
« Reply #4166 on: July 27, 2015, 10:23:38 AM »

...the only hurdle regarding that method is mapping a UV rhombus instead of a standard UV square.
How is that any harder?
Logged

Real life would be so much better with permadeath.
PJ Gallery - OGA Gallery - CC0 Scraps
cykboy
Level 2
**

ye


View Profile
« Reply #4167 on: July 27, 2015, 02:03:30 PM »

...the only hurdle regarding that method is mapping a UV rhombus instead of a standard UV square.
How is that any harder?

I only just came to the realisation as I wrote that reply. Working on a solution now to map them, the math isn't easy but I've got my tea.
Logged
cykboy
Level 2
**

ye


View Profile
« Reply #4168 on: July 27, 2015, 03:13:23 PM »

Hurray! This is a much better solution, no loss of quality and can simply squash tiles together into a sheet like this:



And have a completely 3d object:





Will be interesting to do this with more complex tiles (ramps, triangular "cutoffs")..

Logged
Sik
Level 10
*****


View Profile WWW
« Reply #4169 on: July 28, 2015, 05:50:32 AM »

Did you seriously go ahead with my misinterpretation? lol

At least the upside seems to be that now you can draw heights at the top of the cubes without having to change the shape of the mesh to allow for the new silhouette (making it possible to have more detail than before). That seems to be a net gain.
Logged
cykboy
Level 2
**

ye


View Profile
« Reply #4170 on: July 28, 2015, 07:13:25 AM »

Did you seriously go ahead with my misinterpretation? lol

At least the upside seems to be that now you can draw heights at the top of the cubes without having to change the shape of the mesh to allow for the new silhouette (making it possible to have more detail than before). That seems to be a net gain.

Yep, it's now much quicker and quality is greater. This is why I love forums Wink
Logged
oahda
Level 10
*****



View Profile
« Reply #4171 on: July 28, 2015, 09:22:12 AM »

The tilted window panel thingies do look blurry tho.
Logged

cykboy
Level 2
**

ye


View Profile
« Reply #4172 on: July 28, 2015, 11:12:02 AM »

The tilted window panel thingies do look blurry tho.

The ramps? Yeah, they look like shit now that we have this method for bricks. Going to try map them tonight, they have a backface too so cant do it from a single image... fun awaits

EDIT: Here's a live test (requires webgl), pretty rudimentary and isn't optimized at all: https://metajs.herokuapp.com/
« Last Edit: July 28, 2015, 01:42:26 PM by META4 » Logged
Sik
Level 10
*****


View Profile WWW
« Reply #4173 on: July 29, 2015, 02:32:39 PM »

The tilted window panel thingies do look blurry tho.

That part wasn't reimplemented yet, that's why.
Logged
cykboy
Level 2
**

ye


View Profile
« Reply #4174 on: July 30, 2015, 01:45:27 PM »

The tilted window panel thingies do look blurry tho.

That part wasn't reimplemented yet, that's why.

Indeed! That link is my live testbed, it'll change from time to time - don't mind sharing with you guys though. I've been working on a method to squash all the geometry (tiles) into one big mesh. It works, but now I need to rethink how I map bricks/ramps since I can only use one texture for the mesh... more fun!

I think on that demo atm you can use WASD to move around and space to jump. You will fall through the floor at some point. Basic test of a collision system that has been scrapped.
Logged
powly
Level 4
****



View Profile WWW
« Reply #4175 on: August 05, 2015, 02:25:53 PM »

I got a (demoscene) demo released after a long period of being less active, I'm quite happy :33
Logged
Sik
Level 10
*****


View Profile WWW
« Reply #4176 on: August 05, 2015, 06:31:36 PM »

Which one? :​o (Pouët link?)
Logged
cykboy
Level 2
**

ye


View Profile
« Reply #4177 on: August 06, 2015, 07:34:00 PM »

More optimizations! So merging all geometry just wasnt enough, the scene below still has 4475 faces in it. Most of these will never be seen, but are still going to be iterated when rendering. The lines are the shadow camera, which is the main reason I need to get rid of some faces.



bottom view, player will never see this and its ugly as hell



And on some math magic and a few if statements, the new face total is 1459! It looks the exact same from the top or any side, but it has merged groups of blocks together into one big block as is evident here:



Roughly 75% decrease in the amount of faces, and for big maps I've reduced 14290 faces to 5032 faces.
Logged
ThemsAllTook
Administrator
Level 10
******



View Profile WWW
« Reply #4178 on: August 08, 2015, 11:42:04 AM »

I just solved the last really hard problem in my collision system. There was a possibility of getting into an unresolvable state, and I now have a mechanism that detects object pairs that are unresolvable and allows them to pass through each other for just that one case. Previously, when this happened it would either infinite loop, or break all of the other objects in the simulation, so this quietly works around the problem with the minimum disruption to the overall simulation. I think this means I can finally get back to actual game code!
Logged

powly
Level 4
****



View Profile WWW
« Reply #4179 on: August 16, 2015, 12:18:25 PM »

Which one? :​o (Pouët link?)
This one, sorry for being slow :D I think making a game with the same style might also be cool, let's see what happens..
Logged
Pages: 1 ... 207 208 [209] 210 211 ... 279
Print
Jump to:  

Theme orange-lt created by panic