游戏开发论坛

 找回密码
 立即注册
搜索
查看: 8711|回复: 27

迷茫的十子路口~不知道何去何丛

[复制链接]

6

主题

22

帖子

22

积分

注册会员

Rank: 2

积分
22
QQ
发表于 2007-6-1 15:16:00 | 显示全部楼层 |阅读模式
  大家好。我是一个游戏程序员初学者,同时也是北大青鸟第二学期的学员。
  
  我从小就很喜欢游戏,虽然那时候只知道去玩。到了初中就开始在想为什么按前,游戏里的人物就会向前走这之类的问题~接着慢慢的想自己做游戏,于是进入了漫长而曲折的弯路。初中由于成绩差~高中上了职高,学计算机网络(硬件),这个时候才开始真正的接触电脑,慢慢的发现和游戏没什么关系,于是晚上就参加培训班学Photoshop只类的绘图,那时候游戏看上去认为也就是图片而已。接着学3DMAX,觉得以为这个能做三维只类的游戏,那时高中几乎是在学校混的。学校让成绩差的不能参加考试,只要参加了考试就拿不到毕业证的~于是高二完了之后看见报纸上的蓝天学院有视觉传达专业。学的都是影视的~那时候以为这个可以入游戏行业,学到一半才知道,又一次选错了专业,慢慢的开始有些失望了。。。
  
  大专毕业后,父母要我去了一家小的广告公司应聘,很顺利的就通过了,他们说我想来的话明天就能来上班,但第二天我还是没去,我怕如果去做广告的话以后也许就永远不能从事游戏开发的工作了。过了几天。去新大地的四方软件看到一个游戏《恋爱游戏制作大师》(其实是软件),当时就毫不忧郁的买下了,回去之后研究了一个星期,自己也能做AVG游戏了,当时兴奋的几乎晚上都睡不着。但那个软件似乎并不让人满意,做了实验品那去给同学试试,莫名其妙的打不开,当时挺郁闷的。慢慢的在网上发现了一个叫幻想森林的论坛。里面介绍了一个Nscripter的游戏引擎,在CountD(斑竹)的帮助下。很快的就掌握了这个游戏引擎,而且非常的棒(和恋爱游戏制作大师相比)。但这个似乎也只能做AVG,3D游戏的话。。。

  慢慢的知道了C、C++,JAVA这些编程语言,于是在网上找资料,终于知道了是用这些来做游戏的,但听说学编程需要很好的英语和数学,而我高中大专几乎都没接触这些,现在和没学过的人区别不大。但自己又很想做这行,突然想起了这里有个学程序的北大青鸟,于是下定了决心~数学英语不好可以在学,当时第一学期去读的时候还是插班生~一去刚好在上C语言,那时候非常努力的在学,C语言考了98分和班长并列全班第一。发现英语和数学并不那么重要,后来第一学期最后的JAVA,当自己能建立第一个窗体的时候~我在次激动的一晚没睡。因为之前做的AVG游戏也是这样窗体里显示的,三个月过去了~第一学期结束后感觉很好,重要的是学了C和OOP的知识,第二学期开始了一个月不到就放假过年,那时候在网上找了些资料,终于比较清楚的知道C\C++用来开发游戏最好。学校里学的C是基础,假期就去买了谭浩强的C语言书和C++书,一个月里把这两本书都看完了,觉得又充实了不少。学了C++之后觉得第二学期的C#非常容易。

  同学去书店买书的时候,他看到了一本叫《3D游戏编程大师技巧》的书,买来后刚开始看的很费劲,花了很长时间才看完了第三章,那之后终于知道一个WINDOWS的程序是怎么运行的,通过消息循环,并且也知道游戏的结构了,但还有很多知识不知道,比如COM、DLL等。于是跑到新华书店去看书,看的饭都忘了吃,直到晚上9点关门我才走的,后来大专里的一个同学把GameRes的这个网站告诉了我(他在深圳的游戏公司做建模),之后终于确定了自己的目标C,DirectX ,WIN32~。当看第四章的时候....我终于知道数学对游戏编程的重要性了,那章几乎是看不懂。。跑去问在自考的同学接了套高等数学。。看起来也费劲,不过还好能看懂。

  这个时候学校的C#也学完了,老师要我们做个打字游戏。要求用控件和线程做,而我的是根据那本游戏书上的例子,字是自己用Graphics画的。完成之后感觉不错,算是自己做的第一个小游戏吧,后来学JSP,B/S架构的程序我完全不感兴趣。。在加上JSP里还有我最讨厌的HTML。。慢慢的开始对学校的课程产生了厌学的情绪,但不学又觉得对不起父母(学费不便宜)。慢慢的压力也越来越大,弄的家里的游戏编程书也没心思看了。现在第二学期快结束了,问了下第二学年的课程。结果几乎都是WEB企业集的开发。和游戏开发一点帮助都没有。。

  现在我又一次陷入了迷茫中。目前只有两个选择,继续读下去(第二学年最后一学期,学费要10000多)。还有就是想在家里专心自学关于游戏开发的,而且如果确定了学游戏开发的话,打算去补英语和数学,这两个现在才知道多重要(这方面的资料几乎都是英文的)。但我也知道游戏编程对于我来说还需要走很长的路,我现在也已经20岁了(87年的)。

  希望大家能指点一下我。谢谢。

  以下是那个C#打字游戏的代码

