Global Game Jam 2012
… This is a really late post, but, whatever.
I attended Global Game Jam this year for the first time ever. It was held at UBC, and there were over 180 participants! The theme was the a picture taken from the wikipedia page for ouroboros. Our team was amazing and awesome. It seemed like when every other team was working with a gloomy spirit and their heads hanging low in a fierce race against time, our team was the only one that filled the room with laughter; it almost seems as if we were the only team that had fun during the 48 hours.
But more importantly than that, this is probably the first time I’ve managed to actually finish a polished game in any team. I guess the time constraint really helped because the 4 or 5 other collabs I had done were without any kind of deadlines, and towards the middle interest just kinda fizzed away.
Here is our final product: http://globalgamejam.org/2012/reverse-rpg
It was created in GameMaker HTML5 Version, but when we exported it to the web it lagged too much, so we only exported an executable.
At first we had planned for the mechanic of losing abilities every few levels because the robot was running out of power, so it had to get rid of some parts, but those parts are picked up by another robot who in the end appears before you as the boss. This was our interpretation of the theme. However, near the 24 hour mark we realized that this was going to be impossible to finish so we cut it out… But don’t worry! You see the markings on the doors? That’s actually a snake eating its own tail! So …. we did follow the theme (ok, it’s a very bad excuse :( but what can we do)
Still, I personally think it is very fun, so definitely give it a try!
Ludum Dare 22 is Over
You can find my submission here.
It was quite a bit of fun working on this, but looking forward a lot more to GGJ where I won’t feel so lonely because I won’t be working by myself.
I think I’ll try to finish this one up if I can find time to. Until something more interesting happens and I forget about this :(
But it was definitely worth it, because at least I managed to learn the Box2D system, which will probably help me in the future.
And no, the reason I ran out of time was not because I spent too much time on useless stuff this time. The Dialog class was surprisingly very simple and quick to implement, and I spent maybe an hour or two total working on it and debugging it, so less than 5-10% of my time.
One notable submission I’d like to point out is Minicraft by notch (the guy who made Minecraft; go figure). It’s got an amazing amount of detail and polish for something done in 48 hours. Hopefully I’ll be able to achieve that level of efficiency some day.
Ludum Dare 22 – Day 1
It’s my first Ludum Dare and already 1 day has passed…
The theme “Alone” doesn’t do a great job of inspiring ideas, so instead I was inspired by the “Kittens” theme that lost.
The basic premise is that you have been trapped somewhere by some evil thing, and you want to escape. Also there are kittens that you can pick up and throw to move forward. It’s fine because cats always land on their feet.
So because it seems to involve some physics I decided to try learning Box2D while I was at it. Probably not the best idea.. learning a new engine for a 48 hour contest.. due to that I really don’t have much done. I have the character movements (WAD keys) done, and he can collect coins and go into doors (S key) and there’s some kind of message box that I can use to explain the story in dialogue-style (space key). But, as anyone can tell, no cats, no puzzles, and really, no game. And also no art and no music….
http://megaswf.com/serve/1427308
I’m not sure how much I can get done by the end, but I’m quite interested in finishing this, since I’m not planning to make it a long game with 40 levels or anything. A short but interesting 4-5 levels + a boss fight that I have in mind. Let’s just see if I can actually manage to finish what I say I’m going to finish this time…
Running javascript from within GWT-CKEditor
I’ve recently been using the gwt port of CKEditor as a WYSIWYG editor for an app for a school project, and ran into a bit of a problem. The visual mode is very good, but it doesn’t seem to support javascript! For example, the following code produces some text which when clicked should show an alert. But if you actually tried clicking it, nothing happens.
CKEditor e = new CKEditor();
richTextArea.setHTML("<p onclick='alert(\"test\");'>test</p>");
After some messing around, I came up with a solution: throw the javascript in an iframe, and throw the iframe in the editor!
But I didn’t want to create an actual html page on the server for every small bit of javascript I want to have running in there. What I want instead is to inject the html into the iframe directly.
After some more messing around, I finally got it to work. The main work lies in this JSNI function, which works for gwt-ckeditor-0.5.jar
private native void injectToIframeInCKEditor(Element CKEditor, String iframeName, String contents) /*-{
var editorName = CKEditor.firstChild.firstChild.name;
var editorIframe = $doc.getElementById("cke_contents_" + editorName).firstChild;
if (editorIframe.contentDocument) editorIframe = editorIframe.contentDocument;
else editorIframe = editorIframe.contentWindow.document;
var ourIframe = editorIframe.getElementById(iframeName);
if (ourIframe.contentDocument) ourIframe = ourIframe.contentDocument;
else ourIframe = ourIframe.contentWindow.document;
ourIframe.open();
ourIframe.writeln(contents);
ourIframe.close();
}-*/;
Usage example:
Note: you must wait until the CKEditor has actually been added to the document! Also, this won’t work in source code view (of course)
CKEditor e = new CKEditor();
e.setHTML("<iframe id=\"test\" />");
injectToIframeInCKEditor(e.getElement(), "test", "<body onload='alert(\"Hello World\");'><p onclick='alert(\"test\");'>test</p></body>");
The downside of this is that you will need to have your own buttons that generate iframe code; that is, the built in CKEditor toolbar buttons won’t generate stuff inside the iframe. Also, whenever the iframe is reloaded, either because it was dragged around in the editor or because you went to the source view and back or whatever other reason, it will be reset, and you will have to reinject the data. That would mean adding handlers to check when it would be reset, and possibly autosaving the state of whatever is happening in the iframe.
But, at the very least, you can now run javascript in the editor, which opens the door to a lot more interesting rich editing experiences.
Google AI Challenge 2011
This year Google is again holding an AI development challenge, which can be found here.
Unfortunately I had not heard of the AI challenge in 2010, so this will be my first crack at it (ie. I am in!) This looks like it might be pretty interesting.
The aim of this particular challenge is to design a multiagent AI that controls a colony of ants as they set out to take over the world. Problems explored I believe would be cooperative pathfinding, planning with limited knowledge, offence vs defence, etc. Even just the battle strategies seem like they might be very interesting, since it has inherent and significant noise. I expect that there won’t be an AI that dominates every other AI in every map.
I will probably try to implement increasing cost tree search for the pathfinding portion, and use a evolutionary genetic algorithm for battle strategy, starting with a few preset ones like aggressive or defensive, and applying a different strategy based on the opponent (eg, evolve a genetic algorithm for each opponent, and switch to the one for the current opponent). Hopefully I will be able to make it parametric so fights of n ants vs m ants falls out directly.
I have no idea at all about the general strategy about exploring to get more information vs building up forces, about what size packs to travel in, what formation, etc. Lots of things to play with :D
One thing that I think will be very important to exploit is that the grid is symmetrical, which means you actually have a lot more information than just what isn’t covered by the fog of war.
What I think would be more interesting would be if a team loses all of their hills then all of their currently surviving ants get super strong and aren’t killed as easily :P
On Faster-than-light Neutrinos
Edit: Seems it was loose cable… @.@
For those who aren’t familiar with the announcement from CERN, here is some good background reading. http://scienceblogs.com/startswithabang/2011/09/this_extraordinary_claim_requi.php
While most people remain skeptical of the results, such as the guy at xkcd, I for one actually believe that there is real possibility for the validity of this result. At the very least, I don’t believe that the guys at CERN could have made an elementary mistake, so whether or not we find neutrinos actually travelling faster than light, I think there will be new things that we can learn from this.
Anyways, here is my theory which seems to satisfy data and all experimental evidence. Note that I am not a professional physicist or anything like that and that these are merely the conjectures of a random person sitting in from of his computer.
Let the limit of speed be denoted as c’. I claim that if light does not actually travel at c’, but at c=c’(1-ε) then everything will work out.
As Maxwell derived, the speed of an electromagnetic wave is . But what if light is not a pure EM wave? There have been evidence of the particle nature of light, leading to the concept of wave-particle duality. But what if this results in c<v? Sure we have measured light to be 299,792,458m/s, but have we done similarly precise measurements of
and
and checked that the measurements actually do match up?
Ok, even if light travels at the same speed as an electromagnetic wave, there is no reason that there does not exist something else that can travel faster than c. The textbook derivation of γ is done with the assumption that c is constant across all IRFs, which results in . But if it is actually c’ that is constant, gamma would change correspondingly and values v such that c<v<c’ would still have a real and valid gamma. None of the laws of relativity will be violated, not even causality. c’ would be the speed of propagation of events in ether. This would have the result that in reference frame A travelling very fast relative to B, an observer in A would observe light in B to be moving at a different speed than c. Thus, there is the possibility of proving/disproving this claim using experiments.
What would this mean now to be travelling faster than c? No, there is no possibility of time travel. You will just “see” the result of an action before you see the source of it. This is analogous to what happens when you travel faster than sound. But this does not mean that the result of an action actually occurs before its source.
There are things that intuitively agree with this theory. If the speed of light really is the limit of event propagation, such that going faster than the speed of light results in breaking causality, then why can we move faster than the speed of light in a different medium? Thus, who could say that our measured value for c really is the upper bound on speed?
As for the “evidence” from the supernova, well do note that neutrinos have mass and thus can be accelerated. What if the supernova did not generate enough energy to accelerate the neutrinos that made it to Earth past what their speed was? After all, the supernova doesn’t target all their energy towards sending neutrinos to Earth. Similarly, I believe the other labs probably have a smaller energy output than CERN (though I haven’t been able to find any info about this anywhere) so maybe it’s just that they haven’t been able to give the neutrinos enough energy.
Well, I am very likely to be completely wrong and making an idiot out of myself cause like I said I’m not very educated in this subject matter.
Updated Aimbot for DDT (supports version 2.6)
Here is the updated aimbot for DDT: Download Here
The updated version works with versions 2.3-2.5 as well so if you play multiple servers there’s no need to have multiple versions of the aimbot.
Once again no guarantees that future versions will be supported or that I will create updates for future versions.
Have fun.
Previous version can be found here.
NOTICE: The Facebook DDTank team has patched this aimbot, and I have no intentions of spending time updating this to work again. For the people that want to play fairly, you can either hope that the people in your server are honest enough not to use an aimbot, or you can try out the Facebook server.
NOTICE2 (Aug 02): It has come to my attention that Game321 has blocked this aimbot too. Once again I reiterate that I have no intensions of updating this. Hope you enjoyed it while it lasted, and have fun learning the angles now.
Aimbot for DDTank online flash game (弹弹堂, boomz)
Edit (July 23): The aimbot has been updated to support DDT version 2.6. Read the post HERE.
I was bored like 5 months back so I decided to create this. All the instructions are inside the archive. I was planning to add in a whole registration and login system so you would have to pay to use it… but I got lazy and 5 months passed and I still didn’t add it so I thought “what the heck let’s just release it”. Anyways, here it is:
This has been tested working in version 2.3.
Note: the instructions included are quite technically challenging – if you do not even know how to open the file, you have no chance of getting it to work.
Have fun.
Great Canadian Appathon
This past weekend me and 3 friends joined the Great Canadian Appathon competition at UBC. The rules of the game is to create a game for the Windows Phone 7 in 48 hours. The 2 ways to achieve this was either through Silverlight for Windows Phone 7, or through using the XNA Game Studio. Obviously, we chose to build our game in XNA.
Simple Array deepToString in AS3
There was a person asking about how to trace nested arrays so the levels of the elements are easily deducible. Eg, if you have an array
[1, [2, 3, 4, [5, 6, [7], 8]], 9, 10] and you call trace on it directly the output will be 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, but we want to have the output contain the square brackets as well.
This is very straightforward to implement in an utility function like Java’s Array.deepToString that recurses whenever the next element is an array. However, this means that every time you trace you will have to call that utility function which is quite a bit of extra typing. And, there’s a much easier way than to implement the utility function anyways.