Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 2 [3]

Author Topic: The Place For Any Programs You Wrote That Aren't Really Worthy Of Anything  (Read 4836 times)

Alexhans

  • Bay Watcher
  • This is toodamn shortto write something meaningful
    • View Profile
    • Osteopatia y Neurotonia
Re: The Place For Any Programs You Wrote That Aren't Really Worthy Of Anything
« Reply #30 on: December 23, 2009, 07:27:29 am »

Hey!  Dice rolling is always worth it ;)

nice... Somehow, you seem to have forgotten to post #include <ctime> in the code (but I imagine you did write it in your cpp).

I didn't quite understand the need for this:
Code: [Select]
return (rand() >> 8) % (max - min + 1) + min;could you elaborate on it?
Logged
“Eight years was awesome and I was famous and I was powerful" - George W. Bush.

shengii

  • Bay Watcher
    • View Profile
Re: The Place For Any Programs You Wrote That Aren't Really Worthy Of Anything
« Reply #31 on: December 23, 2009, 04:12:18 pm »

Hey!  Dice rolling is always worth it ;)

nice... Somehow, you seem to have forgotten to post #include <ctime> in the code (but I imagine you did write it in your cpp).
Weird. It compiled fine for me, using Code::blocks and MinGW.



I didn't quite understand the need for this:
Code: [Select]
return (rand() >> 8) % (max - min + 1) + min;could you elaborate on it?
When I searched how to make random numbers in C++, I found a few people claiming that it's biased to lower bits (or something).

They used >> to shift them, I had no idea when there was bias, so I just chose when max < 10.

Not sure if it does anything, though.
Logged

Berserker

  • Bay Watcher
    • View Profile
Re: The Place For Any Programs You Wrote That Aren't Really Worthy Of Anything
« Reply #32 on: December 25, 2009, 04:31:31 pm »

Behold the awesomeness of my newest dice program that isn't really worth of anything.

Logged

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: The Place For Any Programs You Wrote That Aren't Really Worthy Of Anything
« Reply #33 on: December 25, 2009, 06:33:05 pm »

All I see is a simple 3d shape on a textured flat surface. Can you explain what crappy 3d modelling has to do with coding? :D
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

Berserker

  • Bay Watcher
    • View Profile
Re: The Place For Any Programs You Wrote That Aren't Really Worthy Of Anything
« Reply #34 on: December 26, 2009, 03:12:51 am »

It doesn't roll around without code.

And the physics engine it uses is Ageia PhysX.

crappy 3d modelling
Crappy? Can't you see the specular parallax mapping on the dice? That isn't very easy to make.
« Last Edit: December 26, 2009, 03:47:17 am by Berserker »
Logged

Outcast Orange

  • Bay Watcher
  • [SOMETIMES_SQUID]
    • View Profile
    • The Outcast Orange
Re: The Place For Any Programs You Wrote That Aren't Really Worthy Of Anything
« Reply #35 on: December 26, 2009, 01:48:00 pm »

Sounds intense.
I wish I new the word parallax.
Logged
[7:53:55 PM] Armok, why did you demand that I don't eat you?
[7:54:34 PM] [Armok]: woooooo

Burried Houses - Platform Explorer Demo H - Cloud Scream
Pages: 1 2 [3]