AppMain.cs

using System;

namespace Curriculum_8__1
{
public class AppMain
{
static void Main()
{
System.Windows.Forms.Application.Run(new MainForm());
}
}
}

GameSystem.cs

using System;
using System.Windows.Forms;
using System.Drawing;
using System.Threading;

namespace Curriculum_8__1
{
public class GameSystem
{
private MainForm m;
private const int airshipCount=12;
private const int in_Phase=1000/60;

private enum MES{WM_CREATE,WM_STRAT,WM_QUIT};
private MES mes=MES.WM_STRAT;

private static Image tempI=new Bitmap(640,480);
private static Graphics temp=Graphics.FromImage(tempI);

private Airship[] air=new Airship[airshipCount];

public GameSystem(MainForm m)
{       
this.m=m;
m.timeIn_Phase.Enabled=true;
m.timeIn_Phase.Interval=in_Phase;
m.KeyPress+=new KeyPressEventHandler(m_KeyPress);
m.timeIn_Phase.Tick+=new EventHandler(timeIn_Phase_Tick);
for (int i=0;i<airshipCount;i++)
{
air=new Airship(DateTime.Now.Millisecond/(i+4));
}
}

public void gameMain(Graphics grap)
{
switch(mes)
{
case MES.WM_CREATE:
break;
case MES.WM_STRAT:
gameStart(grap);
break;
case MES.WM_QUIT:
break;
default:
break;
}
}

private void gameStart(Graphics grap)
{
for (int i=0;i<airshipCount;i++)
{
air.romanceAirship(temp);
}
grap.DrawImage(tempI,0,0);
}

private void m_KeyPress(object sender, KeyPressEventArgs e)
{
for (int i=0;i<airshipCount;i++)
{
if (e.KeyChar==air.Fonts[0])
{
air.stateKey=true;
}
}
}

private void timeIn_Phase_Tick(object sender, EventArgs e)
{
gameMain(m.CreateGraphics());
}
}
}

MainForm.cs

using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Threading;

namespace Curriculum_8__1
{
public class MainForm : System.Windows.Forms.Form
{
private System.ComponentModel.IContainer components;
public System.Windows.Forms.Timer timeIn_Phase;
private GameSystem game;

public MainForm()
{
InitializeComponent();
game=new GameSystem(this);
}

protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}

#region Windows 窗体设计器生成的代码

private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.timeIn_Phase = new System.Windows.Forms.Timer(this.components);
//
// MainForm
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.BackColor = System.Drawing.Color.Black;
this.ClientSize = new System.Drawing.Size(640, 480);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.KeyPreview = true;
this.MaximizeBox = false;
this.Name = "MainForm";
this.Text = "打字游戏";

}

