SFML News – Week …-29 (2013)

Although I’ve once wanted to make weekly updates on SFML News, the amount of content go more and more, while my time got less and less, thus I eventually stopped. Since there have been many new posts on various projects in the last few days, I decided to make another quick update and present some text and images and because there is so much nice stuff, I’m not going to limit myself on a fixed date in the past. Unfortunately I can’t write about every single project, otherwise this blog post would never end!

Projects

Academic project: Simulation of Scorpion & Mice

This project was presented on the forum for the first time on the 7th if July, it’s an academic project from the Swiss university EPFL and created by the Mac OS X guy behind SFML, namely Marco Antognini aka Hiura. Now the aim of the project was to simulate full life cycles of mice as the prey and scorpions as the predators. The hard part of the project seem to be lying with programming the neural network, rather than getting something displayed with SFML, but in any case it’s quite nice to see SFML being used in notable universities and projects. With this project the use SFML wasn’t just temporarily and won’t stop now, but Hiura says that they’ll be using their SFML based setup in the future, so the next class might be actually learning SFML!

Postmortem – One must die

Postmortem has been first shown over a month on the SFML forum, but it went into Closed Beta just recently and now even tries to get the green light on Greenlight – although I’m still wondering how they’re going to get a free game on Steam…
Here’s a quick description from their website:

Postmortem is a FREE Indie narrative-exploratory game that will stress your moral compass this August 15th! Think The Walking Dead meets Home and The Last Express, with a dash of To The Moon – a perfect mix of exploration, conversation, meaningful choices, discovering clues and some puzzles.
You are an agent of Death sent to take ONE life from a cast of influential and ambitious characters at a charity Gala, in a rich and complex setting of industrial-revolution, conflict-torn country.

They are of course running their own website and a nice dev blog. It’s nice to see, that they’ve already gotten an article on US Gamer. Personally I think it’s an intriguing idea and definitely worth checking out!

Colonies – A Retro Sandbox Survival MMO

Not a new game presentation either, but they’ve now gone into Closed Alpha phase and since it looks really well polish, I just had to include it here. As the title suggest this is going to be a sandbox game with RPG elements and it should be an MMO or at least O(nline) as well. You should be able to settle, create a village, and defend your friends from the horrible creatures who lurk in the forests. You can change the landscape, farm, or hunt in order to survive the conditions, etc. Whenever the word “MMO” drops people get suspicions, since it’s hard to get done right and needs a lot of skill and time, but feel free to follow Jungletoe’s dev blog and don’t forget to stop by their own community.

Basis: Bone and Sprite Integration System

Some of you might have noticed the Spine project from a few month back, which also has support for SFML and I’ve even helped on Kickstarter. While Spine costs you some money Basis doesn’t cost you anything. Both mentioned applications are for 2D animations of skeletal and sprite creation. Although the tool is free the development still needs to be financed, thus they’ve started a Kickstarter project as well and they could really use some help! A download can also be found on the Kickstarter page.

Council of Torment – 2D dungeon crawler with a rich storyline

Although Council of Torment is still in rather early development it still deserves its place here.

Council of Torment is a top-down 2D dungeon crawler inspired by Ultima IV, with a very rich storyline, gameplay elements that’s been under development for 10 months.

From the description on the forum it seems that a big portion of the development will also go into the story. There’s not much more to talk about for now, but it’s certainly a project to keep an eye on.

Rock, paper, scissor.

I think, I don’t have to explain how this game works or I at least hope everyone knows “Rock, Paper, Scissor”! Although there still seems to be some animation issue, it works fine and can be interesting to try and figure out, if it’s based on some pattern or simply randomly generated. Not only can you download the game itself, but if you want, you can also look at its source code.

Metanact – Filesystem spaceshooter

While nobody has ever heard of Schnommus aka Seb, he seems to have been reading the forum for quite a while now. Judging from his progress on Metanact so far, he also seems to know quite a bit on programming. Metanact’s goal is to explore and conquer your own computer’s file system in a 2D environment. So while playing, the game will go through your file system and pick out various file names and represent them as enemy. While this game reminds me of other “file system” games, which would actually delete the files you’re shooting (e.g. Lose/Lose), Metanact is not such a game. It does not do any harm to your file system. You can find out more about Metanact on their website or even help Seb getting a bit more money together for some more nice content on indiegogo.

