SDL - cross-platform development

In the coming months I am going to take part in a small competition. They require that the presentation can be compiled (and it will be before it is run / evaluated for the competition) on Linux. I am going to use SDL and C ++. I only ever developed Windows, and I'm already used to the benefits Visual Studio provides. I would like to be able to develop on Windows with VS, and then towards the end of the process port it to linux. Besides the fact that SDL is already installed on a Linux machine, is there anything I can do during development that makes the process easier? In addition, the competition rule for all of these conditions is:

it should also work on an open platform (we strongly recommend that you make sure your program runs on modern versions of GNU / Linux, as all judges will have access to it).

I assume that to compile / work in Ubuntu (already have a home server with this) will be enough?

+4
source share
2 answers

Your question is a little open, but the first suggestion would be to use an appropriate cross-platform build system like CMake from day one . I would refrain from "porting" to Linux at the very end; you may find yourself under a rough schedule (and possibly run into problems that you did not expect). Thus, the continuous assembly of (working) versions of Linux will help alleviate your problems.

In addition, if the game is designed to work exclusively under Linux, why not install Ubuntu in a virtual machine somewhere and get acquainted with one of the development environments, for example kdevelop or qtcreator? Wouldn't there be direct contact with the platform you are developing to make things a little easier?

+3
source

I develop games and start like you. I would advise you to use the SFML library for these purposes. This is not a very big and very good way to start with.

Here you can use:

  • 2D rendering (OpenGL)
  • Fonts
  • Timers
  • Wrappers around images / sprites
  • Post Effects / Shaders
  • Sound
  • Network

In this page you can find some starting examples.

0
source

Source: https://habr.com/ru/post/1413566/


All Articles