Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411641 Posts in 69394 Topics- by 58449 Members - Latest Member: pp_mech

May 14, 2024, 03:07:55 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)The happy programmer room
Pages: 1 ... 172 173 [174] 175 176 ... 279
Print
Author Topic: The happy programmer room  (Read 679958 times)
Schrompf
Level 9
****

C++ professional, game dev sparetime


View Profile WWW
« 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!


View Profile
« 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 Smiley  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
Level 0
***


View Profile
« Reply #3462 on: June 23, 2013, 12:00:34 PM »

Code:
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
Level 10
*****



View Profile WWW
« Reply #3463 on: June 24, 2013, 01:34:09 AM »

Four bugs in fifteen minutes, lets keep this train going Coffee
Logged

Quarry
Level 10
*****


View Profile
« Reply #3464 on: June 24, 2013, 01:37:18 AM »

Code:
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
Level 0
***


View Profile
« Reply #3465 on: June 24, 2013, 12:13:25 PM »

Code:
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:

Code:
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
Level 5
*****



View Profile
« 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:
Code:
item.6=seed packet

In the French file, lang.fr:
Code:
item.6=paquet de graines

All I have to do is call Translator.translate("item.6") and I get the string for the current language!
Logged

powly
Level 4
****



View Profile WWW
« Reply #3468 on: June 25, 2013, 05:40:16 PM »

Four bugs in fifteen minutes, lets keep this train going Coffee

Four bugs, created or resolved? :D
Logged
Geti
Level 10
*****



View Profile WWW
« Reply #3469 on: June 26, 2013, 12:49:15 AM »

Bit of both Wink
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!


View Profile
« 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
Level 10
*****



View Profile WWW
« 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 Tongue
Logged

harkme
Level 1
*


Surprise!


View Profile
« 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
Level 2
**


LoGaP


View Profile
« 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
Level 5
*****



View Profile
« Reply #3475 on: June 29, 2013, 08:51:29 AM »

Quadtrees

 Tears of Joy
Logged

Graham-
Level 10
*****


ftw


View Profile
« 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
Level 2
**


View Profile
« 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
Level 0
***


A wolf cub growing up


View Profile
« 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
Pages: 1 ... 172 173 [174] 175 176 ... 279
Print
Jump to:  

Theme orange-lt created by panic