游戏简介
本游戏是基于Processing的一款融入了动画技术的交互应用,游戏操作简单,界面简洁直观,易上手,可玩性高。
创意来源
游戏思路是来源于是一个检测飞行员反应能力的小游戏,但是其模式单一,目的知识检测反应能力。所以在此之上,我想制作一个游戏既能够提高反应能力,又能够加入自己的想法实现一些创作;即使当游戏结束时也能在游戏中看到自己创作的乐趣。
玩法介绍
当玩家点击开始界面的小圆球时即开始游戏,首先,你得保证自己的小球不会越出界限,并不会被敌人追上;其次敌人会留下色彩的痕迹,你可以在躲避之余进行创作。
游戏演示效果
游戏动图
主要技术说明
- 主函数
主函数:建立画布,布置初始画面和一些其他情况的画面,创建玩家与敌人,增加死亡和开始游戏的判定,确定暂停,死亡等多种情况。
主函数源代码
void setup() {
size(800, 800);
a = new player();
v = new Vehicle(width/2, height/2);
ps = new ParticleSystem(new PVector(-500,-500),5);
frameRate(100);
}
void draw() {
background(255);
PVector mouse = new PVector(mouseX, mouseY);
a.drag();
a.hover(mouseX,mouseY);
a.display();
// Draw an ellipse at the mouse position
stroke(175);
noFill();
rectMode(CENTER);
rect(width/2, height/2, width-d*2, height-d*2);
ps.origin.set(mouseX,mouseY,0);
ps.addParticle(5);
if(v.isdie==true){
textSize(100);
text(t, width/2, height/2);
}
// Call the appropriate steering behaviors for our agents
if(!mousePressed)
{
if(v.isdie==false){
if(isfirst==true){
v.display();
textSize(15);
text("click the circle to begin", width/2-80, height/2+350);
textSize(80);
text("survive?", width/2-300, height/2-250);
text("create?", width/2+50, height/2-50);
text("or", width/2-50, height/2-150);
}
if(isfirst==false){
textSize(20);
v.display();
text("click the circle to continue", width/2, height/2+350);}
}
if(v.isdie==true){
v.display();
textSize(30);
text("Restart the game", width/2, height/2+350);}
}
if(mousePressed)
{
v.seek(mouse);
v.arrive(mouse);
v.update();
v.displ