Take a Peek: Null Op Source Code

People have been asking for the source code for Null Op so I thought I’d give them what they want! I’m releasing the current source code for the game under the MIT license which means you can do pretty much whatever you want with it. It comes with all the necessary libraries and a simple build file to do all the essential things such as run the game and create a webstart.

I hope you find it useful. Be aware that the source for some of the libraries isn’t available (specifically the resourceful library) so please feel free to use a decompiler to take a peek if you’ve just got to know what you’re missing. Anyway, as always let me know what you think in the comments, and if you do find the source code useful consider linking back to this page so others can find it!

Related Posts

5 Comments

  1. Gornova
    Posted February 26, 2009 at 5:11 am | Permalink

    when shade is completed, why not go back and improve null op? :D

    i’ve already appreciated your work: good code organization, but not enough comments :( documentation, in particular when you invoke a library, could really be important into source code, no?

    note: your next game? a platform? :D

  2. Posted February 26, 2009 at 8:28 am | Permalink

    Thanks Gornova. I may come back to Null Op sometime in the future, I’m not sure right now. I’m also glad you’ve found my work useful. I’d love to leave more comments, etc, but unfortunately they always seem to be left out in favor of writing more code. That said I try to write simple methods which explain themselves.

    My next game? Who knows!

    … Also I realized I had forgotten to upload the source to the server, consider that fixed.

  3. Posted February 26, 2009 at 2:31 pm | Permalink

    hey! i really like the way you handle all the resource stuff. It keeps the class files clean and you do not have to change (much) source code when adding new themes or editing existing ones. But it makes the code harder to read / understand if you’re not familiar with the resourceful package (had to go through all the resourceful classes before i actually understand what you were doing – but that was quite educating, too).

  4. Posted February 26, 2009 at 2:38 pm | Permalink

    Hey Kev thanks I appreciate it. The resourceful package is actually an interesting experiment. It’s sort of a pain to actually use which is why I don’t want to publish it officially but it does nicely separate out the data from the code. It let me do some cool things, too, such as re-use the StoreItem class for all four store items. Really being data driven is a great thing to aim for.

    And sorry, Kev, that I didn’t provide any explanation for how all that works. For everyone else it is as follows:

    • A class can have a @Resourceful attribute
    • If so then it’s first argument in the constructor is a ResourceBundle
    • Factories generate objects and look for the attribute
    • If found they look up the proper resource file and create a bundle from it

    Hope that helps people understand what’s going on. Thanks for all the feedback!

  5. Posted February 27, 2009 at 9:19 am | Permalink

    I’m glad you released the code this “open source” game of yours. I was just about to get Richard Stallman to come knock down your door!

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>