资源简介
matlab做的游戏,里面有4个游戏,分别为,飞飞鸟,特权行动,超级马里奥,星之永叹,带源码,能运行,

代码片段和文件信息
function flappybird
%% System Variables:
GameVer = ‘1.01‘; %
%% Constant Definitions:
GAME.MAX_frame_SKIP = [];
GAME.RESOLUTION = []; % Game Resolution default at [256 144]
GAME.WINDOW_SCALE = 2; % The actual size of the window divided by resolution
GAME.FLOOR_TOP_Y = []; % The y position of upper crust of the floor.
GAME.N_UPDATES_PER_SEC = [];
GAME.frame_DURATION = [];
GAME.GRAVITY = 0.1356; %0.15; %0.2; %1356;
TUBE.MIN_HEIGHT = []; % The minimum height of a tube
TUBE.RANGE_HEIGHT = []; % The range of the height of a tube
TUBE.SUM_HEIGHT = []; % The summed height of the upper and low tube
TUBE.H_SPACE = []; % Horizontal spacing between two tubs
TUBE.V_SPACE = []; % Vertical spacing between two tubs
TUBE.WIDTH = []; % The ‘actual‘ width of the detection box
GAMEPLAY.RIGHT_X_FIRST_TUBE = []; % Xcoord of the right edge of the 1st tube
ShowFPS = true;
SHOWFPS_frameS = 5;
%% Handles
MainFigureHdl = [];
MainAxesHdl = [];
MainCanvasHdl = [];
BirdSpriteHdl = [];
TubeSpriteHdl = [];
BeginInfoHdl = [];
FloorSpriteHdl = [];
ScoreInfoHdl = [];
GameOverHdl = [];
FloorAxesHdl = [];
%% Game Parameters
MainFigureInitPos = [];
MainFigureSize = [];
MainAxesInitPos = []; % The initial position of the axes IN the figure
MainAxesSize = [];
InGameParams.CurrentBkg = 1;
InGameParams.CurrentBird = 1;
Flags.IsGameStarted = true; %
Flags.IsFirstTubeAdded = false; % Has the first tube been added to Tubelayer
Flags.ResetFloorTexture = true; % Result the pointer for the floor texture
Flags.PreGame = true;
Flags.NextTubeReady = true;
CloseReq = false;
FlyKeyNames = {‘space‘ ‘return‘ ‘uparrow‘ ‘w‘};
FlyKeyStatus = false; %(size(FlyKeyNames));
FlyKeyValid = true(size(FlyKeyNames)); %
%% Canvases:
MainCanvas = [];
% The scroll layer for the tubes
Tubelayer.Alpha = [];
Tubelayer.CData = [];
%% RESOURCES:
Sprites = [];
%% Positions:
Bird.COLLIDE_MASK = [];
Bird.INIT_SCREEN_POS = [45 100]; % In [x y] order;
Bird.WorldX = [];
Bird.ScreenPos = [45 100]; %[45 100]; % Center = The 9th element horizontally (1based)
% And the 6th element vertically
Bird.SpeedXY = [ 0];
Bird.Angle = 0;
Bird.XGRID = [];
Bird.YGRID = [];
Bird.Curframe = 1;
Bird.SpeedY = 0;
Bird.LastHeight = 0;
SinYRange = 44;
SinYPos = [];
SinY = [];
Score = 0;
Tubes.FrontP = 1; % 1-3
Tubes.ScreenX = [300 380 460]-2; % The middle of each tube
Tubes.VOffset = ceil(rand(13)*105);
Best = 0;
%% -- Game Logic --
initVariables();
initWindow();
if ShowFPS
fps_text_handle = text(1010 ‘FPS:60.0‘ ‘Visible‘ ‘off‘);
var_text_handle = text(1020 ‘‘ ‘Visible‘ ‘off‘); % Display a variable
total_frame_update = 0;
end
% Show flash screen
CurrentframeNo = double(0);
fade_time = cumsum([1 3 1]);
pause(0.5);
logo_stl = text(72 10
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2014-06-13 18:21 matlab游戏\
目录 0 2014-06-13 18:21 matlab游戏\flappybird\
文件 69423 2014-03-12 15:20 matlab游戏\flappybird\Flappy Bird.mlappinstall
文件 20459 2014-03-12 15:20 matlab游戏\flappybird\flappybird.m
文件 129750 2014-06-13 17:09 matlab游戏\flappybird\flappybird.zip
文件 22321 2014-03-12 15:20 matlab游戏\flappybird\Snapshot.png
文件 36469 2014-06-13 17:25 matlab游戏\flappybird\sprites2.mat
文件 2201 2014-06-13 17:31 matlab游戏\flappybird\说明.txt
目录 0 2014-06-13 18:21 matlab游戏\opeig3d\
文件 45316 2013-07-18 18:02 matlab游戏\opeig3d\opeig.m
文件 1434227 2014-06-13 17:30 matlab游戏\opeig3d\opeig3d.zip
文件 537 2013-07-18 18:15 matlab游戏\opeig3d\OPEIG_WAD.mat
文件 781114 2013-07-18 18:15 matlab游戏\opeig3d\OPEIG_WALLS.mat
文件 719492 2013-07-18 18:27 matlab游戏\opeig3d\Operation Eigenfaust 3D Demo.mlappinstall
文件 1157 2013-07-18 17:56 matlab游戏\opeig3d\Readme.txt
文件 27081 2013-07-18 18:21 matlab游戏\opeig3d\Snapshot2.png
文件 1321 2014-06-13 17:38 matlab游戏\opeig3d\说明.txt
目录 0 2014-06-13 18:21 matlab游戏\SuperMarioBrosDemo\
文件 1117 2013-03-24 01:30 matlab游戏\SuperMarioBrosDemo\ITS-A-READ-ME.MARIO.txt
文件 914 2013-03-24 01:30 matlab游戏\SuperMarioBrosDemo\MarioData.mat
文件 1711 2013-03-24 01:30 matlab游戏\SuperMarioBrosDemo\mario_stages.mat
文件 59198 2013-03-24 01:30 matlab游戏\SuperMarioBrosDemo\stl_mario_main.m
文件 24239 2013-03-24 01:30 matlab游戏\SuperMarioBrosDemo\Super Mario Bros. Demo.mlappinstall
文件 39367 2014-06-13 18:13 matlab游戏\SuperMarioBrosDemo\SuperMarioBrosDemo.zip
文件 1314 2014-06-13 18:17 matlab游戏\SuperMarioBrosDemo\说明.txt
目录 0 2014-06-13 18:21 matlab游戏\星之永叹\
目录 0 2014-06-13 18:21 matlab游戏\星之永叹\Stellaria Demo App 1.4.0\
文件 714325 2012-09-25 00:07 matlab游戏\星之永叹\Stellaria Demo App 1.4.0\Stellaria Demo 1.4.0.mlappinstall
文件 711087 2014-06-13 17:58 matlab游戏\星之永叹\Stellaria Demo App 1.4.0\Stellaria Demo App 1.4.0.rar
目录 0 2014-06-13 18:21 matlab游戏\星之永叹\StellariaTechDemoB20120924\
目录 0 2014-06-13 18:21 matlab游戏\星之永叹\StellariaTechDemoB20120924\StellariaTechDemoB20120910\
............此处省略97个文件信息
相关资源
- 高灵敏度GPS接收机MATLAB仿真,附捕获
- 基于MATLAB的质点弹道计算与外弹道优
- 阵列天线的matlab仿真
- MATLAB 经典程序源代码大全
- MATLAB小波软阈值去噪代码33473
- 天线阵的波束形成在MATLAB仿真程序及
- 非线性SVM算法-matlab实现
- 《MATLAB 智能算法超级学习手册》-程序
- 组合导航matlab程序
- 读取txt文件内容matlab代码实现
- Matlab实现基于相关的模板匹配程序
- matlab优化工具箱讲解
- 基于MATLAB的快速傅里叶变换
- 光纤传输中的分布傅立叶算法matlab实
- 基于matlab的图像处理源程序
- matlab 椭圆拟合程序
- 算术编码解码matlab源代码
- optical_flow 光流法 matlab 实现程序
- 引导图像滤波器 Matlab实现
- 分形几何中一些经典图形的Matlab画法
- OFDM系统MATLAB仿真代码
- SVM工具箱(matlab中运行)
- 图像小波变换MatLab源代码
- LU分解的MATLAB实现
- 冈萨雷斯数字图像处理matlab版(第三
- 替代数据法的matlab程序
- 用matlab实现的多站定位系统性能仿真
- 通过不同方法进行粗糙集属性约简m
- k近邻算法matlab实现
- matlab识别系统
评论
共有 条评论