#endregion
}
}

Airship.cs

using System;
using System.Windows.Forms;
using System.Drawing;

namespace Curriculum_8__1
{
public class Airship
{

private struct Point
{
public int x,y;
}

private struct Line
{
public int vs,ve;
}

private const int pointCount=10;
private const int lineCount=10;
private const int fontX=5;
private const int fontY=4;
private const int blastMaxCount=20;
private Font font=new Font("宋体",10);
private Pen penN=new Pen(Color.Red);
private SolidBrush solidN=new SolidBrush(Color.Red);
private Pen penL=new Pen(Color.Black);
private SolidBrush solidL=new SolidBrush(Color.Black);
private Random ran;
private static string charAll="";

public bool state;
public bool stateKey;
private int speed;
private int airshipX;
private int airshipY;
private string fonts;
private int shotX;
private int shotY;
private int countBlast;
private int[] blastX1;
private int[] blastX2;
private int[] blastY1;
private int[] blastY2;

private Point[] airshipAcme=new Point[pointCount];
private Line[] airshipFrame=new Line[lineCount];

public string Fonts{get{return fonts;}}

private void createAcme()
{
airshipAcme[0].x=0;
airshipAcme[0].y=0;

airshipAcme[1].x=0;
airshipAcme[1].y=10;

airshipAcme[2].x=0;
airshipAcme[2].y=20;

airshipAcme[3].x=2;
airshipAcme[3].y=10;

airshipAcme[4].x=18;
airshipAcme[4].y=10;

airshipAcme[5].x=10;
airshipAcme[5].y=2;

airshipAcme[6].x=10;
airshipAcme[6].y=18;

airshipAcme[7].x=20;
airshipAcme[7].y=0;

airshipAcme[8].x=20;
airshipAcme[8].y=10;

airshipAcme[9].x=20;
airshipAcme[9].y=20;
}

private void createframe()
{

airshipFrame[0].vs=1;
airshipFrame[0].ve=2;

airshipFrame[1].vs=2;
airshipFrame[1].ve=3;

airshipFrame[2].vs=2;
airshipFrame[2].ve=4;

airshipFrame[3].vs=4;
airshipFrame[3].ve=6;

airshipFrame[4].vs=4;
airshipFrame[4].ve=7;

airshipFrame[5].vs=6;
airshipFrame[5].ve=5;

airshipFrame[6].vs=7;
airshipFrame[6].ve=5;

airshipFrame[7].vs=5;
airshipFrame[7].ve=9;

airshipFrame[8].vs=8;
airshipFrame[8].ve=9;

airshipFrame[9].vs=9;
airshipFrame[9].ve=10;
}


private string randFont()
{
string fon=null;
int count=0;
for(;;)
{
if (ran.Next(100)>50)
fon=((char)ran.Next(65,65+25)).ToString();
else
fon=((char)ran.Next(97,97+25)).ToString();
count=0;
for(int i=0;i<charAll.Length;i++)
{
if (fon[0]!=charAll)
count++;
}
if (count==charAll.Length)
break;
}
return fon;
}

public Airship(int rand)
{
ran=new Random(rand);
initAir();
}

private void initAir()
{
createAcme();
createframe();
airshipX=ran.Next(620);
airshipY=ran.Next(-100,0);
shotX=airshipX+7;
shotY=480;
speed=ran.Next(2)+1;
charAll+=(fonts=randFont());
state=true;
stateKey=false;
countBlast=1;
blastX1=new int[blastMaxCount];
blastX2=new int[blastMaxCount];
blastY1=new int[blastMaxCount];
blastY2=new int[blastMaxCount];
}


public void romanceAirship(Graphics grap)
{
if (airshipY<=480 && state)
{
if (!(airshipY<-20))
{
for (int i=0;i<lineCount;i++)
{
grap.DrawLine(penL,
airshipAcme[airshipFrame.vs-1].x+airshipX,
airshipAcme[airshipFrame.vs-1].y+airshipY,
airshipAcme[airshipFrame.ve-1].x+airshipX,
airshipAcme[airshipFrame.ve-1].y+airshipY);
grap.DrawString(fonts,font,solidL,fontX+airshipX,fontY+airshipY);
}

airshipY+=speed;
for (int i=0;i<lineCount;i++)
{
grap.DrawLine(penN,
airshipAcme[airshipFrame.vs-1].x+airshipX,
airshipAcme[airshipFrame.vs-1].y+airshipY,
airshipAcme[airshipFrame.ve-1].x+airshipX,
airshipAcme[airshipFrame.ve-1].y+airshipY);
grap.DrawString(fonts,font,solidN,fontX+airshipX,fontY+airshipY);
}
}
else if (state)
airshipY+=speed;
}
else if (airshipY>480)
{
charAll=charAll.Remove(charAll.IndexOf(fonts),1);
initAir();
}

if (stateKey)
{
if (shotY-10>airshipY+20)
{
grap.DrawLine(penL,3+shotX,0+shotY,0+shotX,3+shotY);
grap.DrawLine(penL,3+shotX,0+shotY,6+shotX,3+shotY);
grap.DrawLine(penL,3+shotX,0+shotY,3+shotX,9+shotY);
shotY-=30;
grap.DrawLine(penN,3+shotX,0+shotY,0+shotX,3+shotY);
grap.DrawLine(penN,3+shotX,0+shotY,6+shotX,3+shotY);
grap.DrawLine(penN,3+shotX,0+shotY,3+shotX,9+shotY);
}
else if (countBlast<=blastMaxCount)
{
state=false;
if (countBlast==1)
{
grap.DrawString(fonts,font,solidL,fontX+airshipX,fontY+airshipY-speed);
grap.DrawLine(penL,3+shotX,0+shotY,0+shotX,3+shotY);
grap.DrawLine(penL,3+shotX,0+shotY,6+shotX,3+shotY);
grap.DrawLine(penL,3+shotX,0+shotY,3+shotX,9+shotY);
}


for (int i=0;i<lineCount && countBlast>1;i++)
{
grap.IntersectClip(new Rectangle(airshipX-5,airshipY-5,28,28));
grap.Clear(Color.Black);
}

for (int i=0;i<lineCount && countBlast<blastMaxCount;i++)
{
Random rand=new Random(DateTime.Now.Millisecond/(i+1));
grap.DrawLine(penN,
airshipAcme[airshipFrame.vs-1].x+airshipX+(blastX1=rand.Next(-3,3)),
airshipAcme[airshipFrame.vs-1].y+airshipY+(blastX2=rand.Next(-3,3)),
airshipAcme[airshipFrame.ve-1].x+airshipX+(blastY1=rand.Next(-3,3)),
airshipAcme[airshipFrame.ve-1].y+airshipY+(blastY2=rand.Next(-3,3)));
}

countBlast++;
}
else
{
charAll=charAll.Remove(charAll.IndexOf(fonts),1);
initAir();
}
}
grap.ResetClip();
}

}
}

