编写可执行编写器c ++ / c# [英] Writing an executable writer c++/c#

查看:62
本文介绍了编写可执行编写器c ++ / c#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好论坛



我正在写一个2D游戏引擎,并且已经到了除了可执行的导出器之外几乎所有事情都已完成的阶段。我需要了解如何通过C ++或C#编写可执行文件,而不是仅仅将其保存为引擎自己的格式。



任何想法或代码片段? :)

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? :)

推荐答案

您不应该编写可执行的导出器。您应该导出可以由同一个可执行文件使用的每个游戏的游戏数据。在此之后,您可以将数据打包到例如zip文件中,如果您想要单个文件游戏,可以将其附加到可执行文件中。如果您担心每个游戏都需要某种游戏逻辑:游戏数据可能包含由可执行文件提供的游戏脚本引擎的脚本。我最喜欢的脚本引擎之一是CryEngine的流程图(类似于UnrealEngine的Kismeth) - 它只是编辑器中的一个图形图形,可以序列化为任何格式,例如xml,text,json,任何...



编写可执行文件导出还有其他几个缺点:例如,防病毒软件可能不喜欢它,而在单个可执行文件的情况下,您可以在家中构建它,您可以签名它并保持原样。
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.


这篇关于编写可执行编写器c ++ / c#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