18
\$\begingroup\$

I love the features of XNA but I want to get into c++ game dev. The problem is that I now have to worry about everything from loading a png file to opening a window. This is a little bit annoying.

I would really like a c++ version of XNA to solve these issues for me.

\$\endgroup\$
1
  • \$\begingroup\$ You should take a look at DirectX Tool Kit if you haven't already... It's a C++ library for Direct3D 11 programming that explicitly borrows from the XNA Game Studio class design. \$\endgroup\$ Jul 23, 2014 at 19:19

4 Answers 4

16
\$\begingroup\$

I would recommend that you look at SFML and Polycode.

I think the answers here are kind of missing the point. It is annoying to have to link to ten different libraries, such as Freetype, libpng, tinyxml, Ogg, Vorbis, etc, to get some basic XNA features.


SFML

http://www.sfml-dev.org/features.php

SFML is a free multimedia C++ API that provides you low and high level access to graphics, input, audio, etc. In a sense, its kind of similar to XNA but does not hold your hand as much. For example, SFML does not have a Model class.


If you are planning on using Models in your games, you should look at using Assimp.

Assimp adds support for importing the following formats:

Collada ( .dae )
Blender 3D ( .blend )
3ds Max 3DS ( .3ds )
3ds Max ASE ( .ase )
Wavefront Object ( .obj )
Stanford Polygon Library ( .ply )
AutoCAD DXF ( .dxf )
LightWave ( .lwo )
Modo ( .lxo )
Stereolithography ( .stl )
AC3D ( .ac )
Milkshape 3D ( .ms3d )
Quake I Mesh ( .mdl )
Quake II Mesh ( .md2 )
Quake III Mesh ( .md3 )
Quake III BSP ( .pk3 )
Biovision BVH ( .bvh )
DirectX X ( .x )
BlitzBasic 3D ( .b3d )
Quick3D ( .q3d,.q3s )
Ogre XML ( .mesh.xml )
Irrlicht Mesh ( .irrmesh )
Neutral File Format ( .nff )
Sense8 WorldToolKit ( .nff )
Object File Format ( .off )
PovRAY Raw ( .raw )
Terragen Terrain ( .ter )
3D GameStudio ( .mdl )
3D GameStudio Terrain ( .hmp )
Izware Nendo ( .ndo )

Polycode

http://polycode.org/features/

Polycode is a free, open-source, cross-platform framework for creative code. You can use it as a C++ API or as a standalone scripting language to get easy and simple access to accelerated 2D and 3D graphics, hardware shaders, sound and network programming, physics engines and more.

The core Polycode API is written in C++ and can be used to create portable native applications.

On top of the core C++ API, Polycode offers a Lua-based scripting system with its own set of compilation tools. The Lua API mirrors the C++ API and can be used to easily create prototypes and even publish complete applications to multiple platforms without compiling C++.

Polycode is opensource, meaning that you can learn from how things are done behind the scenes. Also, it uses Assimp to load models so you do not need to worry about manually linking to Assimp.

\$\endgroup\$
1
  • \$\begingroup\$ Minor clarification: Polycode doesn't use assimp to load models, but rather has an assimp-based tool to convert models into a format it can load. \$\endgroup\$
    – cib
    Jun 6, 2013 at 19:39
4
\$\begingroup\$

There are literally hundreds of libraries out there that handle all kinds of aspects of game development. From loading images, to opening and managing windows, to rendering, to sound, to physics, etc.

What there are not are very many "one-stop-shop" solutions, where you get everything all at once. That's one of the benefits of XNA. You generally have to pull together many libraries to build an engine. This gives you great flexibility, as if one component is lacking, you can (relatively) easily swap it out for another. But at the same time, it requires more work.

Really though, why are you so hung up on what programming language you want to use? It seems to me that you really like XNA and want to use it for game development. So go do that.

\$\endgroup\$
3
\$\begingroup\$

You can use the D3DX and the DXUT at first, which are not stuffed like XNA but helps a lot on setting the environment at least, such as creating a window, running the main loop and have some useful functions such as D3DX11CreateTextureFromFile()--you will have to manage the pointer though, but it's not that hard. There are also many libraries you can use in C++, which you can replace with your own if you want to improve performance or whatever you want to change.

The D3DX libraries and the DXUT are best suited for D3D9 and 10, and DXUT comes with its source code. For DX11 they culled some functions from those libs but I hope they still have the most useful ones, and if I remember well now they provide the effects framework in source code form (for if you have the patience to explore it).

I've learned much more when working at lower levels than over pyramids of frameworks, so I can't say you to use XNA, but that depends on your goals mostly.

\$\endgroup\$
1
  • \$\begingroup\$ All versions of D3DX are deprecated. The 'modern' Direct3D 11.x utilities libraries are DirectXTex, DirectXTK, and DirectXMesh plus DirectXMath in the Windows 8.x SDK. The latest version of Effects 11 and DXUT11 are on CodePlex for folks who are porting older codebases and are happy with Win32 desktop apps only. \$\endgroup\$ Jul 23, 2014 at 19:22
1
\$\begingroup\$

If you are just getting familiarised with c++ language, I would recommend using a simple library like SDL for getting experience in game development and then programming using openGL.

\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged .