制作游戏程序 [英] Making a Game Making Program

查看:98
本文介绍了制作游戏程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

请不要回复我,这是一项非常艰巨的工作,我将无法做到,因为我确切地知道自己要从事的工作.我希望能够在窗口中键入一些代码,例如编程语言(不用担心,我知道如何进行编程语言),并且代码将在执行代码(例如java)时运行.问题是,我不知道如何从控制台应用程序制作Windows窗体.如果我想输入类似的内容:

hey guys,

please don''t reply to me saying that this is a very big job and i won''t be able to do it, because i know exactly what i''m getting in to. I want to be able to type in some code to a window, like a programming language(don''t worry, i know how to make programming langauges) and the code will run when you execute the code, like java. The problem is, i don''t know how to make windows forms out of console applications. if i want to type in something like:

new form



然后我希望它制作一个新的Windows窗体,只是一个空白窗体,我将决定默认值,如size.我将如何做到这一点.我正在用C#控制台应用程序制作这种编程语言.你能帮我吗?

在此先感谢:)



then i want it to make a new windows form, just a blank one and i will decide the default values like size. how will i be able to do this. I am making this programming language out of a C# Console Application. Can you please help me out?

thanks in advance :)

推荐答案

尝试:
MyForm mf =  new MyForm();
if (mf.ShowDialog() == DialogResult.OK)
   {
   ...
   }



但是要坦率地说,就像理查德所说的那样,如果您不能做到这一点,那么在开始这个项目之前,您将有大量的知识要学习.

获得一本关于Windows的C#书籍,并先阅读它,然后做每一个练习,就会好得多了.我担心您最终会丢失太多,最终结果将是一团糟.



But to be brutally honest, as Richard says, if you can''t do that, you have an enormous amount to learn before you can even begin to start on this project.

You would be much, much better off getting a book on C# for Windows, and reading it first, doing each an every exercise as you go. I fear that you will end up missing far too much and the final product will be a horrible mess as a result.


如果您知道(如陈述的那样)如何编写编程语言,那么您掌握了解决方案.进行解析器以识别新表单"语句(以及您打算支持的其他语句),并将其转换为Windows Form应用程序(可能是隐藏的)的命令.
If you know (as you state) how to make programming languages, then you have the solution in your hands. Make a parser to recognize the ''new form'' statement (and other statements you aim to support) and translate it to commands for a (possibly hidden) Windows Form application.


这篇关于制作游戏程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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