Some Braid designs…

Hi,

So.. I’ve been thinking *alot* about how to best design Braid if I wanted to have a proper time manipulation feature in the game that would ressemble Braid, but still avoid using up MBs of RAM per second… I think I’ve got something, and I’ll try to explain it!

First: do not store the position of every object in the world at every timestamp, instead, only store the events, and let the objects interpolate on the event’s timestamp, their current timestamp/state to know what their new status should be.

I also realized today that I do not need to keep every object of the world in memory, even after they disappear.. all I need to do is make the object’s creation/destruction events get registered in the ‘timeline’ and let the rewind/fast forward feature recreate objects as needed. I should probably have a unique name generated per object in order to know which event goes to what object (instead of linking the event to the object’s address).

I also realized that I’d need multiple timelines, dependent on each other.. so for example, we could have the “world” timeline for the world (for time independent objects), then the “current” timeline that could get rewinded/forwarded (for normal objects), we could also have a “player timeline” that would have its timestamp generated depending on the player’s position in the world (for Braid’s world 4), and a “shadow” timeline that would be used by ‘shadow’ objects for world 5, also probably a ‘timewarp’ timeline to emulate the time-warp feature of the ring, so it could translate the timestamp of other timelines depending on the object’s position relative to the ring..

These timelines would be linked to each other.. For example, imagine a time dependent key in world 4. The world would request the key to update its state (position/broken or not/being held or not, etc..) to the new timestamp X on timeline “world”, this will cause it to ask the “current” timeline for the ‘current’ timestamp at time X, which would translate to timestamp Y (depending on whether or not you rewinded or not), this would cause the timeline to ask the “player” timeline for the new timestamp associated with timestamp Y (in other words, where was the player located at timestamp Y), which would give us a timestamp of Z, now that’s where the key should be.. so the key tries to go into its new state at timestamp Z, it realizes that it was ‘hooked’ (being held) to another object “abc” (player or monster) at that timestamp, so it asks that object (the world actually, since the object could have been destroyed) to get the status of object “abc” at timestamp Z, which could again chain up multiple timestamps (depending on whether it was the player, a time independent monster, or a normal monster) until it gets the state of the object at that timestamp, at that point, it will be able to know the position of that object, and set its own position to the same position as that object (with an offset depending also on the direction of the object)!

Ouff, now that sounded complicated! And we didn’t even start adding a ‘maybe there was a time warping ring in the path of that object between now and timestamp Z..’ Either way it seems to fit so far, holding only events, destroying unneeded objects, and chaining timelines together with each timeline holding its own objects/events, seems to make sense so far.. we do get the correct behavior apparently, and with minimal memory usage…

Now I still have to get my brain into a stable enough state to figure out questions like “what happens if the user gets inside a time-independent platform?” or “what happens when you need to figure out the position of an object when a ring might be in the way?” or “how to interpolate correctly our new state when the requested timestamp is not the old timestamp +/- 1 time unit?”

I’ll start designing some uml diagrams soon to try and make it fit, then I’ll start coding the basic structure… Assuming I don’t see any flaws in the design…

If you have comments about this design, feel free to share! 🙂

See you soon!

KaKaRoTo

PS3 Hypervisor dumped!

Hi again,

Great news for PS3 owners, The PS3 Dev team from http://ps3news.com (of which I am now a member) has been able to dump the hypervisor’s executables in memory! This was done thanks to a kernel module that I wrote 🙂

My first experience with kernel programming was challenging, fun and very frustrating because of the lack of docs! But thanks to the open source nature of the kernel’s source code, I was able to understand how to properly use the read_proc of the create_proc_entry API, and was able to dump the memory of the hypervisor by giving full access to the memory through a /proc entry.

You can  download the source code of my kernel module from here. I’ve decided to release it under the LGPL license.

Read more about it on the ps3news forums.

