Sdl Gaming Template [Visual Studio Template]

12/06/2012 11:31 Super Aids#1
If you have problems with the sdl dll's just download them from their site.

[Only registered and activated users can see links. Click Here To Register...]

For learning Sdl + Documentation:
[Only registered and activated users can see links. Click Here To Register...]

I'll be doing a few tutorials when I got time.

Basically it's just a project template which you add to your Visual Studio.

Everything except for Sdl is created by me in this template, that means every class where you can see actual codes. The SdlDotNet.dll and Tao.Sdl.dll is the only assemblies I do not own.

Download:
[Only registered and activated users can see links. Click Here To Register...]

How to install:

It includes wrappers for audio (Music + Sound), Eventhandling (Keyboard[up/down], Mouse[up/down/click/hover/move], Screen), Graphics (Collision check with both sprite/point, gameobjects/tiles), Settings for video and game read from xml, ScriptEngine for both C#/VB (Needs optimization tho.), Multithreading (Threads running with interval-actions, Thread-safety collections (ConcurrentDictionary) + random, Delayed actions and at last support for fullscreen/window with Windows Form support.

Screenshots:
[Only registered and activated users can see links. Click Here To Register...]

[Only registered and activated users can see links. Click Here To Register...]

Anyways enjoy! :)

#Edit there is a little bug with full screen and events. To make it work proper go to Events.SdlEvents.cs and replace LoadEvents() with:
Code:
  /// <summary>
  /// Loading all the sdl events.
  /// </summary>
  internal static void LoadEvents()
  {
    Begin();

    if (!Sdl.VideoCore.FullScreen)
    {
    Thread eventThread = new Thread(new ThreadStart(SdlDotNet.Core.Events.Run));
    eventThread.IsBackground = true;
    eventThread.Name = "SDL.NET";
    eventThread.Priority = ThreadPriority.Normal;
    eventThread.Start();
    }
    else
    {
    SdlDotNet.Core.Events.Run();
    }
  }
Also you can remove the while loop in Program.cs -> Main(), if you've done above.

#Edit ugh, why doesn't images work? LOL
12/09/2012 18:55 MrSm!th#2
#moved
12/09/2012 19:07 Super Aids#3
Quote:
Originally Posted by MrSm!th View Post
#moved
Move it back... it's .NET and also it's not a tutorial, but a template for Visual Studio lol.
04/25/2013 22:00 becko713#4
there is error still with the threads

The type initializer for 'SdlDotNet.Graphics.Video' threw an exception.

{"Unable to load DLL 'SDL.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)"}
05/15/2013 13:28 tariqx111#5
very nice.
06/28/2013 00:23 Syfox™#6
Nice, Tutorial (Y)