2D Platformer using SFML and Box2D

It always amazes me how some is able to create such a rather nice game as their first project. I still haven’t managed to get my own little platformer running (most because I end up doing unnecessary stuff) and others just go ahead and get it done in their first project. Though it seems, he’s using the Public Domain tile-set, I’ve found yesterday as well – visuals are something that can blur the actual vision between good and bad.

GoPlanets

One of my favorite game in the current list is GoPlanets. The idea is rather simple but much fun! You’re red and can send out a certain amount of ships to other planets to take them over. The numbers on the planets display how many ships you can send and based on this number a given percentage will be taken away when sending out ships. The number increase over time automatically, so the longer you wait, the more ships you get, but keep in mind that the computer will try to win everything in the meantime as well. Although the current AI isn’t really challenging it’s still very fun to play. I really hope to see some further development on this project!

Project Blastorium: a Bomberman-esque game

I don’t think anyone will really remember my attempts on a bomberman clone for one of the SCC. I got some result, but it was very messy and I think I’ve never got it really finished after I’ve missed the deadline. Project Blastorium on the other hand is very well polished and introduces some different weapons to the playground, which seems rather interesting. You can follow the progress on the game on the dev blog or just in the forum.

Black and White and Colors

Molyjam 2013 a game jam, where you have 48h to start from scratch to the finished product. They seem to have been three people involved in this project and their final product after only 48h is just mind blowing. It’s simple, but very well polished and the game idea is very good. It would be totally awesome, if they’d go and add some more content, i.e. new levels, since you’ll get to the last level in just a few minutes. You can get the Windows binary from the Molyjam site or read some more information on the forum.

Discussions

SFML Game Jam

This discussion just popped up on the forum, thus it’s still very hot and it seems many people are tuning in on the idea – even Laurent would be excited to see something like this.
The goal would be to have a contest going for a specific amount of time (24/48/72h) to start and finish a game using SFML. How, when, where and why is what the discussion is all about, so don’t forget to give your own voice!

Clipboard and Open with Default Application feature for SFML

Originated form the GLFW 3 thread FRex went ahead and proposed the two features. The discussion is still open and if you really want this feature, you should definitely go and write there why you’d like to see this. Personally I think this could be nice, but since it should be relatively easy to implement on my own, it’s not something that should get on a high priority list.

Changes on SFML

There have been so many commits and issue discussions, that I’ve totally lost track. You can however always go and look at the commit history yourself!

SFML News – Week 12-13 (2013)

Projects

Updates on the Nightly Builds

My SFML Nightly Builds were quite a few commits behind last week, mainly because I wanted to keep the matching SFML version for Thor and thought I could get the automated building system to work with Thor. Unfortunately I didn’t manage to do so in time and thus I only update the latest version section and left the previous section with the older version. Now that GCC 4.8 got released this week, I’m thinking about providing binaries for yet another compiler, but I’m not sure which one I should use. What do you guys think?

Kroniax 5.2, Preview & Source Code

AlexAUT is not resting and keeps polishing his game Kronaix. We’re not at version 5.2, which brought a working Challenge Mode with online highscore and fixed different bugs. He also moved the updates to Indie DB and thus might get some more people to play Korniax.

I’ve posted the last weeks LP not only here, but also on the forum thread and AlexAUT asked me, if he could use my LP as a Preview. I gave him of course the permission, but also offered to create a ‘stand-alone’ preview, which he was even more excited about.

Besides the new official release and the preview, AlexAUT finally published the source to GitHub and with 5 pull requests, he already got some contributions from Haze, iostream and me. Haze made sure, that the source code will compile on Linux, iostream made a conforming Markdown ReadMe and I’ve mainly cleaned up the file naming and structure and added a CMake build system. Feel free to check it out and contribute to it.

Kroniax on GitHub

Open Hexagon’s Linux Port Released

Vee has been working hard on Open Hexagon last two week, but since he’s not that experienced with Linux, he has been deploying Open Hexagon for Windows only. Luckily he got flibitijibibo to continue his older ports. Thus releasing Open Hexagon 1.84 for Linux.

