在C#.NET Visual-Studio中创建游戏库 [英] Creating A Game Library In C# .NET Visual-Studio

查看:79
本文介绍了在C#.NET Visual-Studio中创建游戏库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿大家!



因为我的上一个项目想法有一些重大缺陷我决定做一些不同的东西。



我想到的是创建一个几乎像蒸汽的游戏库但是为了个人使用,我只是不喜欢蒸汽的设置方式以及你如何添加自己的游戏所以我想创建一个小小的我的游戏库...



我脑子里的图片看起来和功能如何,但我不知道所谓的一切,所以它会很漂亮我很难谷歌吧。



这里是主要问题。

我想要一个按钮打开文件目录所在的位置你可以找到自己的游戏..我很确定我知道如何编码,但让游戏保存到该按钮或应用程序的某个地方将成为问题。



如果你认为这对我来说太难了,因为在我的第三个月的C#OOP中。

我想有一个按钮sc对于安装在我的计算机上的所有.exe并抓取它们(例如通过类似游戏列表之类的列表)并将它们添加到应用程序中,您认为我应该采用什么方法进行此类项目?<非常感谢!

Hey everyone!

So due to my last project idea having some major flaws I decided to make something different.

What I had in mind was creating a game library almost like steam but for personal use, I just dont like the way steam is setup & how you cant add you own games so I would like to create a small little library for my games..

I had the picture in my head how its going to look and functions but I dont know what everything is called so its going to be pretty hard for me to google it.

here is the main issue.
I would like to have a button the open the file directory where you can find your own games.. im pretty sure I know how to code that but making the game save to that button or somewhere on the app is going to be the issue.

And if you think that would be too hard for me since in in my 3rd month of C# OOP.
I would like to have one button that scans for all the .exe installed on my computer and grabbing them (by following some sort of list like a list of games for example) and adding them to the application, what approach do you think I should take for this type of project?

Many thanks!

推荐答案

请勿扫描.EXE的驱动器。你会得到成千上万的,其中只有少数会成为游戏。



用户必须添加自己想要的游戏你提供的机制。可能通过删除一个快捷方式在你的应用程序中的控件上启动游戏?



如果你只是这样做了几个月,这将是Wale over your head。
DO NOT scan the drive for .EXE's. You'll come up with thousands of them and only a few of them are going to be games.

The user will have to add the games they want themselves using some mechanism you provide. Possibly by dropping a shortcut to launch the game on a control in your app?

If you've only been doing this for a few months, this is going to be WAY over your head.


请参阅我对解决方案1的评论。我担心,你真正的问题是你环顾四周,寻找有吸引力的产品并尝试做同样的事情。但是已经创建了相同,因此无需再次创建它。好吧,你可以在一个平台上实现一个想法,并在不同的平台上实现它,这将是有价值的。但是你自己发明一些东西要好得多。更简单,但你的更简单。



这是对初学者的一种常见误解:没有看到周围有数百万个未解决的小问题,你应该认识它们。在我过去的答案中,我提出了一些关于如何开始看到这些问题并将其作为项目的想法:

你能为我的高级项目建议一个话题吗?编程 [ ^ ],

需要项目创意帮助我Plz [ ^ ],

JAVA最后一年项目 [ ^ ],

请为我的.NET项目提出一个好的概念? [ ^ ],

如何提高我的技术能力 [ ^ ]。



很抱歉这些答案中有很多重复点 - 我当时为不同的询问者写了并交叉引用它们。但不要跳过它们:在某些方面,我添加了一些新的想法,例如与同学交谈。



另见我的博客条目:如何为项目获得一个好主题并证明自己? [ ^ ]。



-SA
Please see my comment to Solution 1. I'm afraid, your real problem is that you are looking around, find attractive products and try to do the same. But "the same" is already created, so there is no a need to create it again. Well, you can get an idea implemented only on one platform and implement it on a different platform, that would be valuable. But it's much better to invent something on your own. Something much simpler, but yours.

It's a usual misconception of the beginners: not seeing that there are million of unsolved little problems around, you just should recognize them. In my past answers, I offered some idea on how you can start to see such problems around and make them your projects:
Can you suggest a topic for my Senior Project? Programming[^],
Need Project Ideas Help me Plz[^],
JAVA final year projects[^],
Please suggest a good concept for my .NET project ?[^],
how to improve my technological capability[^].

Sorry for many repeated points in those answers — I wrote then for different inquirers and cross-referenced them. But don't skip them: in some, I added some new ideas, such as talking to your fellow students.

See also my blog entry: How you can get a great topic for a project and prove yourself?[^].

—SA


BladeLogan问:
BladeLogan asked:



嘿,我不确定在哪里抓住你所以我只是在这里问你,我想在c#中创建一个随机字符串,我知道如何为此做代码但是要保存它以记事本为例,我的软件会输出100个随机字符串,然后如果我想将它保存到记事本中,那就是所谓的编程说法我不确定在尝试学习时我会在谷歌上寻找什么那个。


Hey, I'm not sure on where to get a hold of you so I'l just ask you here, I want to create a random string in c#, I know how to do the code for that but to make it save to a notepad, for example.. My software outputs 100 random strings, then if I want it to save to a notepad, what is that called "programaticlly speaking" I'm not sure what I would look for on google when trying to learn that.

没有保存这样的东西在记事本中(这应该是什么意思? :-)

您可以将字符串保存在文本文件中。使用类 System.IO.StreamWriter

StreamWriter Class(System.IO) [ ^ ]。



如果整个文本不是那么大并且适合所有内存,你可以更简单:

File.WriteAllText Method(String,String)(System.IO) [ ^ ],

文件类(System.IO) [ ^ ]。



相比之下,请参阅最后一篇link,对于名为 System.IO.File.ReadAll * 的所有方法,System.IO.File.WriteAll *



-SA

There is no such thing as "save in notepad" (what would it supposed to mean? :-)
You can save string in a text file. Use the class System.IO.StreamWriter:
StreamWriter Class (System.IO)[^].

If the whole text is not so big and fit all in memory, you can do it simpler:
File.WriteAllText Method (String, String) (System.IO)[^],
File Class (System.IO)[^].

For comparison, see the last link, for all the methods named System.IO.File.ReadAll* and System.IO.File.WriteAll*.

—SA


这篇关于在C#.NET Visual-Studio中创建游戏库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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