Keeping Moving

之前女朋友闹矛盾,爱上了lol(撸阿鲁),暑假没有撸阿鲁,也玩得很充实很放松,计算下来,我都已经两个月没有打代码了,真的是一时三刻找不回感觉。

开始学习了,之前Direct3D学了一部分,现在发现我在学校搞的一个2dRpg游戏项目,用到的知识DIRECTx2D的一部分,3D的暂时用不上,虽然我知道3D是一种职业优势。

我打算暂时放松对Direct3D的学习,这不代表半途而废,而是我发现了比3D跟重要,这个项目更需要的东西----lua(撸啊),实现游戏引擎中的脚本部分,我很是喜欢,因为lua的价值对我来所甚大,能提升我更多,还有云风http://blog.codingnow.com/这位网易的前辈在lua方面有很多经验分享,我的兴趣更大了。

ALL IN ALL,If u believe you will solve a problem then you will.

 

转载于:https://www.cnblogs.com/Kelvinshere/archive/2012/09/02/2668112.html

Before Playstation, there was Pong, at one time the ultimate in video game entertainment. For those of you not familiar with this game please refer to the Wikipedia entry (http://en.wikipedia.org/wiki/Pong) and the many fine websites extolling the game and its virtues. Pong is not so very different in structure from the Billiard ball simulation that you developed earlier in the course. They both involve a ball moving and colliding with obstacles. The difference in this case is that two of the obstacles are under user control. The goal of this project is to develop your own version of Pong in MATLAB using the keyboard as input, for example, one player could move the left paddle up and down using the q and a keys while the right paddle is controlled with the p and l keys. You may check the code for the Lunarlander game which demonstrates some of the techniques you can use to capture user input. You will also probably find the plot, set, line and text commands useful in your program. You have used most of these before in the billiard simulation and you can use Matlabs online help to get more details on the many options these functions offer. Your program should allow you to play a game to 11 keeping track of score appropriately. The general structure of the code is outlined below in pseudo code While not done Update Ball State (position and velocity) taking into account collisions with walls and paddles Check for scoring and handle appropriately Update Display Note that in this case it is implicitly assumed that capturing the user input and moving the paddles is being handled with callback functions which removes that functionality from the main loop. For extra credit you could consider adding extra features like spin or gravity to the ball flight or providing a single player mode where the computer controls one of the paddles.
05-30
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值