p.s.: What this means is that we can now start reverse engineering the PS3’s hypervisor’s code in order to find an exploit or some way to trigger the ability to install custom firmware on the PS3. However, this does not mean that the PS3 is completely hacked.

This exploit was first discovered by George Hotz.

Enjoy! 🙂

New project!

Hi,

I’d just like to announce to everyone that I’ve decided to start working on a new project!

Seeing as I’ve loved the game Braid, I thought it would be nice to have an open source clone of the game! I should start working on that soon(-ish), and I hope I can actually see this project through…

Unfortunately, I don’t have much experience or interest in UI/OpenGL work, so I’ll start by designing and writing the low level classes that would allow a game to have the same time-based manipulation mechanic as Braid. And I hope that I’ll find someone willing to join the project and provide the UI/art part of the project!

I’ve contact Jonathan Blow, the author of Braid, and he said he’d be willing to help and provide me with the level file format  he used for the game, so we might be able to have this project working with the levels of the official game (assuming you bought the game and have its data files)!

That’s it, I’ll let you know more about how that goes! In the meantime, maybe someone (who played the game preferably) could come up with a nice name for the clone! 🙂

KaKaRoTo

Braid for linux!

Hello world!

I feel honored to say that I’ve recently been in contact with Jonathan Blow, the author of the awesome game Braid.

For those who don’ t know the game, it is an extremely challenging, fun, rewarding and original puzzle platformer which is so far the best game I’ve found on PSN.

I’ve asked Jonathan whether or not a Linux port of the game was in the works, since I’ve seen him hint at that in old posts on his blog (January 2007 and August 2008). I’m glad to say that he reported that a Linux port of the game was indeed being developed. To quote :

“[..] one is in progress but hasn’t quite been completed, but may eventually be released.”

He also said that the porting is about 95% complete, but I don’t know how much time it will take for the remaining 5% to be completed, so maybe it will soon be available, maybe not, but this is great hope for the Linux community!

I also spoke with him a little about Open Source, and I was pleasantly surprised to see him not completely reject the idea of open sourcing his game, but he said “it is not likely at this time”, so although it is not likely to happen, it is maybe another hint of hope for the future!

Finally, as my last bit of news. Just in case you were wondering, I also asked about possible DLC, to which he answered (no surprise) :

“There will probably not ever be DLC for Braid. The game is complete without it.”

That’s it, I hope these news are comforting to those who are just dying to play Braid on their Linux systems!

KaKaRoTo

Adding reliability to libnice

Hey all,

First news I’d like to share is about libnice!

I’ve been working lately on adding reliability to libnice. This means that you could be using libnice as a reliable socket.. This is accomplished using some form of TCP over UDP, which is compatible with google’s libjingle implementation.

The API doesn’t change much, you only need to call nice_agent_new_reliable, and there’s a new signal ‘reliable-transport-writable’ in case you fill in the internal buffer and nice_agent_send starts returning -1. That’s all!

I know a lot of people were waiting for a reliable transport with libnice. I’ve discussed with many people during GCDS and most of them said that they’d like to see some kind of TCP over UDP in libnice, so I’m happy to say that I finally got around to doing it.

I also decided to make this TCPoUDP algo into its own GObject and make it available through libnice, which means that you could use the TCPoUDP implementation directly yourself, outside of libnice, in your own applications, if you ever wanted to!

Expect this new exciting feature to become available to you in the next release of libnice!

KaKaRoTo

New blog!

Hi all,

Welcome to my new blog!

This is my first blog.. I usually hate blogs, but I thought it would be nice to start sharing some information about what I do.. not what I ate today, but more like, what I’m working on lately…

I just hope I won’t forget about it.. so hopefully, I’ll keep it up to date with  the latest developments on the projects I work on. Mainly, you’ll be seeing stuff about aMSN, Zeitgeist/Teamgeist, Libnice, Farsight and Telepathy!

Click that RSS link now!

KaKaRoTo