Archive for the ‘SDL Tutorials’ category

SDL_ttf 2.0.10 RELEASED!

July 9th, 2010

Official SDL announcment:

Announcing the latest release of SDL_ttf!

http://www.libsdl.org/projects/SDL_ttf/

CHANGES:
 * Find the Unicode or symbol character map if it’s available in the font
 * Set the appropriate font styles for bold and italic fonts
 * Added font style TTF_STYLE_STRIKETHROUGH
 * Fixed size calculations taking outline and underline into account
 * Added API for font outlining: TTF_GetFontOutline()/TTF_SetFontOutline()
 * Added API to disable kerning: TTF_GetFontKerning()/TTF_SetFontKerning()
 * Fixed height calculation for fonts that extend below the font height
 * Added access to font hinting: TTF_GetFontHinting()/TTF_SetFontHinting()
 * Added TTF_GlyphIsProvided() to check whether a glyph is in a given font

Thanks to everybody who contributed feedback and patches for this release!

       -Sam Lantinga, Founder and President, Galaxy Gameworks LLC

Tetris Contest – Your Turn

May 12th, 2010

Alright everyone, it’s your turn to take a look at the contest entries and let me know what you think. Vote for the one you like best, and let us know in the comments what you like / dislike.

Which game do you like best?

View Results

Loading ... Loading ...

Bloc

Download

Blockzorz

Download

Falling in Pieces

Download

Tetris with a Twist

Download

Yage

Download

Zeetrix

Download

Welcome to GSoC 2010!

May 1st, 2010

Official SDL Announcement:

We had some amazing applicants for this year’s Google Summer of Code, and I would like to thank everyone who applied. It was very difficult to narrow down the final list, but in the end we picked 5 excellent students for this year’s project.

I’d like to introduce them and invite everyone to welcome them to the SDL community! :)

Introducing the Students:

* Daniel Wyatt is working on the Windows IME implementation, working with Jiang (a GSoC student from last year) to update the API and build working Japanese input support. I will be mentoring Danial and coordinating his collaboration with Jiang. You can find out more
about his project at:
http://socghop.appspot.com/gsoc/student_project/show/google/gsoc2010/sdl/t127230762719

* Eli Gottlieb is working on shaped window support for Linux, Mac OS X, and Windows. He will be mentored by Andreas Schiffler, who has
actually implemented shaped window support for commercial SDL projects. You can find out more about his project at:
http://socghop.appspot.com/gsoc/student_project/show/google/gsoc2010/sdl/t127230762740

* Jim Grandpre is working on adding support for multi-touch devices and developing a complete gesture recognition framework. He will be mentored by Ryan Gordon, who among many other things, is working on porting games to the iPad. You can find out more about his project at:
http://socghop.appspot.com/gsoc/student_project/show/google/gsoc2010/sdl/t127230762583

* Paul Hunkin is working on an official port of SDL 1.3 to the Android. I will be mentoring him and testing his code on my development Google Ion. You can find out more about his project at:
http://socghop.appspot.com/gsoc/student_project/show/google/gsoc2010/sdl/t127230762779

* Sunny Sachanandani is working on integrating X11 XRender support into SDL 1.3, with support for hardware accelerated blending and more.
I will be mentoring him and testing his code on a variety of Linux distributions. You can find out more about his project at:
http://socghop.appspot.com/gsoc/student_project/show/google/gsoc2010/sdl/t127230762857

Introducing the Mentors:

* Andreas Schiffler is an architect/dev for a commercial SDL based windows+linux application with shaped-window support. He is volunteering as a mentor this year to help Eli with his project.

* Ryan Gordon is a long time friend and SDL developer, and is currently rewriting the SDL multi-mouse support. He will be mentoring Jim on his touch input project this year.

* I am the original author of SDL and founder of Galaxy Gameworks LLC, a small company devoted to commercial development and support of
SDL 1.3 and beyond. I am looking forward to mentoring Daniel, Paul, and Sunny.

Welcome! :)

-Sam Lantinga, Founder and President, Galaxy Gameworks LLC

Kizare – Mercurial

April 29th, 2010

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?

SDL now uses Mercurial

April 12th, 2010

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

Appcelerator Titanium

March 26th, 2010

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

Are you participating in the New Tetris Clone Contest?

View Results

Loading ... Loading ...

Google Summer of Code 2010

March 22nd, 2010

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

Tetris Clone Contest – Prize Update

March 19th, 2010

I’ve updated the prize to $20, just as a small incentive. I know it’s not much, but hey, it’s something right?

Check out the Contest here.

Attack of the Hover Cat

March 19th, 2010

Tetris Clone Contest Follow Up

March 19th, 2010

How’s everyone doing on the contest. Is anyone participating? I hope so. Here’s a bit of inspiration to keep you going:

I like how they added the ability to swap between two shapes, and how certain shapes group together.

The interesting thing about Pokemon Puzzle League is how the entire play area is really a cylinder that can rotate around.

Dr. Robotniks Mean Bean Machine is good in terms of multiplayer play.

More Blog Like?

March 17th, 2010

Quick question for all you people out there:

Should I post on other related programming topics, to be more like a Blog?

View Results

Loading ... Loading ...

Edit:
Alright, I’ll give it a shot and see how it goes.

SDL Per Pixel Collision

January 28th, 2010

Are bounding box and circle collisions just not cutting it? Well, now we’re going to dive right down into pixel precision!
» Read more: SDL Per Pixel Collision

SDL Net – Part 1 (User Tutorial)

January 7th, 2010

The following user tutorial was created by Kahshoo-heem, for the purpose of expanding upon the SDLTutorials.com series, and expounding upon the use of SDL. This tutorial, though not purposely a part of the SDLTutorials.com or created for the series, may be a branch or addition to the series. Please read notes by the author for any additional code and/or framework used by the author. If you wish to submit your own tutorial to this site, please visit the “User Tutorials” page.


In this tutorial, I will show you a simple c++ library to add network resources to your game.

Firstly, we have to add the SDL_net headers and libraries to your desktop environment. If you are using a linux distro like Ubuntu, it is enough to download the libsdl-netx.x-dev package from the repositories. If not, the process is analogous of including sdl mixer, image, etc, better explained by Tim’s Tutorials.
Don’t forget, as well, to set the linker options in your IDE, adding the SDL_net library.

» Read more: SDL Net – Part 1 (User Tutorial)

SDL Collision Events

August 4th, 2009

Finally! The next tutorial. This is the 2nd part to the SDL Collision tutorial. We’ll be looking at collision events, the part we left unfinished in the last tutorial. To refresh your memory, a collision event is an event that is stored in queue after a collision has taken place. Take our recent shooter contest for an example. When the player fires a bullet, the bullet flies through the air, and then hits the enemy. The moment the bullet and the enemy collide, an event is triggered and stored in the queue. After all movement has taken place, the queue is iterated through, and events can appropriately respond.
» Read more: SDL Collision Events