javascript-racer-master

所属分类:游戏
开发工具:JavaScript
文件大小:8460KB
下载次数:5
上传日期:2014-05-05 14:02:14
上 传 者wxiaoyonga
说明:  3d 赛车游戏 javascript 游戏引擎
(3d raceing game)

文件列表:
common.css (2222, 2013-01-31)
common.js (17714, 2014-05-04)
images\background\background.svg (81679, 2013-01-31)
images\background\hills.png (10917, 2013-01-31)
images\background\sky.png (14005, 2013-01-31)
images\background\trees.png (15953, 2013-01-31)
images\background.js (168, 2013-01-31)
images\background.png (61772, 2013-01-31)
images\mute.png (2111, 2013-01-31)
images\sprites\billboard01.png (1873, 2013-01-31)
images\sprites\billboard02.png (3237, 2013-01-31)
images\sprites\billboard03.png (2280, 2013-01-31)
images\sprites\billboard04.png (1469, 2013-01-31)
images\sprites\billboard05.png (2158, 2013-01-31)
images\sprites\billboard06.png (15736, 2013-01-31)
images\sprites\billboard07.png (31177, 2013-01-31)
images\sprites\billboard08.png (34294, 2013-01-31)
images\sprites\billboard09.png (33356, 2013-01-31)
images\sprites\boulder1.png (2454, 2013-01-31)
images\sprites\boulder2.png (2558, 2013-01-31)
images\sprites\boulder3.png (3770, 2013-01-31)
images\sprites\bush1.png (2455, 2013-01-31)
images\sprites\bush2.png (2755, 2013-01-31)
images\sprites\cactus.png (1783, 2013-01-31)
images\sprites\car01.png (647, 2013-01-31)
images\sprites\car02.png (908, 2013-01-31)
images\sprites\car03.png (752, 2013-01-31)
images\sprites\car04.png (790, 2013-01-31)
images\sprites\column.png (4549, 2013-01-31)
images\sprites\dead_tree1.png (1890, 2013-01-31)
images\sprites\dead_tree2.png (1561, 2013-01-31)
images\sprites\palm_tree.png (4422, 2013-01-31)
images\sprites\player_left.png (745, 2013-01-31)
images\sprites\player_right.png (742, 2013-01-31)
images\sprites\player_straight.png (762, 2013-01-31)
images\sprites\player_uphill_left.png (751, 2013-01-31)
images\sprites\player_uphill_right.png (786, 2013-01-31)
images\sprites\player_uphill_straight.png (758, 2013-01-31)
images\sprites\semi.png (4462, 2013-01-31)
images\sprites\stump.png (1278, 2013-01-31)
... ...

Javascript Pseudo 3D Racer ========================== An Outrun-style pseudo-3d racing game in HTML5 and Javascript * [play the game](http://codeincomplete.com/projects/racer/v4.final.html) * view the [source](https://github.com/jakesgordon/javascript-racer) * read about [how it works](http://codeincomplete.com/posts/2012/6/22/javascript_racer/) Incrementally built up in 4 parts: * play the [straight road demo](http://codeincomplete.com/projects/racer/v1.straight.html) * play the [curves demo](http://codeincomplete.com/projects/racer/v2.curves.html) * play the [hills demo](http://codeincomplete.com/projects/racer/v3.hills.html) * play the [final version](http://codeincomplete.com/projects/racer/v4.final.html) With detailed descriptions of how each part works: * read more about [v1 - straight roads](http://codeincomplete.com/posts/2012/6/23/javascript_racer_v1_straight) * read more about [v2 - curves](http://codeincomplete.com/posts/2012/6/24/javascript_racer_v2_curves/) * read more about [v3 - hills](http://codeincomplete.com/posts/2012/6/26/javascript_racer_v3_hills/) * read more about v4 - final (coming soon) A note on performance ===================== The performance of this game is **very** machine/browser dependent. It works quite well in modern browsers, especially those with GPU canvas acceleration, but a bad graphics driver can kill it stone dead. So your mileage may vary. There are controls provided to change the rendering resolution and the draw distance to scale to fit your machine. Currently supported browsers include: * Firefox (v12+) works great, 60fps at high res - Nice! * Chrome (v19+) works great, 60fps at high res... provided you dont have a bad GPU driver * IE9 - ok, 30fps at medium res... not great, but at least it works The current state of mobile browser performance is pretty dismal. Dont expect this to be playable on any mobile device. >> _NOTE: I havent actually spent anytime optimizing for performance yet. So it might be possible to make it play well on older browsers, but that's not really what this project is about._ A note on code structure ======================== This project happens to be implemented in javascript (because its easy for prototyping) but is not intended to demonstrate javascript techniques or best practices. In fact, in order to keep it simple to understand it embeds the javascript for each example directly in the HTML page (horror!) and, even worse, uses global variables and functions (OMG!). If I was building a real game I would have much more structure and organization to the code, but since its just a racing game tech demo, I have elected to [KISS](http://en.wikipedia.org/wiki/KISS_principle). FUTURE ====== It's quite astounding what it takes to actually [finish](http://codeincomplete.com/posts/2011/9/21/defining_finished/) a game, even a simple one. And this is not a project that I plan on polishing into a finished state. It should really be considered just how to get started with a pseudo-3d racing game. If we were to try to turn it into a real game we would have to consider: * car sound fx * better synchronized music * full screen mode * HUD fx (flash on fastest lap, confetti, color coded speedometer, etc) * more accurate sprite collision * better car AI (steering, braking etc) * an actual crash when colliding at high speed * more bounce when car is off road * screen shake when off-road or collision * throw up dirt particles when off road * more dynamic camera (lower at faster speed, swoop over hills etc) * automatic resolution & drawDistance detection * projection based curves ? x,y rotation * sub-pixel aliasing artifacts on curves * smarter fog to cover sprites (blue against sky, cover sprites) * multiple stages, different maps * a lap map, with current position indicator * road splits and joins * day/night cycle * weather effects * tunnels, bridges, clouds, walls, buildings * city, desert, ocean * add city of seattle and space needle to background * 'bad guys' - add some competetor drivers to race against as well as the 'traffic' * different game modes - fastest lap, 1-on-1 racing, collect coins ? shoot bad guys ? * a whole lot of gameplay tuning * ... * ... Related Links ============= * [Lou's Pseudo-3d Page](http://www.gorenfeld.net/lou/pseudo/) - high level how-to guide * [Racer 10k](http://10k.aneventapart.com/1/Entry/1***) - another javascript racing game License ======= [MIT](http://en.wikipedia.org/wiki/MIT_License) license. >> NOTE: the music tracks included in this project are royalty free resources paid for and licensed from [Lucky Lion Studios](http://luckylionstudios.com/). They are licensed ONLY for use in this project and should not be reproduced. >> NOTE: the sprite graphics are placeholder graphics [borrowed](http://pixel.garoux.net/game/44) from the old genesis version of outrun and used here as teaching examples. If there are any pixel artists out there who want to provide original art to turn this into a real game please get in touch!

近期下载者

相关文件


收藏者