Loki's blog

  • Home
  • maloki.net
  • CanLaro: HTML5 2D Canvas Game Development Helper

    • 9 Sep 2010
    • 0 Responses
    •  views
    • canvas html5 javascript projects
    • Edit
    • Delete
    • Tags
    • Autopost

    While looking around for some HTML5 Canvas code, I found a lot of examples, but only a handful of reusable libraries. The drawing functions, are useful and there are draw image functions that draw a part of an image, useful for a sprite. Nice but it can get troublesome with tiled animation and transformations. In the end, I decided to make one myself: CanLaro!

    Can: short for canvas, also "to be able to"
    Laro:  Tagalog word for game

    My goal for this library is mainly to provide code that can help any 2D game get started as long as you know some Javascript and know what a game loop is. I wrote/am writing this mainly as a helper and you are free to write your game as you please.

     

    Here it is in action: CanLaro Demo: BobCanvas. 

    Canlaro

    At the moment, here's what it offers:

    • Sprite
      • multiple animations (different sets of frames per animation)
      • transformation (rotation, translation, scale)
      • alpha
    • Keyboard Input Handler
      • configurable key mapping
      • key state checking (of course!)
      • opposing keys

    Check the README at the CanLaro github project repository for more details and updated documentation.

    Planned possible updates:

    • Resource Manager/Loader (there's code in there, but it still needs some work)
    • Sprite Manager
    • Audio Manager
    • ...
    • Tweet
  • Ubiquity 0.5; Updated Ping.fm command

    • 10 Jul 2009
    • 0 Responses
    •  views
    • Programming Technology projects
    • Edit
    • Delete
    • Tags
    • Autopost
    Ubiquity 0.5 is out! If you currently have and older version of Ubiquity installed for Firefox, it won't automatically update since it would break a lot of other commands in the wild. If that's ok with you, you can download Ubiquity 0.5 at Planet Ubiquity. Of course, mine broke, too, and I just updated it! Whoo! I updated my Ping.fm Ubiquity command to use the new parser. Others should also be able to localize the command if they want to do so*. The old version of the command is still up just in case some issues pop up in this version of the command. There are still some tweaks (and maybe some other features) I want to put in but this is it for now. Time for me to get some sleep. It'll be a busy day at work later! -- *Well, not now, but probably in the future as:
    "Community commands (those hosted on individual servers, locally, or on the herd), however, cannot be localized at this time." (via: Labs/Ubiquity/Ubiquity 0.5 Making Commands Localizable - 09.07.10)
    Maybe soon...
    • Tweet
  • Quadrox: Yet another Tetris clone

    • 10 Nov 2008
    • 0 Responses
    •  views
    • Personal Programming gaming projects tetris xna
    • Edit
    • Delete
    • Tags
    • Autopost

    I had to make one myself. I just had to. I just started last Friday and it didn't take long to get it going with XNA. I just wanted it to behave similar to Tetris DS + other rules I picked up from Heboris, and that took some time... (plus, I wanted to watch Madagascar 2 & Quantum of Solace, too, and did. :D). If you want the game, it's here: Quadrox v. 1.1. Quadrox v. 1.1.1.

    Installation:

    • Unzip Quadrox_v1.1.zip into a temporary folder (doesn't really matter where, as long as you remember where it is).
    • Open that folder and run "setup.exe" and continue with the installation.
    • If you don't have the prerequisites ( .NET & XNA frameworks, the setup will download them)
    • When it's done, it will automatically run the game in windowed mode.
    • I'm not sure but I think the temporary folder can be deleted at this point...

    Uninstallation:

    • It can be found in the Add/Remove programs in XP and in Vista's counterpart (not sure what it is, sorry).

    Just a summary on the project:

    Motivations

    • Something to play while waiting for a download job. (Does not require an internet connection & can just pick up and play)
    • Tetris with my desired ruleset (at least attempt to get it)
    • Simple UI that does not distract you from the game
    • Practice C# and using XNA :P
    • Non-intrusive app
    • Lightweight (well it is, except for the need for the .NET & XNA frameworks... )

    Features

    • Can select starting level: 1-30
    • Can spin the current block while it hasn't been locked.
    • Can hold blocks
    • Always in "Endless mode" - You don't stop after reaching level N.
    • Shows you your next 7 blocks = more strategy, less luck.
    • Can run in windowed or full screen mode
    • "Secret" INVISIBLE MODE - toggled at the Game Over screen (F9). Well, not a secret anymore...

    Known Bugs:

    • Rotation when trying to slip in some bricks does not behave as intended. (Thus some S/Z/T-Spins might not be possible)
    • Starting position of some blocks may seem lower or higher than others.

    Future of the Project:

    • Add pre-spinning blocks before the blocks spawn on top.
    • Add ability to pause the game - hahahaha!
    • [Change UI]
    • [Might add some sounds]

    If you find any bugs, have comments/suggestions, please leave a comment or contact me using the Contact link. Thanks.

    • Tweet
  • Ubiquity: Connecting the Web, Empowering Users

    • 1 Sep 2008
    • 10 Responses
    •  views
    • Technology mozilla open source projects ubiquity web
    • Edit
    • Delete
    • Tags
    • Autopost
    Ubiquity: Why should I care? Last week, I learned about this nifty Firefox tool called Ubiquity. What is it?
    Ubiquity is an experimental Firefox extension that gives you a powerful new way to interact with the Web. You're used to telling Firefox where you want to go by typing Web addresses into the URL bar. With Ubiquity installed, you'll be able to tell Firefox what you want it to do by typing commands into a new Ubiquity input box.

    (Source: Ubiquity 0.1 User Tutorial)

    It's experimental and it's only on version 0.1 but hey, it's a prototype that just WORKS! Okay, so what can it do? Here's a video by Aza Raskin to show you more about it: (Watch it. I promise that you won't regret it.)

    (Source:Ubiquity for Firefox from Aza Raskin on Vimeo.) Neat stuff. I, myself, am so excited that I can't help but try messing with Ubiquity. The result: A Ubiquity command for Ping.fm. Ping.fm: Updating social networks in a snap With a lot of social sites around (like Facebook, Twitter, Tumblr, Plurk, Livejournal, Yahoo! 360, Delicious, etc.), I can't help but be a member of a number of them. What usually happens is that some of my friends on one network is not a member of another. To update everything would be a pain and so there's Ping.fm!

    Ping.fm was created for the sole purpose of making it as easy as possible to share your posts with the world. Now you don't have to fumble around the web in order to post anymore, you can just post once, and be done with it.

    (Source: Ping.fm/About)

    If you want a Ping.fm account, the current beta code is: "legendofping". [Checking the different social sites is a different story. I suggest using Socialthing! I currently have one free invite for SocialThing so if you want in, just ask me. ] Ubiquity + Ping.fm So here I am now, with my Ubiquity command written for Ping.fm. I'm pretty proud if it and have used it a lot recently. It's so much easier to share things on the web. Highlight, type some text and you're good to go! If you want to get Ubiquity on Firefox, you can download it from here. To install and use my Ubiquity command for Ping.fm, just follow the instructions I wrote in there. NOTE: After clicking on the Subscribe button, you'll reach a scary warning page that says "Ubiquity Command from Untrusted Source." Just click on "I know what I'm doing. Subscribe to it!" to install the command. Don't worry, I promise you that nothing in there is harmful to your computer and does not violate your privacy. This command only allows you to post to different social sites using Ping.fm and that's it. The source code is available for you to check if you don't trust me. At the moment, you're always being warned when installing a command as mentioned here. If you have any problems/comments/suggestions, email me or comment below. Have fun with Ubiquity! If you develop some commands yourself, don't be shy and share it! UPDATE1: Ubiquity has been updated and breaks your current subscriptions. For your current subscriptions to work again, you may need to unsubscribe & resubscribe to them. UPDATE2: Ping.fm is now in OPEN beta! No more beta codes needed!
    You might also want to check out:
    • Ubiquity in Depth by Aza Raskin
    • Ubiquity User Tutorial
    • Ubiquity Author Tutorial
    • Tweet
  • About

    25-year old Filipino software developer and gamer who loves food, especially cookies. Mmmm, Cookies!

    28050 Views
  • Archive

    • 2011 (1)
      • May (1)
    • 2010 (1)
      • September (1)
    • 2009 (8)
      • July (1)
      • May (1)
      • April (2)
      • January (4)
    • 2008 (17)
      • December (1)
      • November (3)
      • September (3)
      • July (6)
      • June (1)
      • April (1)
      • January (2)
    • 2007 (24)
      • November (2)
      • October (2)
      • September (3)
      • August (4)
      • July (6)
      • June (2)
      • May (2)
      • March (2)
      • February (1)
    • 2006 (10)
      • November (3)
      • March (1)
      • February (2)
      • January (4)
    • 2005 (5)
      • December (1)
      • November (2)
      • March (1)
      • January (1)
    • 2004 (3)
      • November (2)
      • October (1)

    Get Updates

    Subscribe via RSS
    TwitterFacebookFacebook
  • Other blogs

    • Photography
    • Singularity
    • Hungry
    • Tumblog

    maloki.net

    • Home
    • Projects
    • Contact