Sign in to follow this  


Recommended Posts

archanian    247
So I'm wondering if anyone out there is using SDL.NET for their game projects? Hobby or serious?

There doesn't seem to be any kind of community around it, the official website/forums are pretty much a ghost town, and it's hard to find any substantial literature or discussion revolving around this library.

I understand the portability issues around using .NET, and I am also aware that SDL/C++ is a much safer bet in terms of learning industry standards ... but surely there is plenty to like about SDL.NET for those attempting to learn game development?

My own experiences with it have been great! (granted, I am a C# developer professionally). Productivity is awesome, super easy to prototype and test features, it seems to me to be the perfect way to learn game dev for beginners / those familiar with C#. I just find it hard to get detailed info about advanced issues ... I guess I could download the source code?

Is there any reason why there's not much momentum behind this? Or maybe there is and I just haven't met the people working with it? Any thoughts are appreciated.

Share this post

Link to post
Share on other sites
6677    1054
I think it might be because many C# users probably just go down the XNA route, plenty of tutorials already there.

No reason why you can't use if you want to though

Share this post

Link to post
Share on other sites
laztrezort    1058
For Windows development, XNA is probably a much more viable alternative (very active community, well supported, etc.). For Linux development, I'm not sure, but I'll share my own experience:

Several years ago I was considering developing for Linux using C#, but it seemed like there was a strange resistance in the community to use of Mono, mostly centered around patent scares and anti-Microsoft propaganda. Perhaps it was just the communities I visited, and I'm not saying it was indicative of Linux users in general, but the experience left a somewhat sour taste in my mouth and I abandoned my ideas for the time being.

I also found the lack of activity around SDL.NET, OpenTK, GTK#, etc. disheartening. Of course, things may have changed, as I said this was years ago. Edited by laztrezort

Share this post

Link to post
Share on other sites
6677    1054
Well a linux option thats taking off with C# is monogame which literally seems to be a near identical clone of XNA using openGL as a backend instead of directx.

Share this post

Link to post
Share on other sites
laztrezort    1058
[quote name='6677' timestamp='1343662608' post='4964518']
Well a linux option thats taking off with C# is monogame which literally seems to be a near identical clone of XNA using openGL as a backend instead of directx.

Good point, I had seen that recently, haven't used it but it does look promising. At the time I was looking into Linux development, either that project wasn't around or I wasn't aware of its existance.

Either way, perhaps the stigma of C#/Mono has worn off lately (which would be a good thing for Linux developers, IMO).

Share this post

Link to post
Share on other sites
archanian    247
Hmmm all good points. Thanks for your feedback. I guess when C# devs think game development they think XNA, and so that's what they go and do. For me personally, something like SDL.NET is far more exciting because nothing is done for you, you've basically got a blank canvas. It's just like writing a game in C++ but with all of the productivity and simplicity of C# and .NET.

Monogame looks interesting ... although I'm still not convinced using a framework like XNA is for me. Maybe it's just they way I like to do things, but personally I like to learn something from the ground up, understanding the inner workings of a system before moving on to the higher level concepts. Thats why I choose to write all my own code for my game projects, and I believe I'll be a better game developer as a result.

XNA seems fine if you're an experienced developer or team trying to make actual published games, but personally I think it is more beneficial at the early stages to understand how to implement your own systems (not by focussing on the systems themselves, but by making simple games from [b]scratch[/b] yourself), and surely this results in a more complete understanding of how game engines work.

I know, I know ... "make games not engines" ... but seriously, that advice is always taken out of context IMO, and often thrown around as an off-the-cuff answer to any new game developer asking how to do [insert_game_engine_feature_here]. Edited by archanian

Share this post

Link to post
Share on other sites
laztrezort    1058
[quote name='archanian' timestamp='1343711462' post='4964716']
something like SDL.NET is far more exciting because nothing is done for you

It's been a long while since I've used SDL (and never the .net wrapper), but I don't remember it being particular "close to the metal" anyway. If you really want to dig into the inner workings of these systems, you will have to interface OpenGL or DirectX.

There are also some thin wrappers around DirectX and OpenGL you could use, some I've heard of (but never used) are SlimDX, SharpDX and OpenTK. I believe there is a book on using C# with OpenGL, but I do not know the name of it offhand.

Also, XNA is just a framework around DirectX, you don't have to use (for example) the provided Game class, or SpriteBatch, or BasicEffect. In fact, I'd wager many developers end up rolling their own versions of these classes specific to their needs anyway.

Share this post

Link to post
Share on other sites
archanian    247
Interesting ... is it true that SDL is using OpenGL under the hood by default? I know you can use it to get at OpenGL context ... but if you're just doing 2D surface blitting I'm not so sure OpenGL is involved ... I could be wrong.

Which brings me to another question:
Up until now my projects have all been 2D tile-based, using simple surface blitting - do you recommend that I change this and start using an OpenGL context for 2D rendering, just to become familiar with OpenGL? Also would this provide much better performance?
I'm experiencing some fairly serious slowdown caused (from what I can gather) by using transparent PNGs with per-pixel alpha for tile transitions and fades etc ... this wouldn't be an issue with OpenGL? And is it fairly simple to do equivalent tile-based rendering with OpenGL?

Share this post

Link to post
Share on other sites
6677    1054
I think what your looking to do would be fully possible under openGL, openGL you can take advantage of hardware acceleration (dunno if SDL does aswell though).

Share this post

Link to post
Share on other sites
dilyan_rusev    1360
SDL 1.3 will use hardware acceleration. SDL 1.2 (on whihch I believe is based on) hasn't been using hardware renderer for quite some time. You can obtain an OpenGL context, but that basically allows you to use OpenGL for rendereing instead of SDL_BitSurface & friends.

Whether or not it is a good idea to move to OpenGL - I don't know. I *really* wanted to learn either OpenGL or DirectX, but I simply failed. For DirectX, the C++ API (and C++ itself) simly let me shoot myself in the foot way too often, and the complexity for even the simplest stuff is just amazing. It seems you have to write exponentially more code with every new version. I guess it's OK with people that have the time to learn it properly or you already know it and have an existing codebase. For the simplest drawings, you will have to write shaders (I don't know why they are called like that - they seem like scripts that get interpreted on the GPU) which you feed with data that you upload to the GPU memory. I'm quite the amateur, so this might not be entirely correct, but to blit an image and move it with the keyboard arrow keys you have to write a ton of code. OpenGL seems to have gone in the same direction.

Mentioning OpenGL, my problem with it is the total lack of sufficiently good books / online material. When you have a problem, you get the RTFM (e.g. reference pages on the OpenGL web site or a link to an age-old red book that is for 1.1 or something). From Amazon reviews, it seems that the latest reference book is full of deprectated stuff and doesn't focus on the new shader-based approach as much as it should. There is a beginner's book wirtten by some guys from GameDev, but a quick look at the contents reveals that it deals with graphics theory. I have mixed feeling about this, but at least it is short, and it is example-driven (I don't know how you'd read that on a Kindle since you don't get the examples CD, so I'd recommend you get the paper one).

I can understand why there is all this complexity with shaders and parallelism, but this is for proffessionals. For amateurs, SDL and XNA are basically what you need. If the performance is not good enough, I guess moving the XNA or Unity would be a better option. OpenGL's API is a bit cleaner in terms of ALL_CAPS_NONSENSE and line length, but it can fail silently unless you call glGetError real often, plus the state machine can be quite annoying at times.

In case you do want to move to OpenGL, don't consider online tutorials, specially NeHe. They use the immediate mode (understand: easy for the programmer, slow for the GPU as it doesn't execute whole chunks of code, but single instructions) or arcane libraries that haven't been around for decades. Just look for a book, or wait for LazyFoo to update his tutorials. I really liked his SDL tutorials, and I do hope his OpenGL ones will be as good.

Share this post

Link to post
Share on other sites
6677    1054
[quote name='dilyan_rusev' timestamp='1343908619' post='4965491']
shaders (I don't know why they are called like that
because some shaders can be used for things like bloom, sepia, motion blur etc etc

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

  • Similar Content

    • By ilovegames
      You - the chief doctor of the hospital. Working late into the evening, did not notice the majority of hospital workers went home ... But where you disappeared the night shift is also not known. Hastily taking important documents, go home, but something went wrong as usual ... Can you get out of the hospital alive?

    • By Gator Man
      Game Concept Doc:

      We are looking for every position. From Game designer, to marketer, to programmer, to 3D modeler. Any further questions can be discussed through discord
      DISCORD: Gator#5635
    • By ilovegames
      Wind Of Fear is a game where we have to kill different kinds of waves of monsters packing weapons. The main goal is to survive the waves and pump up your own weapons. There is a store where you will buy new weapons, scattered crystals that restore your life are also on the map!

      WASD - Walking
      Shift - Running
      Mouse1 - Attack
      Space - Jump
      ScrolDown - weapon change
      T - Deceleration of time
      G - Bleed your weapon
      Esc - Exit, pause

    • By ilovegames
      Continuation of the first part of the game, Invention. While you were on the island exploring the underground laboratory, the infection was busy spreading throughout the world. In this episode, you have to go through a city populated by monsters in search of salvation aided by weapons that you will find during your travels. The gloomy atmosphere, music and atmosphere and a crowd of walking meat will keep you on your toes!

    • By Jacob Laurits Besenbacher Kjeldsen
      Intro - "The challenges of dynamic system design"
      Custom Quest evolved during development, from a minor quest system used for our own needs in our own game production Quest Accepted, to something entirely more dynamic and customizable, now finally released, these are our thoughts on quest design and developing standalone subsystems. 
      Splitting what is a major production for a small indie team, into smaller installments such as a quest system was a good idea we thought, this way we can get some releases out there and fuel the development of our game. But building a system that works for yourself is one thing, building a unity plugin that will let other developers create quests, missions, and objectives, you would never have thought of is something else entirely.
      The first thing we had to realize was that when building a quest system, the task is not to design great quests, the task is to enable the users to create great quests.
      That still meant we had to find out what good quest design is and what a quest really is.
      Our task was to create a system where the user is free to create creative engaging and rewarding mission experiences for their players.
      What is a quest? - "Cut to the core"
      First off, we need to know what a quest really is.
      A quest is the pursuit, search, expedition, task or assignment a person(s) does in order to find, gain or obtain something.
      In games, quests and missions function in many different ways depending on the genre.
      A single game can contain a multitude of different types of quests put together in just as many ways. In an MMO, for instance, quests are vehicles for the story and the player's progression. In many cases they are formulaic and simple, some can even be repeated, there are hundreds of them and everyone can do them. In other games quests are for single player campaigns only, here they shape each level giving the player a sense of purpose.
      Quests can span the whole game or just be a minor optional task on the way, there are so many design philosophies and creative quest designs that we had to narrow it down and really cut to the core of what is needed for good quest design.
      What all quests have in common is the task, the criteria for successful completion of the quest, and the reward, the goal of the quest, what the player gets out of doing what we ask of him.
      Quests cover an incredible variety of tasks so it was important for us to base our decisions on thorough research. In our research, we found that there are three layers to quest design.
      The type, the pattern and the superstructure.
      Quest types exist within quest patterns and quest patterns exist within the quest superstructure.
      We found that there are 8 basic types of quests these are the various tasks/criteria the player must do in order to complete the specific quest.
      There are 12 quest patterns. These are ways designers can use their quests, connect multiple quests set them up in engaging ways or teach players how to interact with and get the most out of the game world creating variety and engaging the player.
      Enveloping the patterns is the quest superstructure, the overall structure of quests in the game, we found that there are two main ways of structuring your quests.
      Historically quest have a quest giver, an NPC or object that informs the player about the quest, what they need to do, the story behind it and perhaps even what their reward will be should they complete the quest.
      Quest types - "Do this, do that"
      The core task each quest consists of, the criteria for completing part of or all of a single quest. These are the actions we want Custom Quest to be able to handle.
      Probably the most basic quest type, the task is to kill something in the game, for example; kill 10 goblins. Gather
      Again very simple, the task is to gather x things in the game world, collecting berries or the like. Escort
      The player must escort or follow a person or object from point A to B while keeping it safe. FedX
      The player is the delivery boy, they must deliver an item to a person or point. Defend
      The player has to defend a location from oncoming enemies, often for a set number of waves or time. Profit
      The player must have a certain amount of resources to complete the quest, contrary to gather quests these resources are resources the player would otherwise be able to use himself. Activate
      The player's task is to activate/interact with one or more objects in the game world or talk to a number of NPC’s. In some cases, this must be done in a certain order for a puzzle effect. Search
      Search an area, discover an area of the game world. This is useful for introducing areas of the map to the player and giving them a sense of accomplishment right off the bat, showing them a new quest hub or the like. Quest Patterns - "An engaging experience"
      Tasks are one thing, and in many games, that might be plenty but we wanted custom quest to let the users create chains of quests, specialize them and set them up in ways that draw the player into the experience, there are many ways to go about this.
      The most basic quest pattern, the quest chain starts out broad and easy, the player has to kill some low-level cronies. The next quest is narrower, the player must kill fewer but tougher enemies, lets say the boss' bodyguards. The last quest is the boss fight, the player has killed the gang and can now kill the boss. This quest pattern is very straightforward and works well, giving rewards either at every stage or only when the boss is dead.  
      Side stub 
      A side stub is an optional part of the overlapping quest. Lets say quest A leads to quest C but there is an option to complete a side objective B, which makes completing C easier or it changes the reward, for example. The player must escape prison, the side stub is “free the other prisoners” in this example escaping with all the prisoners is voluntary but it might make it easier to overpower the guards or the prisoners might reward the player when he gets them out. The side stub differs from a generic side quest in that it is tied to the main quest directly.  
      Continuous side-quests
      These are side-quests that evolve throughout the game, one unlocks the next, but they are also affected by external requirements such as story progress. This pattern is often found with party members in RPG games, where the player must befriend the party member to unlock their story quests.  
      As the name implies these quests are time sensitive. The task can be of any type, the important thing is that the quest fails if time runs out. This could also be used for a quest with a side quest where the side quest is timed for extra rewards but the main objective is not.  
      Deja-vu quests
      This kind of quest pattern gives the player a quest they have done or seen before. In some cases, this “new” quest will have a twist or something that sets it apart. It can also be the same sort of quest that exists in different areas of the game world, perhaps there is more than one goblin camp? or perhaps the player has to pick berries daily.  
      Delayed impact
      Delayed consequences of a previous decision. Often used in games where the story is important and the players’ choices matter. These quests are tied together without the player knowing. Let's say the player is set the optional task of giving a beggar some gold to feed himself. The player gives the beggar a few gold and is on his way. The next time he meets the beggar the beggar has become rich and rewards the player for his kindness with ten times what he gave.  
      One of many
      The player is presented with a number of quests, they have to choose which one to complete, they can only choose one. The others will not be available.  
      Hidden quests
      Hidden tasks that aren’t obviously quests at first glance or are hidden away for only the most intrepid players to find. This could be an item the player picks up with an inscription in it if the player then finds the person the inscription is about he can get a reward for delivering it. A good quest pattern for puzzles, these kinds of quests can really make the game world come alive and feel a lot more engaging, allowing the player to uncover secrets, Easter eggs and discover all of the world created for them   
      Moral dilemma
      Punish the bread thief who stole to feed his family? often used in games that have a good/ evil alignment level for the players, these kinds of quests make the player make a choice about what kind of character they want to play, they get to choose if their character is good or evil.  
      Side quests
      Optional quests, these quests are often found in level based games where the overall quest must be completed to get to the next level, the player can optionally do some extra tasks to get more points. The important part is that these are optional but they give the player a reward for, getting everything they can out of the game.  
      Tournament style quests, a series of quests that get harder as the player progresses. An example could be a gladiatorial arena if the player defeats five enemies one after the other he gets rewarded as the champion of the arena, but if for example, he fails at the third, the whole tournament is failed and he has to start all over from quest 1.  
      Vehicle missions
      Despite the name these quests are not confined to being about cars, these are simply quests where the players control scheme changes to complete the quest(s). An example could be; changing from running around in the game world to driving a tank to destroy a fort.  
      Quest superstructure - "The whole package"
      With quest superstructures, we are venturing into general game design. The superstructure is how the player is allowed to complete quests in the game world. It's basically a question of whether the game is “open world” or a linear experience.
      The diamond structure 
      The open world model, think games like The Elder Scrolls V: Skyrim, the player is introduced to the game through a quest, but after that, they can go wherever and do whatever quests they want. There are tons of quests of the above types and patterns, the player is free to pick and choose which to do, giving the player the illusion of freedom within the game world (the diamond). However, the game still ends by completing a quest that is locked and always a requirement to complete the game. This can, of course, be varied by different choices the player has made throughout the game or even have multiple endings. Quests can be concentrated into quest hubs, i.e. towns with lots to do or the like, but they don't have to be completed in a linear fashion  
      Linear hub structure
      This structure consists of a number of required “bridge” quests that need to be completed in order to unlock the next area or “hub”, each hub can have any number of quests, this could be a town full of people in trouble, each with their own quests and quest chains to complete, when they are all done, the player moves on to the next hub through another bridge quest. Limiting the quest size of the hubs will make the quest structure feel more linear and thereby the game linear, and creating larger more open hubs can make the player feel freer.  
      Outcome - "So many options!"
      The development of custom quest has been the quest to allow game developers to create quests and missions that use these types. However, no matter how well we have researched, some one will come up with a new and creative way of doing quests.
      The solution for us was to make the system more customizable. Letting users convert their quest prefabs to quest scripts that automatically inherits the core functionality, so the user can freely add their own additional functionality on top of the existing core
      Asset development as fuel - "A learning experience"
      Developing this way, splitting the production into sub systems that can function on their own and even be used by others is not something that should be taken lightly, but if you can build something lasting, something others can find value in using, then the final product will be all the better for it. Custom Quest started as a project we thought could be completed in a couple of months, it ended up taking 7.
      In part this is because we realised that if we were going to release the system, we might as well do it right, that meant creating a system that was customizable and robust, a system that can be added to the users game and not the other way around, a system we could be proud of.
      The experience of developing for other developers is quite different to developing a game. One that has made us much stronger as programmers and as a company, it forced us to think in new ways, in order to create a dynamic and customizable solution. Custom quest has evolved from an asset we could use in Quest Accepted, into a tool others can use to create a unique game experience. All in all, the experience has been a good one and Random Dragon is stronger for it, I would, however, recommend thinking about your plugin and extra time before you start developing.
      Sources: -"We know you aren't stupid" - a quest design master class from CD Projekt RED - Game Design Essentials: 20 RPGs -
      Extra credits - Quest Design I - Why Many MMOs Rely on Repetitive Grind Quests
      Extra credits - Quest Design II - How to Create Interesting MMO and RPG Quests
      Center for Games and Playable Media - Situating Quests: Design Patterns for Quest and Level Design in Role-Playing Games -
      Center for Games and Playable Media - RPG Design patterns
      Special thanks to Allan Schnoor, Kenneth Lodahl and Kristian Wulff for feedback, constructive criticism and background materials.
  • Popular Now