[img]http://imgkk.com/i/j7RfJw.png[/img]
Future links to Admin actions.
Oh fuck I feel so stupid now.
Keep forgetting that x and y in SetAsBox is half-size.
My visual box was 100 units wide and 100 units tall.
On the physics box I did SetAsBox(100, 100) when it should have been half, SetAsBox(50, 50).
I did also draw the ground too thick because of this.
Why did they even do it like that? Why couldn't you create it full size, then set the center of rotation manually?
[editline]09:46PM[/editline]
[QUOTE=Aertz;17269933][CODE].SetRotation((angle * (180.0f / 3.1415926f)) * -1);[/CODE]
Try this.
Or just try to multiply your own angle to radian value with -1.[/QUOTE]
Thanks! That actually solved my next problem! :D
[QUOTE=Sippeangelo;17269989] Thanks! That actually solved my next problem! :D[/QUOTE]
:) Had the same problem took some time for me to figure out.
[QUOTE=Aertz;17269933][CODE].SetRotation((angle * (180.0f / 3.1415926f)) * -1);[/CODE]
Try this.
Or just try to multiply your own angle to radian value with -1.[/QUOTE]
MATH_PI btw
compwhizii, you should be able to make a script that indexes all actions ever done on fp to get a nice record of all events associated with each moderator and also let people get an idea of how many times they have been banned
http://www.facepunch.com/fp_events.php?id={eventid}
I've been playing around with SFML and Box2D as well. I love SFML compared to SDL now.
[QUOTE=Sippeangelo;17269989]Oh fuck I feel so stupid now.
Keep forgetting that x and y in SetAsBox is half-size.
My visual box was 100 units wide and 100 units tall.
On the physics box I did SetAsBox(100, 100) when it should have been half, SetAsBox(50, 50).
I did also draw the ground too thick because of this.
Why did they even do it like that? Why couldn't you create it full size, then set the center of rotation manually?[/QUOTE]
Haha yeah, I had both the problems you had. The radians problem took me a while to figure out, because when I tried to fix it, I forgot to change the visual side as well. So I was still reading and passing the angle in radians straight to SFML, which takes the angles in degrees.
My problem now is the scaling between the screen space and the physics simulation world and framerate vs. time step problems. I can't wrap my head around the scaling so well and it seems that my physics world is so small compared to the screen space that the effects of gravity seem unrealistic. I'm not sure how to deal with the framerate vs. time step problem yet, because Box2D documents say that you shouldn't change the time step unless you absolutely have to.
Also now that I have tested out the performance without OpenGL, I think I want to switch to get the hardware acceleration.
What I do is set a 'NextThink' for the physics so they are only updated 60 times a second, regardless of framerate. Kinda how XNA and GMod do it. This is pretty much what I do in the render loop:
[cpp]if ( Physics.nextUpdate <= clockUpdate.GetElapsedTime( ) )
Physics.Update( clockUpdate.GetElapsedTime( ) );[/cpp]
[QUOTE=mm3guy;17270611]compwhizii, you should be able to make a script that indexes all actions ever done on fp to get a nice record of all events associated with each moderator and also let people get an idea of how many times they have been banned
http://www.facepunch.com/fp_events.php?id={eventid}[/QUOTE]
That's way too much load I want to put on FP. [url]http://www.facepunch.com/fp_events.php?id=248500&aj=1[/url] will get me to the most recent event, and that's 248,500 requests. Serious ouch.
[editline]06:16PM[/editline]
But if garry would give me a DB dump....
you can do it slowly over the course of a few days, though i guess FP doesn't really need to have that kind of load right now.
[QUOTE=efeX;17270568]MATH_PI btw[/QUOTE]
Where is that defined?
[QUOTE=mm3guy;17271103]you can do it slowly over the course of a few days, though i guess FP doesn't really need to have that kind of load right now.[/QUOTE]
At the rate of one request per 10 seconds it would take 2 weeks.
[QUOTE=Sippeangelo;17271516]Where is that defined?[/QUOTE]
Nowhere. It's not C++.
However, if your compiler supports the extension, it's most likely going to be in cmath.
Instead of Adding a "* -1" couldn't you just add a minus infront of Pi or the angle?
Or am I being dumb :downs:
[QUOTE=compwhizii;17271656]At the rate of one request per 10 seconds it would take 2 weeks.[/QUOTE]
Congrats on modship.
Why thank you.
Your avatar still creeps the shit out of me compwhizii
I'm still plugging away on my build script. Rather than continue to just keep talking, I'll post what I have so far. I'm currently rewriting it, since I ran into some nasty bugs, and the flow of the script was just godawful.
I know I haven't shown any of it so far, but trust me, this is the best version of the script.
[url]http://snipt.org/mlpn[/url]
The snipt website appears to have fucked up my tabs, so I apologize.
It's so gigantic, I didn't want to make you all read a [code] box without any syntax highlighting
some parts are extremely hackish, like the "LET'S RESET THE WINDOWS TERMINAL FOREGROUND COLOR TO WHITE", but I can always change it later.
Honestly I'm a little embarrassed that this is all I have to show after several weeks of work :-/
A bit more progress on my space shooter game.
You can take damage, but you can't lose yet. Notice how when the green blocks hit the player ship, they disappear and they don't go through the player like enemies can. The games knows when you run out of health, but it won't do anything about it.
[media]http://www.youtube.com/watch?v=8Hyh5Yldke0[/media]
[img]http://www.cubeupload.com/files/91dc00jumpy2.gif[/img]
GAH
[QUOTE=ryandaniels;17275758][img]http://www.cubeupload.com/files/91dc00jumpy2.gif[/img]
GAH[/QUOTE]
I take it you're trying to have smaller asteroids circle larger ones? :3:
(gravity! :woop:)
[QUOTE=garry;17269743]It's my own GUI system. It isn't much though TBH.[/QUOTE]
Reason I ask is that I'm just now trying to learn more in-depth c++ starting with glut and barebone Lua, not even LuaBind (No object binding yet). Got some basic rendering but no idea on how to start doing a GUI/Panel system. Let alone, my factories fail left and right.
[QUOTE=Tezza1234;17271726]Instead of Adding a "* -1" couldn't you just add a minus infront of Pi or the angle?
Or am I being dumb :downs:[/QUOTE]
Yes, but multiplying by -1 looks more obvious.
[editline]08:58AM[/editline]
Victory is mine!
[IMG]http://filebox.me/files/wd496b8uf_physics.png[/IMG]
Just got Box2D completely working with SFML too:
[img]http://i30.tinypic.com/zl9edy.jpg[/img]
that grass looks strangely like namelezz's
[QUOTE=Chandler;17267986]When a character lands, they don't lose their momentum for a split second, until they start walking again (Which has a speed limit), however, while in the air you can have a VERY high velocity for the character, so that proper damage is judged from a high fall. Or something like that :)[/QUOTE]
Yeah, but I still don't understand why the combination of air strafing forwards and sideways and turning in that direction causes so much acceleration.
[QUOTE=efeX;17280693]that grass looks strangely like namelezz's[/QUOTE]
Because it is the same, he allowed me to use it.
Working on [url=http://adsweep.org]AdSweep[/url] so it'd have some new content when I'm taking over soon.
[QUOTE=Jallen;17280795]Yeah, but I still don't understand why the combination of air strafing forwards and sideways and turning in that direction causes so much acceleration.[/QUOTE]
Are you unable to do this in real life? :v:
[QUOTE=Chandler;17276054]I take it you're trying to have smaller asteroids circle larger ones? :3:
(gravity! :woop:)[/QUOTE]
Actually, I just the object to fall down and stop moving, but it bounces all over the place for some reason.
[QUOTE=ryandaniels;17282454]Actually, I just the object to fall down and stop moving, but it bounces all over the place for some reason.[/QUOTE]
What method do you use? Just go trough all the astroids and calculate the gravity force they do on other astroids, then combine those and apply ?
When using sf::Shape to draw shapes of Box2D, I take it's better to use a sf::Shape object for every shape than to use a single one and change it every time?
Sorry, you need to Log In to post a reply to this thread.