8

主题

390

帖子

390

积分

中级会员

Rank: 3Rank: 3

积分
390
发表于 2007-6-1 15:41:00 | 显示全部楼层

Re:迷茫的十子路口~不知道何去何丛

小伙,怎么说呢,一个是坚持理想,边工作边学习,英文和数学很重要,但不是一天2天就可以学完的,建议这俩可以有需要的时候学,比如看到单词不认识赶紧查下记一下,数学不懂了,赶紧查一下学一下,学习是一辈子的事情,赶紧你有点冒进着急。

游戏开发难,不过任何事情都难。但是如果有时间,啥都不用怕,慢慢来,1,2,3年,我想,应该可以解决很多问题了。
//还有哪个啥子培训班,建议不参加,前提是你自己学会自学,找份工作。如果自己一个人闭关修炼,没有工作,不与人交流,那迟早要废掉。。。。还不如去培训班。。。去不去,你自己衡量。
//注:迷茫的人很多。。。。迷茫也是一种生活状态。

6

主题

22

帖子

22

积分

注册会员

Rank: 2

积分
22
QQ
 楼主| 发表于 2007-6-1 15:50:00 | 显示全部楼层

Re: Re:迷茫的十子路口~不知道何去何丛

ReallyBigBug: Re:迷茫的十子路口~不知道何去何丛