But with help from my side and even more from Aster’s side, Open Hexagon now uses CMake to build and thus is way easier to deploy on Windows and Linux and we might even see a Mac version, if anyone is willing to test it and compile it for Mac. With those new changes the time was right for version 1.9, which adds a new level pack and a few other changes and fixes, see the full ReadMe for more information.

Thor’s Particle System in Action

Tank has posted an example video on a small game he’s been working on, to get back at C++ again, after a longer time doing web development-only for the company he’s working for. It looks quite nice and demonstrates how easy it is to get a good effect with particles. If you’re looking for easy way to start with particle effects, you might want to checkout Thor, which of course offers many other handy things.

Mini Crown

kaB00M who has been or still is working on a Mana fan game called Seiken Densetsu, posted his newest creation Mini Crown. It seems to be based on Vanillaware’s Dragon’s Crown upcoming RPG/Beat’em up game and is available for Windows. The game is still work in progress, but it’s still nice to see that people are working on projects with SFML.

Platform – The simple platformer game

The author of yet another platformer called Platform is santiaboy. He has been on the forum only since the beginning of this year, but has now already released his first SFML game. The controls are quite fluid and from the technical part it seems well done, but one of course still notices that it’s a very rough version and needs some more polishing.

Personally I’m quite impressed how far he got his platformer, I always failed at the basic concepts or the collision detection, got frustrated and left my approaches to a simple platformer lying around on my hard disk.

 

Discussions

Will SFML 2.0 ever see the daylight?

Believe it or not, but the people who’ve been with SFML for quite some time, are waiting on the release of SFML 2.0 already for around three years. I’ve started with a bit of SFML 1.6, but since the ATI bug wouldn’t let me properly execute my applications and since SFML 2.0 already came with a few more bug fixes I switched over rather quickly. The SFML 2.0 back then, wasn’t anything like the SFML 2.0 we have today. We were still using CamelCase for the functions and nobody had ever heard of sf::RenderTexture, sf::Vertex or a few other classes. The API was way more similar to SFML 1.6, what made the switch easier. The big graphics API change was introduce around 1.5 years ago, which was a good day and basically turned SFML into what it is today. The opinions of the community got split when changing the function names from CamelCase to camelCase. Some hated it, some loved it and others found it just ridiculous to even do such a change. Then nearly 1 year ago, we got a release candidate, which made everyone believe that a release would follow within the next few weeks, but as we all know, this hasn’t happened.
So getting back to the title question, will we ever see a SFML 2.0 release? The answer is yes and looking at the milestones on GitHub, we can only see a one open issue for 2.0, where Laurent stated that the tutorials are complete and only parts of the website need to get updated even gave, he even gave a rough ETA, “next month” – you better keep your word Laurent!

New SFML Logo

Unfortunately nobody has commented here on the blog about the last logos, but the discussion on the forum keeps constantly going. Haikarainen posted a new logo, implementing some suggestions by others. The font style looks really well, but personally I don’t see any reason to use an animal for a logo. The most interesting part is though, that Laurent has kind of pointed out the most fitting and we just might see a basic pentagon has SFML’s new logo. Obviously not everyone agrees and thus Nexus has introduce an idea with arrows and made an example. But one should also not forget the two contributions of jabza. Let me know in the comments what you think about the logos.

Changes on SFML

Unfortunately there have been no changes to SFML this week.

SFML News – Week 11 (2013)

Although I probably shouldn’t start again with something new and rather try to get more of those computer science articles ready, I still had this funny idea of releasing ‘news’ articles on what has been happening in the SFML community. I’ll try to release weekly articles, but I don’t promise anything and I don’t even know how much I’ll write for each article.

Projects

Kroniax

As promised by AlexAUT, Kroniax 0.4 got published last Sunday and it adds a complete redesign of the GUI and a few additional levels. Although he mentioned that it would take longer before the next version, he managed to get 0.51 (download page) out yesterday.

