There certainly can be improvements. The game speed is controlled by a call to pause() with a fixed delay argument on line 336. Although imprecise, the resulting frame-rate is quite independent of the number of keys pressed.
There certainly can be improvements. The game speed is controlled by a call to pause() with a fixed delay argument on line 335. Although imprecise, the resulting frame-rate is quite independent of the number of keys pressed.
yeah. i'm not that familiar with tic/toc. its behavior wasn't intuitive to me when i tried modifying the argument to toc. the only thing i can think of, like you said, is to store the accumulated paused time and then do something like: currentTime=toc(stageStartTime)-pausedTime
Yeah, what happens is that if I pause for any length of time, the game goes super fast for a while. This hyperspeed seems to last longer if the pause break is longer. It's as if the game is trying to 'catch up' to where it would be if I hadn't paused. I'm using MATLAB 7.11.0 (R2010b). I made a recording of my playing and having the pause bug, I'll try to email it to you.
this is great! i must agree with Mingjing that Ryan is over-generous. this is not very polished. one bug i found is that when you pause some stuff seems to keep running because when you unpause some stuff (eg enemy bullets) has moved. judging it on what it claims to be, a demonstration of the potential for sprite-based games, this is quite successful. furthermore, a little bit more working polishing this up would produce a very nice, game.
hey, I just have a small knowledge about matlab (just enough to calculate and plot some shape) but base on your game, i have made a fund game. Link: http://www.mediafire.com/?f7jg9wf3amt3db7. Enjoy.
Control the green rectangle (a plane) by pressing left or right arrow. Press 's' to shoot a bomb (a small circle in the plane).
hey, I just have a small knowledge about matlab (just enough to calculate and plot some shape) but base on your game, i have made a fund game. Link: http://www.mediafire.com/?f7jg9wf3amt3db7. Enjoy.
Control the green rectangle (a plane) by pressing left or right arrow. Press 's' to shoot a bomb (a small circle in the plane).
There certainly can be improvements. The game speed is controlled by a call to pause() with a fixed delay argument on line 336. Although imprecise, the resulting frame-rate is quite independent of the number of keys pressed.
There certainly can be improvements. The game speed is controlled by a call to pause() with a fixed delay argument on line 335. Although imprecise, the resulting frame-rate is quite independent of the number of keys pressed.
Great job. well commented, i must say U ROCK.
but there can be improvements, the logic might have been better if u have used timerfcn, with some fixed period, in that case the speed of game would have been independent of number of keys pressed by the user in each iteration. i hope u will not mind the suggestion.
Comment only