Schrompf
|
|
« Reply #3460 on: June 20, 2013, 03:21:54 AM » |
|
Nice one!
|
|
|
Logged
|
Snake World, multiplayer worm eats stuff and grows DevLog
|
|
|
harkme
Level 1
Surprise!
|
|
« Reply #3461 on: June 23, 2013, 11:58:03 AM » |
|
Decided to finally ditch the old spherical coordinates/linear algebra for my camera code and replace with quaternions. Spent 2 weeks learning all about them (I like to do know, not just how, but why they work, derive equations, ect...) and implemented a full C++ quaternion library. Implemented all the code without testing it once. Worked near perfectly the 1st time I now have a camera class with every bell/whistle I could want. Neat! I just went with GLM: http://glm.g-truc.net/It has support for quaternions.
|
|
|
Logged
|
|
|
|
d
|
|
« Reply #3462 on: June 23, 2013, 12:00:34 PM » |
|
float cos_theta = dot(n, v); vec3 r = cos_theta * n + sqrt(1.0f - cos_theta * cos_theta) * cross(n, cross(n, v));
|
|
|
Logged
|
|
|
|
Geti
|
|
« Reply #3463 on: June 24, 2013, 01:34:09 AM » |
|
Four bugs in fifteen minutes, lets keep this train going
|
|
|
Logged
|
|
|
|
Quarry
|
|
« Reply #3464 on: June 24, 2013, 01:37:18 AM » |
|
float cos_theta = dot(n, v); vec3 r = cos_theta * n + sqrt(1.0f - cos_theta * cos_theta) * cross(n, cross(n, v));
What does that do, angle between two vectors?
|
|
|
Logged
|
|
|
|
d
|
|
« Reply #3465 on: June 24, 2013, 12:13:25 PM » |
|
float cos_theta = dot(n, v); vec3 r = cos_theta * n + sqrt(1.0f - cos_theta * cos_theta) * cross(n, cross(n, v));
What does that do, angle between two vectors? After thinking about it some more, the same thing as this: vec3 r = -v + dot(v, n) * 2 * n; It's ray ref(lec|rac)tion without quaternions.
|
|
|
Logged
|
|
|
|
Kekskiller
Guest
|
|
« Reply #3466 on: June 24, 2013, 04:14:29 PM » |
|
So happy to have my game mode/state manager up and running. It's hard to describe what's so awesome about it but if you had to work with bad game state managers before you'll be glad to have your own one with all the bits and bobs you could ever need.
|
|
|
Logged
|
|
|
|
Kurt
|
|
« Reply #3467 on: June 24, 2013, 05:08:37 PM » |
|
Finally got multi-language support running. Loads a language file with all the defined keys and their translation. For example... In the English file, lang.en: In the French file, lang.fr: All I have to do is call Translator.translate("item.6") and I get the string for the current language!
|
|
|
Logged
|
|
|
|
powly
|
|
« Reply #3468 on: June 25, 2013, 05:40:16 PM » |
|
Four bugs in fifteen minutes, lets keep this train going Four bugs, created or resolved? :D
|
|
|
Logged
|
|
|
|
Geti
|
|
« Reply #3469 on: June 26, 2013, 12:49:15 AM » |
|
Bit of both
|
|
|
Logged
|
|
|
|
Dr. Cooldude
Guest
|
|
« Reply #3470 on: June 26, 2013, 03:03:33 AM » |
|
My exam project has been killing me inside lately, but luckily I got an A (ECTS scale) :D
|
|
|
Logged
|
|
|
|
harkme
Level 1
Surprise!
|
|
« Reply #3471 on: June 26, 2013, 04:57:34 PM » |
|
FINALLY got around to starting my batch sprite drawing routine. I don't know why, but I always seem to put off anything that involves calling OpenGL functions. I guess it's the monotony of setting up buffers, matrices, etc just to get some shit on the screen. In the end it wasn't too bad and getting something to display didn't take more than a few minutes, but still... next project, I want to deal with a software renderer that has nothing to do with OpenGL. I find it more fun to directly manipulate the pixels myself or at least have functions that I can call that simply say "draw this at this location" without having to worry about special accommodations like having too many drawcalls or only using the OpenGL context from one thread.
|
|
|
Logged
|
|
|
|
Geti
|
|
« Reply #3472 on: June 26, 2013, 05:08:21 PM » |
|
Another possible alternative: use something like irrlicht which hides the opengl calls behind a much nicer interface, yet remains low level enough to benefit from batched rendering if you want to go that route. We use it for KAG, unlocking the fps leads to >200fps on almost any machine, we'd rather keep those extra clock cycles for CPU hungry scripts though
|
|
|
Logged
|
|
|
|
harkme
Level 1
Surprise!
|
|
« Reply #3473 on: June 26, 2013, 06:10:20 PM » |
|
Hmm, that looks pretty good! This current project merely raycasts and then draws textured quads within that scene, so I'm not sure if it's a good fit, but irrlicht definitely looks like something I'd use for a more traditional 3D game (for which I do have something in mind). Thanks for the heads up!
|
|
|
Logged
|
|
|
|
heisenbergman
|
|
« Reply #3474 on: June 27, 2013, 10:47:44 PM » |
|
It's a joyous moment when one programs a huge chunk of code to implement a major functionality, then compiles it expecting to fix something that was coded wrong... but there's none. Then runs it expecting to fix something that was programmed wrong...
...but it works perfectly.
\o/
|
|
|
Logged
|
|
|
|
Kurt
|
|
« Reply #3475 on: June 29, 2013, 08:51:29 AM » |
|
Quadtrees
|
|
|
Logged
|
|
|
|
Graham-
|
|
« Reply #3476 on: June 29, 2013, 08:52:57 AM » |
|
It's a joyous moment when one programs a huge chunk of code to implement a major functionality, then compiles it expecting to fix something that was coded wrong... but there's none. Then runs it expecting to fix something that was programmed wrong...
...but it works perfectly.
\o/
I hate that shit. THen yoou're like, why NOTs all the time!??
|
|
|
Logged
|
|
|
|
Dr. Cooldude
Guest
|
|
« Reply #3477 on: June 29, 2013, 12:46:13 PM » |
|
Just made babby's first Mode 13h.
|
|
|
Logged
|
|
|
|
indie11
|
|
« Reply #3478 on: June 29, 2013, 08:47:07 PM » |
|
wrote a rough script to make icons of different sizes for Android :D
|
|
|
Logged
|
|
|
|
Sir Wolf
|
|
« Reply #3479 on: June 30, 2013, 09:45:48 AM » |
|
It's a joyous moment when one programs a huge chunk of code to implement a major functionality, then compiles it expecting to fix something that was coded wrong... but there's none. Then runs it expecting to fix something that was programmed wrong...
...but it works perfectly.
\o/
That's always a moment of suspicion to me. "No way I'm this good. If I can't find the bugs now, I'll be having mysterious problems later down the line. I really wish the problems I must have in here would be more obvious."
|
|
|
Logged
|
"We don't stop playing because we grow old; we grow old because we stop playing." -George Bernard Shawn
|
|
|
|