31.07.05
Posted in everything, games, jini, mobile, projects at 10:29 pm by the2bears
Back in 2002 I wrote a couple articles for The Java Developer’s Journal entitled Jini Surrogate as a Platform for J2ME Games. In fact, Part 1 and Part 2 can still be found on-line. In these articles I introduced the idea of employing Sun‘s under-utilized Jini technology for enabling mobile, multiplayer games. The series was supposed to comprise 4 articles, but due to an unfortunate turn of events the last 2 articles were never written.
As an engineer it can be difficult to look at code you wrote 6 months ago, let alone ideas that were put down on paper more than 3 years in the past. The ideas though, have held up rather well. In fact I spent alot of time implementing them and putting them into action so they certainly haven’t remained stagnant.
All this experience has made me somewhat of an expert on connecting devices to enterprise systems. Recently I’ve had some time to think some more on this and I ask myself “What would I do differently?” the next time around. The first thing I would do is change the container I use, I would move away from a Surrogate object model.
Stepping back a little let me say that I still believe in having a Surrogate object unique to each device connection. I realize that the device does not care what it talks to, and probably never knows or need know the difference. But the back end services do know, they know whether they can see an object representing the device or whether instead they see an API, a large wall of little windows making parts of the system available. I just don’t want to call it a Surrogate object anymore and I don’t want to limit its hosted environment to a Surrogate Host.
So what I propose is this: the device has a small container created uniquely for it, something like a Nanocontainer. The container can then be hosted by a servlet engine, unique to the device for that session. Of course if the container is designed well enough it can also be hosted by a Surrogate Host on a Jini network or in any number of other architectures.
The idea is to keep it flexible yet still defined enough through the container model that as much of the object’s lifecycle as possible is managed by the container itself. Though we’ll likely find out that handling of the connection’s state is pushed out to whatever hosts the container.
Flexibility in how it can be deployed is extremely important as well. Running a Jini network may scare some users away, but hosting servlets? Simple and already well-understood. Want to host a game? You don’t need anything more than Tomcat or Jetty. Ease of use is important, not just for developers and users of content, but those hosting the delivery as well.
What shall I call this container? I think perhaps Pinch Runner. It’s still an obejct there, in the system, on behalf of the device. Doing as little as being the arbiter of the connection’s state and passing messages back and forth to as much as computing all of the logic to solve the necessary operations. I guess sort of like a pinch runner and sort of more. But “Sortof” sounds more like a vodka brand than a piece of software.
java jini mobile multiplayer opensource pinch runner project
Permalink
TrackBack
These icons link to social bookmarking sites where readers can share and discover new web pages.
Posted in conway's life, everything, games, projects at 11:35 am by the2bears
I now have a better Conway “engine”, using bitsets. Some micro-benchmarking on a 100×100 grid took around 3500 millis to iterate through 10000 generations. The old code took over 15 seconds, so there’s a considerable gain in performance. Less memory is used as well, always a good thing… we’re spoiled these days with memory and processing power.
The new engine allows grids of any size and can wrap-around or not. I ended up not using 8×8 grids, instead choosing to “stretch” the long out on a single row. An array of longs corresponds to the rows of the grid. Extra bits are ignored, and additional longs are chained for each row as necessary. For ease of use I did go with an object wrapper, allowing me to have multiple grids iterating at the same time and rendering them appropriately.
A fun little project and good practise for bit shifting. I now need to define ways to import and export the resulting iterations of the grid.
algorithm bits conway java project relentless automata
Permalink
TrackBack
These icons link to social bookmarking sites where readers can share and discover new web pages.
30.07.05
Posted in books, everything at 11:50 pm by the2bears
A few years ago I came across the book Hard-Boiled Wonderland and the End of the World by Haruki Murakami. I don’t remember exactly how I found out about it, but it’s likely that it happened through a series of links and recommendations at Amazon. It’s a surreal story bordering on science fiction and that’s likely how I found it. I’m very glad I did, as The Wind-Up Bird Chronicle is now the sixth Haruki Murakami novel I have read.
The book shares some similarities with the other Murakami novels I’ve read: a Japanese “everyman” as the main character, elements of fantasy just subtle enough so as to stop short of making the story truly unbelievable, relationships in disrepair and an ecclectic supporting cast. There were some differences this time around as well. Toru Okada, the protagonist is a man in a marriage that is at first slowly fading away and later all but gone. Yet he approaches this problem with a rather level head instead of continually making a series of bad choices as other main characters in Murakami novels tend to do.
Toru is intent on finding his wife and saving his marriage. The path he must take introduces him to an interesting and diverse group of characters. There are sisters named “Malta” and “Creta”, a former Lieutenant in the Japanese army, and a young teen-aged girl who both tries to help him and tries to kill him. The connections to these characters and the many others are interwoven and keeping track of it all can be a little tricky at times, but the conclusion of the story is both strangely satisfying and vague at the same time.
The soldier, a Lieutenant Mamiya, is a particularily interesting character. At several times the book will flashback to the Lieutenant’s experiences before, during, and after WWII in Manchuria. These stories within the novel contain a unique perspective to the war that I have not come across before. Yes, it’s still bloody and brutal, but it’s just that much different when told from the Japanese side as they await the arrival of the Soviets knowing what they have done.
It is needless to say difficult to describe such a novel in only a few words. I can only say that I enjoyed this book very much and as a fan of Murakami I was satisfied and certainly not dissappointed. There is plenty of substance here for those who like to be compelled and think about a story, for those who like to share in the responsibility for their entertainment.
books haruki murakami japanese
Permalink
TrackBack
These icons link to social bookmarking sites where readers can share and discover new web pages.
29.07.05
Posted in everything, life at 10:31 pm by the2bears
So it ends, 4+ years at Kayak/Valaran. I handed in my office key, my laptop, and my passwords and walked out of the Kayak office for the very last time. It was by and large a great experience, especially early on when we were a family with a purpose and full of vision. Time to move on.
career life
Permalink
TrackBack
These icons link to social bookmarking sites where readers can share and discover new web pages.
27.07.05
Posted in everything, games, web at 10:29 pm by the2bears
A web-site that I keep going back to every once in awhile is Sodaplay. There really is a game in there, besides the Sodarace game. Some kind of 2-dimensional platformer. I love the physics engine in this: gravity, springs, muscles etc. A simple set of rules that yields emergent behaviour. I have a drawing my son Charlie did, of a creature, that would make a perfect character in a “Sodaplay Universe” game.
games physics soda play
Permalink
TrackBack
These icons link to social bookmarking sites where readers can share and discover new web pages.
« Previous entries Next Page » Next Page »