But who’s AlexAUT and what’s Kroniax? AlexAUT joined the SFML community in October last year and has been most likely busy ever since. Less than a month ago he released his probably first bigger game with SFML. It’s some kind of a side-scroller, where you have to maneuver a white triangle, representing a ship, through a maze of blocks. To make things more interesting the velocity of the triangle as well as the strength of gravity varies from level to level or can change within each level. Next to the described Arcade mode, the latest version 0.51 features now another mode called Speedchallenge, where you can change the velocity on your own, while you still have to beat the level. Since it is called ‘challenge’, AlexAUT added an online highscore, so you’ll get some aim to fight for.

Kroniax is extremely addictive and makes a lot of fun. Since I had so much fun with it, I’ve even made quick Let’s Play:

Open Hexagon

Legendary Vee has done it again and released not only one new version of Open Hexagon but five; starting with 1.8 and ending with 1.84 (download page). The most noticeable change are the online highscores. Everyone who’s playing with the official version in ‘official mode’, will automatically submit their scores to a server and get their current position and the top 8 places. But that’s not the only new thing; you now get a full menu for various options and a nice pseudo 3D effect. As always you can find the full changelog in Vee’s detailed ReadMe. The minor updates were mostly bug fixes, as well as security and performances updates.

I actually wanted to make another video on Open Hexagon, but my microphone on the headset died and I don’t have a replacement yet. The built-in mic of my notebook is not really useable for such things, but you can still checkout one of my older videos on Open Hexagon:

NEAT Visualizer

The NEAT Visualizer is a project, which visualizes an implementation of the Neuro-Evolution of Augmenting Topologies (short NEAT) algorithm. The NEAT algorithm evolves neuronal network structures and weights them simultaneously. Such a network is capable of learning some simple tasks, which the visualizer should make prettier for the eye. The used algorithm doesn’t have anything to do with SFML, since it’s a generic, but the visualization uses SFML underneath. Based on NEAT lolz123 has also written a small but fun game as Ludum Dare.

lolz123 released a new video and a new version of the NEAT visualizer this week. You can look at the video here:

Discussions

New SFML Logo

Nearly two years ago Laurent opened the discussion on the forum for a new logo. Back then we already assumed SFML 2.0 would get released anytime now, but well we are still waiting, more on that in another post though. After the thread died out for a while it’s back again and every week we get a few new suggestions. The ones of this week were in my opinion quite strange and not very well suited as logo. On two of them it’s nearly impossible to see the letters ‘SFML’, especially if you don’t know already that they should be there. The other one is textured which is not useable at all for a logo. But maybe I’m not artsy enough to understand this, so I’ll let you make your own opinions:

Will SFML support OpenGL ES sooner than expected?

OpenGL ES is as specification for a platform and language independed 3D programming. It’s mainly aims embedded systems (thus the ES) such as Raspberry Pi or devices that run Android or iOS.
If SFML were to be ported over to OpenGL ES, it could potentially open the world to a whole new set of platforms and thus new games and applications with SMFL. In general Laurent wants to get SFML to OpenGL ES, but in the past this was not due for anytime soon. What could then change his mind? Well slotdev started a discussion on the forum about having a DirectX backend for SFML, which would involve even a bigger change to SFML, but luckily some guys have created ANGLE, which basically translate OpenGL to DirectX calls and thus enables one to write OpenGL applications for platforms which support only DirectX. The downside to this is though, that ANGLE implements an OpenGL ES specification. Since slotdev and a few more people are commercially working on games for casino machines, Laurent stated that he’d be looking into getting OpenGL ES support sooner than plant, if they require it anytime soon. The discussion was then moved to private chats and we’re kind of left in the dark what they decided on.

What do you guys think about elevating the priorities on OpenGL ES? Should Laurent tackle other more important issues first before rewriting huge junks of SFML’s code? Let me know what you think in the comments below.

Source code changes

Personally I feel like we got a much more involved community in the past few weeks, but I’m not sure whether this is just because I’m looking more closely at the commits and what’s going on, or if it’s really because more people are submitting pull requests and Laurent actually accepts them. It also kind of feels like, Laurent got a bit more open about contributions after the forum thread with the title: “More Commuity-driven Development”

  • We received a fix from one guy, who had problems with some events on Arch Linux with Awesome WM. – 560b741
  • As noticed by our great Nexus in a forum post, the explicit for the sf::Text constructor wasn’t needed anymore. – 5c46daa

 

