Pregunta

I've made a game using SDL2.0 and c++ and I'm trying to make an executable file and make my game installable

But when I try to use the .exe file which visual studio made itself in the debug folder of my project , I just see the game's window colored blue and nothing else happens!

what should I do to get rid of this things? I should mention that there are some images and sounds and some other files that should be attached to the program!

So what should I do to make an installable file from my program?

¿Fue útil?

Solución

First off, I would not suggest using the debug executable for running the game. Rather compile the file in release mode (also check your compiler's release mode preferences).

It's kind of hard to say why nothing shows up without seeing any of your code or image of the game's window; but it sounds like the executable can't find the correct image and sound files. Were these hard coded in the code?

For which operating system is your game designed for? If you are using Windows, try something like WiX Toolset to create an installer.

Otros consejos

From your description i'm guessing that you are not adding the images as resource files to your project, if you do the images would be included into your .exe file.

For making an installer for Windows i recommend using NSIS

You need to have your resources in the same directory as your executable.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top