Archive for thoughts

Massive in MMORPG (no, it’s not about some stupid game addiction)

Posted in programming, project zombie with tags , , on March 29, 2009 by bey0ndy0nder

Lately, we’re having day-dreams about the possibilities of having real massive multi-player games.

I think, the problem is still with throughput. In the end it is great that you may have a server that is bad-azz but if you are limited by the amount of INFORMATION (all this is hard-core information theroetics, if you really think about. What is information and how much do we need to in order to represent it) that you pass around, i.e. you are IO bound, what does it matter then?

That why I think it is important to localize communication, so you can sustain high throughput. For example, if you have a super-duper server farms that serves apps, but you still need to get all your information from some DB server, you are IO bound! (Hey, my DB server is capable of generating 200 MeV of energy, in order to punch of in space-time. Because Dr. Manhattan said that we have to invalidate existence in order to solve this NP database problem… whatever he says…I follow)

So, we localize our DB servers to simulate some arbitrary small grid (say, a city block). But, we still need to track global information, and pass that around. But, we can try to localize to. Maybe we just use a level of detail scheme so we are not passing as much information to servers further away from us.

The problem with this is we still need to push that data out to the end user, through the internet.

For games like WOW, I believe they minimize the amount of information they need to pass.

But what if you want to have a game with lots of “stuff” going on at the same… lots of action… how do you sustain throughput in this case? You still need to miminize the information that is required to keep people in the same “state.”

How can one distribute this?

I think we should just start simple, then build up from that. What also really need to specify exactly what sort of game-play, and behavior that we expect, in order to engineer our system to support that vision.

I’m sick of writing, time to eat.

Zombie “smooth wandering.” (randomly)

Posted in GPU Noise, GPU Random Number, programming, project zombie, thoughts with tags , , on October 7, 2008 by bey0ndy0nder

Right, I mentioned in an earlier post that I need my Zombies to wander randomly. However, if I simply randomly change the orientation the behavior would be similar to random walk. I.E. changing of orientation would not be “smooth.” So we need some sort of interpolation. First, I only need one degree of freedom for this sort of orientation, e.g. yaw. Secondly, I don’t need much precision, since the plan is to smoothly interpolate between orientations. So, some preliminary brainstorm suggests that I can pack a 2d vector (on the xy plane) into a 32bit float. That leaves me with 3 free floats left, which I can use to store interpolation offset. This leaves me with the question of “uniform smoothness” during orientation interpolation. I do not want to use quaternions since I only require a single degree of freedom. Perhaps I can store a single float “theta factor,” and interpolate this theta (i.e. X = cos(t)i + sin(t)j).

Edited:
Maybe I need to give some more thoughts into this. Smoothly interpolating orientation is fine, but we also need to think about the rate of this rotation. THis probably will be a randomized factor also. I don’t EVERYTHING to have smooth rotation, some need to arbitrarily change directions. Yeah, I think randomness will be fine. Just have to have some sort interpolation tho, so you won’t have TOO abrupt of a change.

More on the whys of md5

Posted in programming, project zombie, thoughts with tags , , on October 4, 2008 by bey0ndy0nder

Edited: I do not claim the stuff below is right. It’s just my thoughts, and in no way shape or form is attempting to provide a concrete claim of understanding .

Yeah, if you think about it. The compression functions of md5 scrambles the bit in an independent manner. Of course, the probability of a bit changing (through bitwise ops) is not dependent on any other bits, thus it is independent. So given a sample space S, where A and B comes from, P(A | B) = P(A), so P(AB) = P(A)P(B). Of course! They are binary bits! This makes sense. So with the way it is rotating it creates an ‘avalanche effect,’ so to minimized the chance for collision of similar digests (specially with this P(A)P(B) combinatoric thing).

After rotating through this space, the probability of collisions between two similar digests is very small. Just examining the output, since we know it’s can have 2^128 events in this sample space S, and since they are independent, the P(A) where A is in S = {2^128 elements} is very very very small.

But we also know now that MD5 has collision attack problems. Why? Just glancing at the wiki page it has to do with local collisions.. Hmm interesting.

This works in mind mind. I don’t have to convince you!!!

MD5GPU algorithm implemented (source code)

Posted in glsl, gpu, programming, project zombie, source code, thoughts with tags , , , , , on October 3, 2008 by bey0ndy0nder

So I started implementing the MD5GPU algorithm. It’s pretty straightforward. Matter of fact, I will be brief. (Note, I have not tested the code below)

From the original MD5 algo., we need to break the input into 512 bit chunks. So, we need to first pad the input to a length a, and then add 64 bit to it in order to be able to break our input into 512 bit chunks, such that:

a congurent to 448 mod 512. So we keep on appending 0 to our digest (after we appended a 1 first) so that (a – 448) mod 512 = 0. Since, (note ~ is the equivalence relation)

a ~ b mod n => (a-b) = cn, => (a-b)/n = c, where c is in Z (integers), iff (a-b) mod n = 0. (Maybe in a future post I will talk about how this relates to group theory.)

But for our problem, since the message length is a constant 128 bit, then we know from the get-go that a is 448.

Okay, that’s not all that interesting, since I’m just describing the algorithm. I may post some more on this tomorrow. I’m heading out for the night.

The interesting part is WHY does this thing work? Why does it produce results that passes all the DIEHARD tests? My intitutive understanding of this (but I’m not sure. Never studied crypto) this is due to the combinatoric explosion nature of working with 512 bit chunks. The compression functions are such that a change in ONE single input bit results in change of each output bit with a probability of 1/2. So, it’s like we are ’scrambling’ the input in this 512 bit combinatoric ’space’, which is a huge space… (I’m really sorry if the above bit totally pisses you off due to all the hand waving due to ignorant understanding)

Not sure tho. That’s just my intuition…

What do you think?

The truth is…

Posted in thoughts with tags on October 2, 2008 by bey0ndy0nder

That I really don’t understand anything…

errrr… Do I pretend sometimes that I do? I guess. But I need to remember this I guess, that I know absolutely s**t.

So just leave me alone dude. I believe in conspiracy theories…

It feels snuggly and comfy, wrapped in this blanket of ignorance.

Yeah.

But what can you do in this hypocritical reality of ours?

Follow up on News IQ thing

Posted in thoughts with tags on September 30, 2008 by bey0ndy0nder

Follow up on the last post. I realize the reason I scored so high is because I DO FOLLOW the news, whether it comes from main stream media or some alternative source. Information gets passed around, and eventually it will filter down to you, when you actually follow the news, any sort of news (big foot found on mars type of news count too, I suppose. Hey, you would know, that, we’re actually like sending crap to mars man!).

But still, there is a difference in paying attention to the MSM and believing in the crap they shove down your throat.

F**K the MSM!

F**K the dominate paradigm!

Nerd revolutionaries UNITE!

(but learn you grammar, you dumbass!)

(no bite me! I’m a revolutionist. Revolutionaries don’t need no grammar, we just need passion, funds, and weapons!)

(No! Homeland security is going to get you, stupid ass.)

(whatever man, whatever)

Code versus Design versus Time versus, ahh forget it, just call it armagedon

Posted in programming, project zombie, thoughts with tags , , , , on September 29, 2008 by bey0ndy0nder

So what is the best way to software engineer a large project? Well, I learned about the object oriented design in school, which basically (hand waving commence) is use case driven with iteration and refinement at every stage of the development process (not too sure man, I don’t remember a damn thing from that class). But what about the agile method and all that other “stuff.” No idea. Maybe I should read up on it. Well, the S.E course I took went over Agile, among an assortment of other S.E stuff, but I don’t remember much about it. *Cynical statement* Nice way to burn wads of cash when you think about it, going through 4 years of school and not remember a darn thing.

But for Project Zombie, I started with a few use cases and scenarios, then I drew some UML class diagrams to map out an initial picture of the relationships between classes. Then I just sat down and banged them out. And pretty much along the way I did the iteration and refine thing.

So far I’m happy with the way this project is going.

Refactor, refactor, refactor…

So I refactored again my event delegation thingy. What I’m doing now is instead of composing the event Registers inside classes, I am simply pushing these objects to whatever classes that needs to register for events. This is a better design. (Much cleaner, since they can be allocated on the stack)

Also, having thought about the Singleton thing, I think if I re-coded the way events are registered by invoking directly the event PUMPS (the thing that updates all observers observing an subject. Observer pattern) to register events is a BETTER design. I chose my current design initially because I was worried about the behavior when changing states (remember, my system is Finite STATE driven with the concept of stateful and stateless states, think of them as stateless or stateful webpages; I totally jacked this concept from SEAM), i.e. what is the behavior when I need to unregister events? During my initial refatoring, I ALMOST went with the singleton route, but I got freaked out, totally concentrating too much on decoupling (and KISS, and DRY, damn you the Pragmatic programmer! You should go out and read this book now. It’s awesome although I haven’t finished it yet). That is to say, the way I’m doing it now registering for events is decoupled from the event pump itself.

But now I think about it, this is a none issue. When state changes everything should be automatically unregistered from the event pump (current behavior), so if I implemented the PUMPS as singletons they would behave the same.

But who knows, maybe the way I’m doing it now may have advantages later.

I may have to implement other events such as Camera changes etc, I may implement them using the Singleton design mentioned above.

I sort of rushing things, so perhaps I should give more thoughts to design when iterating and refining.

Bey0nd’s trac

Posted in programming, thoughts with tags , , on September 24, 2008 by bey0ndy0nder

I’m using TRAC, a very nice wiki-cum-source-browser thingy. I love it.

You can browse it at:

Although be warned that the trac server is running on my home machine, just like my dokuwiki server, so they are usually down when I’m asleep.

My web-page

Posted in thoughts with tags on September 22, 2008 by bey0ndy0nder

I have a web-page at:

(parnoid about putting my home server on the net)

Right now it points to my internal wiki. The wiki documents my projects. Well, it’s relatively new, so it only has my newests projects.

And the server is on my personal machine, and this machine is in my bed room, so I often turn it off when I sleep at night.

Sigh, I need to get a dedicated server.

The eventual plan is to host a personal webpage on Jboss utillizing SEAM. SEAM plain rocks. Well, perhaps it’s because I used it alot at my last job. So I’m used to it. I want to look into Python web development. *Sigh* I want to really get into doing functional type of stuff. But *sigh* I enjoy doing C++ for graphics development. But *sigh* market for Java is HOT.