simple 24 hour game clock

Post those lines of code you feel like sharing or find what you require for your project here; or simply use them as tutorials.
Ion Dune
Posts: 453
Joined: Mon Nov 12, 2007 8:29 pm
Location: California, USA
Contact:

Post by Ion Dune »

Midnight wrote:Since when is u32 4294967295?? is it not 65535 give or take?
u16 is 65535, not u32.
Dorth
Posts: 931
Joined: Sat May 26, 2007 11:03 pm

Post by Dorth »

2^1=2
2^2=4
2^3=8
2^4=16
2^5=32
2^6=64
2^7=128
2^8=256
2^9=512
2^10=1024
2^11=2048
2^12=4096
2^13=8192
2^14=16384
2^15=32768
2^16=65536

What was that? Oh yes. Fail Midnight. Fail. Oh, and before you embarass yourself further, s32 positive max != u16 since we use only 1 bit for the sign, aka, s32 ~= u31 as far as positive go. Still far above of 86400000.

Pick up a book and learn something, it'll do you good. And btw, DO learn to use time.h, else you will eternally fail at daytime functions.

-Edit-
Stupid Ion Dune being ever so slightly faster than me :P Albeit my retork had more style, gotta give me this ^^

*sigh* Guess I'm feeding the troll tonight, heh? Sorry hybrid for that pass the other day ;)
Midnight
Posts: 1772
Joined: Fri Jul 02, 2004 2:37 pm
Location: Wonderland

Post by Midnight »

Dorth wrote:*sigh* Guess I'm feeding the troll tonight, heh? Sorry hybrid for that pass the other day ;)
No need to be a prick dorth. And I'm the one who should be embarassed?

The way you are acting, and I did what?
not know everything in the universe?

meh I did my best.
Midnight
Posts: 1772
Joined: Fri Jul 02, 2004 2:37 pm
Location: Wonderland

Post by Midnight »

Ion Dune wrote:
Midnight wrote:Since when is u32 4294967295?? is it not 65535 give or take?
u16 is 65535, not u32.
so then why doesn't mine work?
Dorth
Posts: 931
Joined: Sat May 26, 2007 11:03 pm

Post by Dorth »

Heh, nice edit of your post there mid. Somewhat better than the co......er you called me and subsequent added fail.

Now you say yours doesn't work. What doesn't? Does it refuses to compile? Does it compiles with warning? When using it, is it going at an abnormal speed or showing garbage value? Have you tried a watch on the values at run time (if using Msvc, if not, a similar functionality of another ide). When you say "yours", do you mean your version of the clock or his? A define is a macro, it will replace the text by the second text, indiscriminently. If you aren't careful, you can merge 2 values or use it in the wrong place setting unforeseen concequences (thus why #define should be avoided if something else, like a global const or an enum can do the job). If you are using a var to store it, what type? What ide are you using? What files are you including, what other defines are made, etc. Thing is, number of thing can go "wrong". How would be a huge help to guide you to fix it.
Midnight
Posts: 1772
Joined: Fri Jul 02, 2004 2:37 pm
Location: Wonderland

Post by Midnight »

my code. I'm using codeblocks with mingw. gcc or whatever compiler it comes with.

It's a u32 not a macro and you deserved the post I edited but this community doesn't. you came flying out of nowhere batshhit crazy about some really stupid shhit and you know it. Anyway lets just say you owed me one and move on.

What happens is when I set gamespeed which is of type f32 (which i just realised but should work) higher then 65535 it stops my clock cold.

f32 gamespeed transfers into setClockSpeed(f32) which transfers into setSpeed(f32) (from timer.h in irrlicht)

Like I said I just realised they are all f32 not u32 I'm not sure what I was thinking then but shouldn't those limits be even higher?

Maybe I should watch those values now I smell something really fishy in my code. what do you think?

Oh and why the gently caress does me giving away free code always have to end with everyone ganging up on me and being a d-ickwad? because I said something more then a year ago that you didn't like? petty.. just petty.
Dorth
Posts: 931
Joined: Sat May 26, 2007 11:03 pm

Post by Dorth »

Batshit crazy, really? I do think you are much closer to the definition of said expression than I ever risk being. Also, I doubt much anyone care what happened with you 1 year ago. You got a couple of ban on IRC and that was that. People grow up in 1 year and I do believe most people welcomed you back with open arms. The fact you choose to bite and snarl the second you touch the ground, well, that's more you than anyone else's fault, really.

Also, if I'm reading your code right, at that speed, it would take about ~65 Irrlicht timer ticks to overflow your u32. Might have other kinks too, who knows, not gonna debug that.
bit-pusher
Posts: 13
Joined: Tue Jun 09, 2009 11:53 am
Location: Wales, UK
Contact:

Post by bit-pusher »

Midnight wrote:let me guess bit-pusher. either you had this junk laying around and decided that it was clock posting time because I made you think of it. OR you thought hey a clock I can do that faster then midnight maybe I should throw some poop together really fast and try to out do him. it'll be easy it's just a clock. sound about right bit-pusher? it's ok don't answer I don't want to hear your lies.
Actually it's from a game-in-a-week I was working on. Working fine in there, so I thought I'd post it as someone might find it useful... always nice to see more than one way of solving a problem. No worries though, removed it as it seems to be causing problems.
Midnight wrote:... after browsing his website I already know which one it was.
Err - ok! Thanks for checking out my site though :)

Well I think I'm outta here folks. Great lib you have here in Irrlicht, many congrats. Have a good one.
coldcity.com - code, games, stuffs
Midnight
Posts: 1772
Joined: Fri Jul 02, 2004 2:37 pm
Location: Wonderland

Post by Midnight »

Dorth wrote:Also, I doubt much anyone care what happened with you 1 year ago. You got a couple of ban on IRC and that was that. People grow up in 1 year and I do believe most people welcomed you back with open arms. The fact you choose to bite and snarl the second you touch the ground, well, that's more you than anyone else's fault, really.

Also, if I'm reading your code right, at that speed, it would take about ~65 Irrlicht timer ticks to overflow your u32. Might have other kinks too, who knows, not gonna debug that.
Uh you obviously care. and it wasn't a couple of bans it was just you being a dickhead which you then ended up apologizing for. I have grown up a lot but that doesn't change how pissed off a person gets when everyone around them is holding spears to their throat.

and since when did ANYONE welcome me ANYWHERE? WTF seriously you are going to try to make people think that you are a saint and I'm the devil?

the definition of insane is to repeat one's actions expecting a different result... so therefor dorth by taking up arms against me you are the epitome of batshit crazy.

how come I can say batshit and not f uck?

I could say shithead and fuckhead but not gently caress? this chat filter is fail.

So I guess if I master C++ then everybody will like me? no? then why the hell does dorth get praise? he is like the virus to cure of me. I said one thing to him on IRC and he had me banned within seconds having pulled his friend card and actually called the admin of freenode like a little b itch.

and dorth it's an f32 not a u32 I said it twice so if you didn't even want to help then why the hell did you ask? so I guess you'll correct me when I'm wrong but you won't help make me right. kinda makes you a hypocrite then also I guess.

as for you bit-pusher it doesn't really matter where the code came from does it? it's that you intentially 1up'ed me and that's rude anywhere you go bro. I'm sure nobody wants you to leave. none of this is your fault. Even if it was I might say "fail" but I don't hold a grudge for a year after meeting someone the first time like dorth does.

you may be better at C++ then me dorth but at life in general you definately fail dorth.
Dorth
Posts: 931
Joined: Sat May 26, 2007 11:03 pm

Post by Dorth »

If you had checked IN Irrlicht code, you'd have seen at one point the value is converted to u32. Also, you seem to be mistaken as I had nothing and I mean nothing to do with your kline. I heard of it after effect. I only chose to ban you from my channel when your banter started disrupting others and I had planned it as a temporary ban. The fact you got 3 bans and then a kline within a week by 3 different communities speak louder than any argument I can make, however.
xDan
Competition winner
Posts: 673
Joined: Thu Mar 30, 2006 1:23 pm
Location: UK
Contact:

Post by xDan »

Regarding your "God" code:

The first response to your code was a joke or meant in fun. Completely in tone with your post itself which was a joke on religion. You got out of proportionately angry about this, you took it too personally when it was simply meant in fun.

You started insulting people and swearing. And so it went downhill from there.
the definition of insane is to repeat one's actions expecting a different result
So how many attempts did Edison take to invent the light bulb? :P

(oh noes! You'll accuse me of being cocky! Solution = lighten up, it's just a joke, not a personal attack on you)

Please, for the love of Richard Dawkins, other forum members, and any small animals you happen to meet IRL, stop taking everything so personally, learn some anger management techniques, and CHILL OUT.

Count to 10 now before replying...
shadowslair
Posts: 758
Joined: Mon Mar 31, 2008 3:32 pm
Location: Bulgaria

Post by shadowslair »

Please stop it, since it`s absolutely pointless and now it looks rather childish and ugly...
"Although we walk on the ground and step in the mud... our dreams and endeavors reach the immense skies..."
Ion Dune
Posts: 453
Joined: Mon Nov 12, 2007 8:29 pm
Location: California, USA
Contact:

Post by Ion Dune »

Hahaha, I love this midnight guy, he brings life to the irrlicht community.

*quietly applauds*
Midnight
Posts: 1772
Joined: Fri Jul 02, 2004 2:37 pm
Location: Wonderland

Post by Midnight »

Dorth wrote:I only chose to ban you from my channel when your banter started disrupting others and I had planned it as a temporary ban. The fact you got 3 bans and then a kline within a week by 3 different communities speak louder than any argument I can make, however.
The fact that you are a power tripping loser that bans people and trolls the forums and calls me a troll speaks louder then 1 million banshees with megaphones.

Go back to p-l-aying more g-a-mes person! xdan and shadowlair you can join him. (Edited by BlindSide, go wash your mouth out with soap!)

Oh yeah didn't you love how your ban meant nothing?
I was back within minutes.
Dorth
Posts: 931
Joined: Sat May 26, 2007 11:03 pm

Post by Dorth »

(Edited by BlindSide: Don't try to direct his rage at me :P Also locked as that seems to be what the sensible majority wants. It's very shameful that we lost a productive member of the community, Midnight I am not blaming you but, can you feel atleast a little guilty for this? )
Locked