- Online Community Forums » Programming Questions » Need help with exporting my game

This thread is locked; no one can reply to it. rss feed Print
Need help with exporting my game
Member #15,229
July 2013

I made a post before but it got locked so I could not edit it so apologies for adding another thread.

Here is the original post:


I've recently started learning allegro 5 in addition to C++ and I am loving it. I've been following tutorials and eventually got to the point of where I made a simple space game. I was using Visual Studio Pro and used the setup wizard to create my setup.exe and my project.msi files. I used those files to install the game onto my computer and it worked fine, I installed it on my other computer which didn't have allegro 5 and it worked fine. However when I sent the two files to my friend they worked but when he tried to run the game.exe the program started in a "minimized" state and wouldn't maximize. I am at a loss for what the problem is. The only thing I could isolate down to possibly being an issue is the fact that the two machines that worked were windows 7 while his machine is windows 8, although I don't know what that means for me to be able to fix the problem.

Thanks in advance!


The Solution was to be:

"As a quick fix you can use ShowWindow [] :

#include <allegro5/allegro.h>
#include <allegro5/allegro_windows.h>

//...setup allegro and such and create your window

ALLEGRO_DISPLAY* display = al_create_display(width,height);
if (!display) {Fail();}

HWND window_handle = al_get_win_window_handle(display);

ShowWindow(window_handle , SW_RESTORE);"

However this has not helped. I had my friend try to run an example project and it worked fine so it is something wrong with my program. I noticed that the example files are all in a zip file and require no installer. I had created mine using Visual Studio 2010 Setup Wizard and sent the setup.exe and program.msi and had him install the files that way. I thought that may be my problem, however as I stated before it works on other computers just not his. I also tried to make a log file to see what was not working on his computer and the program didn't even get to the point of making the log file which means that the program didn't even begin to run because that was one of the first things to happen, so I don't' think it is a display issue it is something deeper and maybe something related to win8.

Any help would be greatly appreciated, I can give my source code too if that would help, and again sorry for double posting.


EDIT: Finally found a solution! Sorry for the post but here is the solution for those who are experiencing the same problem.

al_set_window_position(display, 200,100);

For whatever reason it is making the program display off screen and breaking it but if I set where to make the program display it works.

Please close Thank you!

Edgar Reynaldo
Major Reynaldo
May 2007

That's odd. I thought the problem with windows being created off screen was fixed. What version of Allegro are you using?

Member #15,229
July 2013

I am using 5.0.8, maybe it was fixed with .9?

Member #15,028
April 2013

After seeing this, I tested my program on two Windows 8 machines (one virtual machine and one laptop), and both ran perfectly. I never call al_set_window_position, and I am using version 5.0.10.

Go to: