Click here to Skip to main content
15,851,395 members
Please Sign up or sign in to vote.
2.00/5 (2 votes)
See more:
Hello Forums

I am writing a 2D game engine and have got to the stage where pretty much everything is done other than an executable exporter. I need some idea on how to write an executable file via either C++ or C# rather than just saving it to the engine's own format.

Any ideas or code snippets? :)
Sergey Alexandrovich Kryukov 6-Jul-13 15:35pm    
Not clear. What is "executable exporter"? What it is supposed to do?
Do you want to create and load executable files during runtime? If so, why?
chlohee 6-Jul-13 15:42pm    
Create executable files on runtime so games can be played by normal people without the engine.

1 solution

You shouldn't write an executable exporter. You should export the game data of each game that can be used by the very same executable. After this you can pack the data for example into a zip file and you can append it to the executable if you want a single-file game. If you are concerned that every game needs some kind of game logic as well: The game data may contain scripts for the script engine(s) of your game provided by the executable. One of my favorite scripting engines is the flowgraph of CryEngine (similar to the Kismeth of UnrealEngine) - it is just a graphical graph in the editor that can be serialized to any format, for example to xml, text, json, anything...

Writing an executable export has several other disadvantages: For example antivirus software probably wouldn't like it while in case of a single executable you build it at home you can sign it and leave it as it is.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900