PDA

View Full Version : XBMC Tutorial



Unregistered_FJGamer
January 12th, 2007, 15:16
I'm curious how you created those screensavers. I want to create my own if possible. Do you think a tutorial could be made?

Joakim Eriksson
January 13th, 2007, 20:36
A complete tutorial would take a bit more time than I have but I can give you the basic steps.

First of you need the following

Visual Studio
Direct X 8 SDK (You can probably find this somewhere on www.microsoft.com)
A modded or developer XBox connected to you PC


If you want a quick place to start then you can grab the simplest of my XBMC screensavers at PingPong (http://www.plane9.com/xbmc/pingpong.zip)

It's commented so it should form a solid start.

The main program is in 'main.cpp' each function has a good explanation of when XBMC will call that specific function.

The functions in that file will be called in the following order.

get_module - To get the reference to all other functions
Create - Setup of our screensaver
Start - The screensaver should activate itself
Render - Called each frame
Stop - The screensaver should quit


The other files are:

timer.h - A helper class to keep track of the time and calculate delta time values
xbsbase.h - Base functions to interface with XBMC
types.h - Various definitions and matrix classes that I always use
TestXBS.exe - A helper program to run the XBMC screensaver in windows.
pingpong.* - The main class for the pingpong screensaver


That's about all it takes for a XBMC screensaver. The main problem for me when I started out was to get the development environment setup correctly so I could actually do some development.

Also don't forget to check out the developer section at http://www.xboxmediacenter.com/forum/.
They have lots of information and if you do a bit of seraching I'm sure you can find all the information you need.

Good luck with the screensaver!

Joakim Eriksson
August 1st, 2007, 21:39
I uploaded the TestXBS project (http://www.plane9.com/xbmc/TestXBS.zip) to the webpage. In it you have the instructions on how to run it. What I dont get is how you managed to build your screensavers without it. Brrr. They look good never the less :)