小伙,怎么说呢,一个是坚持理想,边工作边学习,英文和数学很重要,但不是一天2天就可以学完的,建议这俩可...

可是目前自学的话,数学成了很严重的障碍~不得不补,英语的话别说教程了,帮助文挡都看不懂。

86

主题

2251

帖子

2386

积分

金牌会员

Rank: 6Rank: 6

积分
2386
QQ
发表于 2007-6-1 15:52:00 | 显示全部楼层

Re:迷茫的十子路口~不知道何去何丛

10000块钱够在家待2年的生活费了,所以还是不要继续参加了,你既然已经入了门,完全可以多买书,多看书,看看社区里说什么,然后自学。

6

主题

22

帖子

22

积分

注册会员

Rank: 2

积分
22
QQ
 楼主| 发表于 2007-6-1 16:01:00 | 显示全部楼层

Re: Re:迷茫的十子路口~不知道何去何丛

funcman: Re:迷茫的十子路口~不知道何去何丛

10000块钱够在家待2年的生活费了,所以还是不要继续参加了,你既然已经入了门,完全可以多买书,多看书,看看社区里说什么,然后自学。

我的想法也是这样~虽然DirectX 还不知道怎么使用~但API我想应该学的很快的~只要把数学和英语问题解决了。我想自学应该没什么难题~C#的绘图类老师也没教~我也是自学的

6

主题

22

帖子

22

积分

注册会员

Rank: 2

积分
22
QQ
 楼主| 发表于 2007-6-1 17:06:00 | 显示全部楼层

Re:迷茫的十子路口~不知道何去何丛

而且我对外面的情况不是很了解。公司需要什么样的人~而且自学的话不知道能不能行..毕竟培养个游戏程序员需要时间的.而且还有来自父母的压力

36

主题

197

帖子

197

积分

注册会员

Rank: 2

积分
197
发表于 2007-6-1 17:34:00 | 显示全部楼层

Re:迷茫的十子路口~不知道何去何丛

做个东西吧,做一个真正的游戏,我当初就是依靠这种冲动,做了一个很初级的程序,进入现在的游戏公司的

8

主题

46

帖子

52

积分

注册会员

Rank: 2

积分
52
发表于 2007-6-1 21:03:00 | 显示全部楼层

Re:迷茫的十子路口~不知道何去何丛

当然自学了。。。而且先去找份能顾上自己的工作,,什么事情都不是一两天能成功的。。想当游戏程序员需要机会,更需要能力,如果害怕困难或者想过安逸的生活,就不要踏足游戏圈了。。先去看看《DOOM启示录》

86

主题

2251

帖子

2386

积分

金牌会员

Rank: 6Rank: 6

积分
2386
QQ
发表于 2007-6-1 22:16:00 | 显示全部楼层

Re:迷茫的十子路口~不知道何去何丛

家人要是对你没工作担忧的话,还是找份工作吧

33

主题

544

帖子

554

积分

高级会员

Rank: 4

积分
554
发表于 2007-6-1 23:29:00 | 显示全部楼层

Re:迷茫的十子路口~不知道何去何丛

哄哄自己的家人吧
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

作品发布|文章投稿|广告合作|关于本站|游戏开发论坛 ( 闽ICP备17032699号-3 )

GMT+8, 2026-1-26 05:43

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表