I hope you’ve enjoyed reading my news post and actually got some news out of this. If you feel, that I’ve missed some parts or just got any kind of feedback, please leave a comment down below or contact me by means of PM, Mail, Twitter, IRC, etc. I’d really to hear some opinions.

Website Update & Announcement

If you’re reading this on the actual blog website and not through RSS or similar, then you might have already noticed, that I’ve changed the WordPress design. Although I really liked the old one, it has some troubles with the titles and lacked a clean separation between the posts. The current theme ‘Emire’ hasn’t been modified in any way, but I might add a custom header in the future.

In addition to the new theme I’ve also added a new plugin, which allows you to share my posts with the two-step share buttons. So you won’t get tracked by Google or Facebook, but still got the ability to share it directly from my posts. Strange enough the buttons don’t appear always (like when I’m logged in), so I’m not sure if everyone will be able to see them.

As for the announcement part, I’ll be starting a series of posts related to various computer science topics. There isn’t a fixed plan or any greater goal, but I just want to recycle the stuff I’m learning at the university and having to rephrase everything in my own words, seems like a good way to let it sink in and got the additional benefit of sharing knowledge with others. If you’re interested in a specific topic, let me know in the comments/e-mail/Twitter and I’ll see what I can do about it.

Personal SFML Website Updated

A bit late, but better late than never: Happy New Year to everyone!

So the past few days I’ve been working on a new front- and back-end for my small personal website, targeted towards anything related to SFML. Active SFML developers and/or SFML forum readers might already know that I’ve been providing SFML Nightly Builds for a handful of compiler, up to now the downloads were provided through a small self written PHP file and linked in the static HTML download section. Now they’ve got a dedicated place and user-friendlier URLs.

Now let me talk a bit about the two frameworks, which currently power the new website. Both of them were fairly new to me and thus I had a lot to learn and read.

As for the front-end I used Twitter Bootstrap, the evermore popular collection of CSS and JavaScript assets, that give your site with a very simple HTML skeleton a somewhat standardized look and feel, which a many find quite intuitive and appealing to work with. The small SFML website wasn’t the first project with which I got myself introduced to Twitter Bootstrap, but it had recently refactored an older database-project, I had made for a friend of mine a few years back. The simplicity and powerfulness of the framework really surprised me and with the help of the online documentation working on a nice HTML site is a very easy task.

The decision for a proper back-end was a bit harder, since there are so many different ones and each of them provide again different features, which might sound genius, but can have a huge learning-curve, so you’d end up digging through tutorials and documentations for hours. The first framework I’ve had in mind was Symfony 2. It is a well-known and respected PHP framework and one can do any kind of web application with it. But because it’s so loosely coupled and generalized the learning curve is quite big. Although they provide some nice introduction tutorials, I’ve never gotten a good overview and never really understood how one would get to write a simple application with it.
In the search for something less clumsy and complex I went to Wikipedia’s web framework list and clicked me through one after the other, until I reached CodeIgniter. Looking at the short feature list on their website, I was immediately hooked and was pleasantly surprised as I switched to the documentation, which is structured cleanly and lets you choose on how deep you want to go, but builds up your knowledge about the basics step by step. Within a few minutes I had a running back-end with custom URL routing. The only problem I ran into was the correct mod_rewrite routing and I could only resolve it with some googling. So in case someone would by accident find my blog, here’s the correct routing I use to abstract the index.php away:

RewriteEngine on
RewriteBase /
RewriteCond $1 !^(index.php|img|css|js|robots.txt)
RewriteRule ^(.*)$ /index.php?/$1 [L,QSA]

That way one gets a nice URL like https://my-gate.net/about/ which will get redirected automatically to the index.php.

Anyways I’m quite happy with the combination of Twitter Bootstrap and CodeIgniter and will most certainly use them further for different projects. I’m here specially thinking about SFMLUploads, which has as back-end only a few very hackish PHP files and thus is constantly failing and very hard to maintain.

