Two Simple Matlab Games
=======================
Overview
--------
Included are two simple videogames that are coded and run using Matlab. I coded these games as a fun side-project with the intention to use them as teaching tool for an undergrad Matlab programming class. Unfortunately, I was not able to finish them on time. Both games use a limited number of Matlab functionalities and are less than 1000 lines long when combined. A second motivation was to test Matlab capabilities to run a videogame that included real time graphics.
Bang Bang!
----------
*Bang Bang!* is a 2-player aim game that puts each player in control of a cannon. The game progresses in turns and the goal is to hit the other player's cannon with a projectile before they hit you. The game includes realistic projectile physics (including wind).
![](https://github.com/JoanAguilar/Matlab-games/blob/master/images/Bangbang.png "Bang Bang! gameplay")
To play the game, run the file *Bangbang.m* using Matlab or Octave. You will first be asked to choose the terrain and wind conditions. From this point, players will take turns to shoot a projectile. The players get to select the initial angle and velocity of the projectile.
*Bang Bang!* was inspired by the 1990 Windows game with the same name. You can play the original [here](http://playdosgamesonline.com/bang-bang.html).
Lander
------
*Lander* is a 2D Moon landing simulation single player game. The goal consists of landing the Moon lander safely using a limited amount of fuel. In order to land safely, the vertical and horizontal velocities, the terrain angle, and the lander angle, all need to be less than a certain threshold. The user has control of the main thruster and the RCS thrusters (to control orientation). The game includes realistic physics with the lander modeled after the Apollo missions Moon lander.
![](https://github.com/JoanAguilar/Matlab-games/blob/master/images/Lander.png "Lander gameplay")
To play *Lander* run the file *Lander.m* using Matlab (recommended) or Octave. You will first be asked to select which controls you want to use and the level of difficulty. Use the controls you selected to land the Moon lander safely on the Moon.
*Lander* was inspired by the 1990 Windows game with the same name. You can play the original [here](https://archive.org/details/win3_LANDER).
matlab代码做游戏-MatlabGames:两个简单的Matlab游戏
5星 · 超过95%的资源 需积分: 50 11 浏览量
2021-05-21
11:31:39
上传
评论 2
收藏 35KB ZIP 举报
weixin_38664532
- 粉丝: 9
- 资源: 945
最新资源
- C库函数参考手册.rar,是chm文件,查询非常方便,带用例,非常详解
- C库函数参考手册.rar,是chm文件,查询非常方便,带用例,非常详解
- 17个STM32F030C8T6例程
- 0.0.0 VScode插件platformIO开发环境的安装[esp32、8266]_̌萌新历险记的博客-CSDN博客.mhtml
- 基于matlab故障级联预测和分析的影响模型的源代码.rar
- 基于matlab实现的Frank-Wolfe算法,交通网络流中交通分配能用上.rar
- Editor下载非常好用的工具
- 基于matlab实现的NALM锁模激光器仿真,非线性环路反射镜锁模获得飞秒激光脉冲.rar
- 基于matlab实现的mimo空时编码STBC,以最大似然值算法做检测.rar
- 基于matlab实现的交通分配的GUI程序代码.rar
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
评论5