创造一个字工厂游戏 [英] creating a word factory game

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

问题描述

这里的任何人都可以帮助我创建一个''字工厂游戏''我决定用C#创建它但是C#会给游戏带来最好的效果吗?任何人都可以提供一些代码来启动吗?



字工厂游戏是某种方式像拼字游戏但不同的是在这个游戏中有一个计时器,它需要动摇在其上有一个字母的立方体然后玩家需要在那些动摇的字母立方体上做出文字,它就像一个文字扭曲游戏。



一个图像for word factory real game

http://gerilen.files.wordpress.com /2012/03/125.jpg [ ^ ]





如果有任何软件比c#更容易创建这个游戏什么会是吗?那它的数据库怎么样?



感谢任何能回答这个愚蠢问题的人。哈哈哈我对某些事情真的很无辜。 XDD

is any body here can help me on how to create a ''word factory game'' I decided to create it on C# but will C# gives the best out of the game? can anyone provide some codes to start?

word factory game is somehow to be like scrabble game but the difference is in this game has a timer and it needs to shake the cube that has a letter on it then the player needs to make out words on that shaken cubes of letters, it''s like a text twist game.

an image for word factory real game
http://gerilen.files.wordpress.com/2012/03/125.jpg[^]


if there''s any software that is much easier than to c# to create this game what will it be? then how about for its database.

thanks for anyone who will answer this stupidity-like question. hahaha i''m really innocent for some things. XDD

推荐答案

你可以从这里得到一个粗略的想法..





a roughly idea you can get from here..


namespace WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
        const int GridHeight = 8;
        const int GridWidth = 8;
        string[,] GameGrid = new string[GridHeight, GridWidth];
        public Form1()
        {
            //need a text box and a button
            InitializeComponent();
            textBox1.Height = 200;
            textBox1.Width = 200;
            textBox1.Multiline = true;
        }




        private void button2_Click(object sender, EventArgs e)
        {

            ShuffleGrid();
            printGrid();
        }

        private void printGrid() {
            textBox1.Text = "";

            for (int ar1 = 0; ar1 < GridHeight; ar1++)
            {
                for (int ar2 = 0; ar2 < GridWidth; ar2++)
                {



                    textBox1.Text += GameGrid[ar1, ar2];

                }
                textBox1.Text += Environment.NewLine;

            }

        }
        private void ShuffleGrid() {
            textBox1.Text = "";
            Random r = new Random();
            for (int ar1 = 0; ar1 < GridHeight; ar1++)
            {
                for (int ar2 = 0; ar2 < GridWidth; ar2++)
                {
                    int i =r.Next(65, 93);
                    GameGrid[ar1, ar2] =  ((char)(i)).ToString();
                }
            }
        }

    }
}


这篇关于创造一个字工厂游戏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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