Do you have any experience with CodeIgniter, Boostrap or any other framework you want to drop a line in the comment section?

yEd – A simple and nice diagram tool

How often do you find yourself, trying to put some information graphically into sense, but fail to do, because the software you’re using isn’t really nice to use?

Maybe you’ve never experienced that or have never needed to do so, but I have on multiple occasion and it has never been fun.
Being a fan of open source and free software I quickly found my way to Dia, but seriously this software is not fun to work with. The interface seems to be quite buggy and you can get tired by clicking and searching through the menus and then there you’ve all that mess with your objects…
Next up being a Windows user and student I can get a copy of Microsoft’s Visio for free. Well the interface seems quite familiar and the functionalities are fitting… but it just doesn’t feel like the solution, in fact the chaos still remains.

Today, I was browsing again through my RSS feeds and found that a friend of mine (Stefan Schindler aka Tank) has published his first tutorial/article about Game Development Design (it’s very interesting and should definitely read it!) and he was using some nice and fancy diagrams. So mentioning the diagrams on IRC he immediately pointed me towards the software he used: yEd.
Here’s the solution to my initial problem:

diag

And for all the lazy people that don’t want to check out the site, here’s a YouTube video:

Stay tuned for more updates on my projects!

SFMLUploads.org – Relaunch

So I’ve taken ownership of the project SFMLUploads.org which is basically a file and image hoster made specially for developers who are using the SFMLibrary. Below you’ll find the announcement text I wrote for the official SFML forum.

After quite a few ups and even more downs SFMLUploads is finally back online!
SFMLUploads.org was originally created by the user Haikarainen back in May 2011 but due to server issues the project had experienced some hiccups in the early days and then went offline in July 2012. As quite a few things have been uploaded to that site and linked to in this forum, I felt it was wrong to lead the project drop dead, thus I contacted Haikarainen and convinced him to let me host and maintain the website. So here we are with the relaunch of SFMLUploads!

All the files and user accounts have been successfully transferred over to the new host, thus you’ll be able to log into your old account again to get access to your files. If you don’t remember your password you can contact me and I’ll give you the opportunity to re-register.

SFMLUploads logo

SFMLUploads is aimed at developers using the SFML library, and it’s main purpose is to serve those users with bandwidth for:

  • Project archives, allowed extensions are: .rar, .zip, .tar, .tar.gz, .tgz, .deb, .rpm, .7z, .xz, and .ace.
  • Code-snippets, syntax-highlighted code with support for 100+ languages, "fork"-able, meaning users can create other versions of it. Useful with debugging etc. Kind of like Pastebin.
  • Screenshots/images, allowed extensions are .jpg, .jpeg and .png. Primarily for screenshots, but other picture are allowed as well.

The main rule is: It HAS to have something to do with SFML, either if it’s for a forum post where you seek help for debugging a problem related to/which uses SFML, or if it’s download links for your awesome game on your personal blog or something, etc. You can read the full terms here.

I hope you like it – signup and enjoy! :)

PS: This service is 100% free, if you feel like donating for the hosting cost then you can do this here. Thanks!

The disappointment from Microsoft: Visual Studio 2012

With the announcement on the 1th of August for Visual Studio 2012‘s final build shouldn’t I as developer with Visual Studio be thrilled rather than disappointed? Yes the new version brings quite a lot of new and/or improved features, but it seems like Microsoft has lost their focus on what should really matter. I guess it’s not the first time the company from Redmond has gotten caught up in their own little world and totally forgot about everyone else.

So let me finally get to the point: Visual Studio 2012 or rather the compiler (MSVC) will support only about three new C++11 core features which gets us to a count of 18 supported core features of 40 (source). Some may now argue that 18 features are a lot specially since the new standard isn’t even a year old, but for those I can only add that many possibly features were obvious to come with the new standard and that the open source projects like GCC and Clang already support way more features and some of those for quite a while now (source).

