Tetris Contest – Reviewing…

May 1st, 2010 by Tim Jones 3 comments »

So, for the next few days or so I’ll be reviewing the entries. I’ll put some quick videos together, executables (for people to test), and a poll for all of you to participate. To confirm, I received the following entries (in no particular order):

Blockzorz
Zeetrix
Falling in Pieces
Bloc
Yage

Tetris Contest – Down to the wire…

April 30th, 2010 by Tim Jones 3 comments »

Time is almost up, you have about 8 hours left. My timezone, again, is UTC -5.

Tetris Contest – Less than 48 hours left

April 29th, 2010 by Tim Jones 6 comments »

So, how is everyone doing? Are you going to finish in time? Not a whole lot of activity in the forums this time around, just 1 person (but there’s been an increase in the number of people seeking help). At this point I encourage people to polish what you have, and not worry about additional features.

My timezone:
UTC -5 (EST)

Kizare – Mercurial

April 29th, 2010 by Tim Jones 6 comments »

I decided to switch Kizare over to Mercurial. Just Pushed in the most recent code, with initial client / server framework. It’s all very basic at the moment, but it works.

http://code.google.com/p/kizare/

Again, anyone interested in helping?

Kizare

April 16th, 2010 by Tim Jones 3 comments »

I’ve decided to bring an old project back from the dead. But this time, I decided to change the game a bit. Kizare will instead be an online 2D MMORPG (something akin to http://www.graalonline.com). The difference, however, is that Kizare will be open-source, and free – any sort of profit made from this will be from my taking other avenues (much like Grooveshark makes revenue through a very low cost, $3 a month, VIP service – but the core service is free).

You can checkout the Google Code project home here:
http://code.google.com/p/kizare/

This project will be my first software to launch for MetaCipher Studios.

So, why am I saying this? Because I’d like your help. If you are at all interested, send me an IM, email, whatever, and I can fill you in on the details.

Info:
– Kizare will primarily be a Windows based game, though porting has not been ruled out
– Kizare is basically a shell that will run on the JS SpiderMonkey engine
– Players will connect to different servers, and will be able to explore different worlds
– A primary server will exist for authentication, stats, broadcasting, etc.
– Servers can be hosted by anyone (must broadcast to the primary server)
– Can create private / locked servers via password
– 2D OpenGL (ortho)
– HawkNL for network access
– DevIL for images
– SDL_mixer for audio (ogg)
– Worlds will consist of a primary JS file (the main application if you will), maps, and resources (images, sounds, music).
– All necessary files are downloaded at the time of a client connection, and versioned.
– Servers must perform a “recycle” to update all clients if any files are updated.
– Scripts will not live on maps, but rather, events are invoked upon the primary JS file belonging to the server (other JS files may be used, but they all live in the same context).
– The primary application will expose an API to all scripts; this API will be 2D MMORPG, specific, meaning, it will not be so abstract as to create anything you want. (i.e., Collision is assumed to be 2D).

Things to know:
– I may fallback to Lua, as I am not 100% sold on SpiderMonkey

To be honest, Graal is what brought me into game programming back in the day. At that time, anyone could create their own player world and host it, for free. It seems they have taken a new direction (one that I don’t like), and I’d like to bring back that same experience for others.

Update:

Decided to use Lua instead of SpiderMonkey.

Tetris Clone Contest – 2 weeks Left

April 16th, 2010 by Tim Jones 4 comments »

So, how is everybody doing on the contest? Did you give up already? If you have, I encourage you to get back in it – push through! If you haven’t started yet, there is still time.

SDL now uses Mercurial

April 12th, 2010 by Tim Jones No comments »

SDL source repository has now been switched over to use Mercurial!

http://www.libsdl.org/hg.php

If you don’t use Mercurial and never want to, don’t worry, you can still grab snapshots from the SDL website and send patches the way you always have.

There are a number of reasons why this change was made, and here are a few:
* It’s much easier to iterate locally on changes before pushing them to the world, resulting in better code in the wild.
* It’s much easier to share changes with other people using Mercurial, which is great for the Google Summer of Code students. (e.g. hg export/import)
* It’s much faster to update and commit (or push and pull)
* Mercurial has similar syntax to Subversion for simple operations

Here is Ryan’s quickstart on Mercurial:

- The best quick-start tutorial I’ve read is Joel Spolsky’s new hginit.com. You should read it. It’s interesting and funny. I’ve read a lot of quick-start tutorials, and no other does it as well.

- The important thing to know, as a subversion user, is to stop fearing branching. Mercurial works best when you have a bunch of little ad-hoc branches weaving around each other.

- When committing new changes, keep the first sentence of the log comment short and on a line by itself. It’ll be used for the summary.

- More or less, most commands work like Subversion’s, and there is a TortoiseHg to match TortoiseSvn, if that’s you’re thing. But once you start using things that Subversion can’t do (bisect, record, shelve, rollback, queues, etc), you’re going to find yourself annoyed when you have to work with a Subversion repository and can’t use these extra features.

In case you’re curious, there’s lots of discussion on the why’s and wherefores on the SDL forums:

http://forums.libsdl.org/viewtopic.php?t=6047

See ya!

-Sam Lantinga, Founder and President, Galaxy Gameworks LLC

C++ Tip – Multi-line Comments and Strings

April 9th, 2010 by Tim Jones 2 comments »

This tip actually comes out of a “bug” that Blommis found a while back. If you want to create a string (or you can do this for comments too) that sits on more than one line, you can use a backslash at the end of the line to extend it to the next. For example:

#include <stdio.h>

// My Comment \
ends here
int main() {
    printf("I\
like\
to\
code\
weird"
);

    return 0;
}

Now that you have this knowledge, I don’t really recommend you ever use it (especially for comments, since you can use /* */ for comments). But for really long strings, it might be useful.

For slightly more information on this, see here: http://forums.sdltutorials.com/viewtopic.php?f=18&t=67

Megaman said what?

March 30th, 2010 by Tim Jones 7 comments »


On a more serious note, I am starting to research more and more about SDL 1.3 – and I think all of you should too. If you aren’t familiar with what SDL 1.3 is all about, here’s a quick list of features that I know of:

– Full backwards compatibility with 1.2 apps (no need to rewrite your code to get it to work)
– Support for the latest version of OpenGL and OpenGL ES
– Multiple Windows
– Multiple Displays
– 2D Hardware Acceleration (OpenGL or Direct3D depending on the platform)
– Textures used instead of Surfaces (for hardware acceleration when available)
– Multiple input devices (multiple keyboards, multiple mice, etc.)
– Pressure / Tilt / Accelerometer support
– Much better Unicode support
– iPhone support
– Audio recording
– Multiple audio output streams
– 7.1 surround sound support
– SDL_main is no longer required

If you have time, check the SVN out here: http://www.libsdl.org/svn.php (don’t get the old zip file, checkout the latest trunk).

I’m looking to start covering other “devices” that SDL can run on, so look out for that. Any additional features that I am overlooking? Let me know.

Appcelerator Titanium

March 26th, 2010 by Tim Jones 1 comment »

For all you web developers out there (or people that have toyed with JavaScript / HTML / CSS / PHP), this might interest you. In the same type of class as Adobe Air, Appcelerator Titanium is a development environment for developing applications using existing web technologies. It mainly focuses around JavaScript, but you can use PHP, Python, or Ruby (depending on the target platform). The most interesting part of this is that you can also develop mobile applications (such as the iPhone and Android). Last I heard, they are actively developing an OpenGL module for use on the iPhone – but you can still make some decent games using CSS3 and HTML5. So while we are waiting for an official release of SDL for the iPhone, this may be a good alternative. It’s also good for developing Desktop Applications rather quickly, when you don’t want to waste a whole lot of time.

Check it out here: http://www.appcelerator.com


Warning, music is a bit loud

Are you participating in the Tetris Clone Contest

March 24th, 2010 by Tim Jones 2 comments »

Are you participating in the New Tetris Clone Contest?

View Results

Loading ... Loading ...

SDL Tip – Window Handle

March 22nd, 2010 by Tim Jones No comments »

You can easily grab the handle of the Window using a single function inside SDL. Please note, I don’t recommend you do this unless you really need to do something OS specific. This will almost certainly break cross-platform compatibility.

SDL_SysWMinfo SysInfo; //Will hold our Window information
SDL_VERSION(&SysInfo.version); //Set SDL version
 
if(SDL_GetWMInfo(&SysInfo) <= 0) {
    printf("%s : %d\n", SDL_GetError(), SysInfo.window);
    return false;
}
 
HWND WindowHandle = SysInfo.window; //There it is, Win32 handle

You can check out the other possible values to grab here:
http://sdl.beuc.net/sdl.wiki/SDL_SysWMInfo

If this is something you want to do, but you still want your game/application to be cross platform, then you can use pre-processor directives:

#ifdef __WIN32__
HWND WindowHandle = SysInfo.window; //Win32 window handle
#else
Window WindowHandle = SysInfo.window; //X11 window handle
#endif

Note: This might be useful if you are making an application that you want to sit in the tray, or you want the window to dock (just a few examples).

C++ Tip – Shorthand Struct

March 22nd, 2010 by Tim Jones 1 comment »

Here’s a quick helpful tip that people often overlook. You can quickly initialize the values of a struct using shorthand notation:

struct SEntity {
    int X;
    int Y;
};

SEntity Player = {0, 0}; //Coordinates X , Y

Please note you can only do this when you create your struct object. This will not work:

struct SEntity {
    int X;
    int Y;
};
 
SEntity Player = {0, 0}; //Coordinates X , Y
 
Player = {10, 10}; //Error!

You can even nest:

struct SCoords {
    int X;
    int Y;
};
 
struct SEntity {
    SCoords Pos;
 
    int Speed;
};
 
SEntity Player = {{0, 0}, 0}; //Coordinates X , Y, and Speed

Shot of Jaq

March 22nd, 2010 by Tim Jones No comments »

My brother-in-law introduced me to a very interesting podcast today, called Shot of Jaq. These two guys basically pick a technology related topic, discuss, and then turn over the discussion to the community. The latest podcast talks about how can we interest this new generation to learn programming. I believe that SDL is one such technology to help bring in this new generation.

Check it out here.

Google Summer of Code 2010

March 22nd, 2010 by Tim Jones No comments »

Official SDL Announcement:

That’s right, we’re back again for Google Summer of Code 2010!

Thanks to Google and the great students we’ve had, we’re going around for another year!

The Google Summer of Code is a program in which students from all over the world are invited to apply to help out open source projects over the summer for a significant stipend. Even if you’re not interested in helping out SDL, there are lots of great projects to choose from!

Please check it out on the SDL website at:
http://www.libsdl.org/gsoc.php

Because we’ve had applicants with widely varying skill levels, this year I’m asking all prospective applicants to submit a sample patch for SDL 1.3. It doesn’t have to be big or even accepted, but it does have to show familiarity with the development process and good coding practices.

Happy Coding! :)

-Sam Lantinga, Founder and President, Galaxy Gameworks LLC