优化我的游戏应用程序. [英] Optimizing My Game App.

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

问题描述

我想创建一个游戏,西洋双陆棋.

我用Photoshop设计螺母和纸板.
我将游戏中的每个坚果保存为.png,将板保存为.jpg,创建了一个图片框,然后将.png图片绑定到该图片框.

我知道这种方式是不正确的.

请给我提示和准则.

我要替换哪些元素而不是图片框,以及如何移动螺母以获得最佳性能和内存使用方式.

我将板子放在面板中,面板的Dock填入了表单,但我知道将30个图片框放入表单并移动它们是不正确的.

我的游戏是2d.

我的挑战是保持和移动螺母.
有什么比使用图片框更好的方法?

I want to create a game, Backgammon.

I used Photoshop design my nuts and board.
I saved nut as .png and board as .jpg for each that I have in game I created a picture box and I bound .png picture to that.

I know that this way is not correct.

Please give me tips and guidelines.

What element do I replace instead of pictureboxes and what is the way for moving nuts for the best performance and memory usage.

I put my board in a panel and panel''s Dock is fill in my form but I know it''s not correct to put 30 picture boxes in form and moving them.

My game is 2d.

My challenge is to keeping nuts and moving them.
What is a better way than using pictureboxes?

推荐答案

为什么您需要比图片框更好的东西?另外,如果您要制作图形密集型游戏,我建议您使用XNA.对于这种类型的软件,使用Windows Forms并不是很好. WPF是您可能会考虑的另一种选择.它具有出色的图形支持.如果您不想使用XNA或WPF,则可以通过重写OnPaint方法自己绘制元素.
Why do you need something better than a picturebox? Also, I recommend you use XNA if you''re making a graphics intensive game. Using Windows Forms isn''t really that great for this type of software. WPF is another option you might consider. It has excellent graphics support. If you don''t want to use XNA or WPF, you can paint the elements yourself by overriding the OnPaint method.


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

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