When I said that Microsoft has lost their focus, this wasn’t taken out of the blue. It’s based on different facts and intuitions:

  • Fact is that Microsoft at first wanted to release the Express version of VS12 with support only for their Modern UI (formerly called Metro) Style Apps, so the development of native C++ applications would’ve then only been possible for people who pay (or pirate) Visual Studio 2012.
  • With the constant and heavy development on their own home-brew language C#, they kind of make their priorities clear…
  • Stephan T. Lavavej (aka STL) stated in a comment to the first source link from above: “Since January 2007 (when I moved from Outlook Search to VC Libraries), I’ve been the only MS dev working on the STL.” – From such a big company you’d clearly think that they’d put more people on such a task; now you can only guess how many people work on the compiler itself… (Also note that the STL itself isn’t even that far behind regarding C++11.)

As I’ve written on my other blog C++11 is a new and better language, it’s the language of the future and it’s kind of sad seeing such a big company like Microsoft failing to keep up with the development for one of their core applications.

Since I don’t want to miss to the C++11 train that starts to roll faster and faster with every passing week, I’ll probably have to leave Visual Studio behind me and start looking out for better alternatives like QtCreator, KDevelop or just plain Vim in connection with GCC or Clang. Since those tools are the most powerful in their right context, i.e. a *nix based OS, and since I’ve gotten more and more used to the so called GNU-tools, I’m seriously considering the move to Debian. For those who know me better, this step would be quite a big one for me and I won’t go and just abandon Windows but there’s no really good reason to code and develop on Windows anymore.

While writing this blog post on another PC, Debian is getting installed on my main one… So we’ll see how things develop and my hope is that Microsoft gets their things together and very soon release a service pack/update with new core features.

A SmallGameEngine or State Machine

introFrom a question ask in the official SFML forum which linked to a tutorial by Anthony Lewis at GameDevGeek.com I took the challenge up on me and converted that small game engine or maybe it would be better just called a state machine from SDL to SFML. In the near future I also hope to rewrite the original tutorial but of course inserting my insights and explain the additional changes I made. Also I’d like to get some more or less official approval that I’m allowed to copy bits and pieces from Tony’s text but unfortunately he didn’t reply to my e-mail (via the contact form) yet. So here a few things about it.

For all those that don’t understand what a state machine is, here a quick definition:

It is conceived as an abstract machine that can be in one of a finite number of states. The machine is in only one state at a time; the state it is in at any given time is called the current state. It can change from one state to another when initiated by a triggering event or condition, this is called a transition. – Wikipedia

So there you have it; we have a finite number of states of a game, like the menu, the splash screen, the game and the credits screen. The machine is running as long as there’s an active state and only one state can be active. (More details in the upcoming/original tutorial.)

So since the code is completely based on that tutorial it also uses the same states, namely IntroState, MenuState and PlayState. You start off with the IntroState and then by pressing any key you’ll proceed to the PlayState from which you can either invoke the MenuState or exit the application. From the MenuState you can only switch back to the PlayState.

After some thinking I’ve changed actually quite a lot of the GameEngine class and how states get created, paused, resumed and destroyed. I’ve also decided to use a few nice language features (e.g. RAII or std::unique_ptr<T>) so the code can now get described as C++ code rather than C with classes code.
Those changes, next to the ‘artistic’ advantages, give you more flexibility in using the states, as you can reset a state by just recreating it and it ensures that all three functions HandelEvents(), Update() and Draw() get called before a new state gets started, thus minimizing possible strange behaviors.

So overall it’s a nice little demo for a state machine and I might just as well use it in some future project. So feel free to literally check-it-out (or better git pull) on GitHub. If you got any questions then just put them in the comments, if you have any suggestions or bug reports use the issue tracking system of GitHub.

SmallGameEngine

Welcome to my development blog

Although I already maintain a blog, I always wanted to write even more about my adventures in the development section. It was actually one of the main reason I started the other blog and if you look closely you could also find quite a few few posts about programming stuff.
Now as I got deeper involved with C++ and SFML I noticed that the common language to write about it is not German but surprise, surprise English.
On the other hand “My-Gate • Blog” got more and more personal which may not be that interesting for tech guys.

The main topics will be about C++ and SFML (Simple and Fast Multimedia Library) although I’ll also write about topics that seem interesting and could be of value to others.

cpp
sfml

As with all blogs, I hope to contribute here on regular basis and probably will fail doing so from time to time. :)