Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / FRAPS causing Sparky's to glitch

Author
Message
wattywatts
17
Years of Service
User Offline
Joined: 25th May 2009
Location: Michigan
Posted: 13th Sep 2013 23:01 Edited at: 13th Sep 2013 23:04
First off, I'm using this bit of code for my main collision check


The problem seems to be the "collide" variable. Collisions work fine at first, collide>0 if an object is touching, but whenever I run FRAPS in the background, "collide" rapidly flips from 0 to whatever, whether or not the object position is changed.
Then even after FRAPS is unloaded, my PC needs to be rebooted, (sometimes 1 reboot isn't even enough) before collisions work right again.
Perhaps there's something wrong with my code? Please help me bug test this!


Edit
Sometimes my PC doesn't need to even be rebooted, as long as enough time has passed I can run it again and it works.

http://mattsmith.carbonmade.com/
wattywatts
17
Years of Service
User Offline
Joined: 25th May 2009
Location: Michigan
Posted: 13th Sep 2013 23:33
Alright I don't know why this is the case, but I think I found the problem, I had my sync rate set to 0. If I set it to 60 or remove the sync rate command it seems to work. Still so confused, but at least I think I found a solution.

http://mattsmith.carbonmade.com/
Mage
Valued Member
19
Years of Service
User Offline
Joined: 3rd Feb 2007
Location:
Posted: 14th Sep 2013 03:24 Edited at: 14th Sep 2013 03:38
I have sync on, and sync rate 0.
I was able to use Fraps and Sparky's plugin. I know this isn't a solution, but be advised the two can work with each other, compatibility is there. Try posting some code of your sparky plugin usage to help narrow things down.

I suspect this might be down to how you are handling the collisions and physics.
It may be a larger frame rate related issue.



Other than quality and tearing caused by the encoding process, I didn't have any issues.

wattywatts
17
Years of Service
User Offline
Joined: 25th May 2009
Location: Michigan
Posted: 17th Sep 2013 23:06
Hey Mage, sorry for the time lapse, I've been having a bit of hardware trouble and just finished fixing it.
You can take a look at my collision code if you want, but I'm a bit embarrassed at how messy it is.
That footage looks smooth! Is that a motion blurring shader I see?
[i]

http://mattsmith.carbonmade.com/
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 20th Sep 2013 18:05
The first thing I see here is you are using float variables everywhere even when you are only assigning integers to them.

You only need to use a variable with a # at the end for floating points (real numbers IE 1.567). If you are using integers (IE 1, 2, 3) you can use a straight variable name like: myNumber = 2

This could cause some odd glitches when you are checking a value.

This line:
if sc_getcollisionnormaly()>3 or sc_getcollisionnormaly()<3
Can be shortened to:
if sc_getcollisionnormaly()<>3

Also I can't see where you are setting oldx#,oldy#,oldz#?

You can never have too much sausage
wattywatts
17
Years of Service
User Offline
Joined: 25th May 2009
Location: Michigan
Posted: 21st Sep 2013 22:30
I actually had no idea that the # makes any difference, I've just been doing it because I associated it with variables and made them easier to see in the code. Didn't know about <> either! So thanks

The oldxyz values are in the main loop, shouldn't be any problems there. It seems to be sorted out.

http://mattsmith.carbonmade.com/

Login to post a reply

Server time is: 2026-07-07 00:50:13
Your offset time is: 2026-07-07 00:50:13