{{sellerTotalView > 1 ? __("sellers", {number: sellerTotalView}) : __("seller", {number: sellerTotalView}) }}, {{numTotalView > 1 ? __("items", {number: numTotalView}) : __("item", {number: numTotalView}) }}
free FREE

Change Your Zip Code

Inventory information and delivery speeds may vary for different locations.

Location History

{{email ? __('Got it!') : __('Restock Alert')}}

We will notify you by email when the item back in stock.

Cancel
Yami

Jingdong book

Java 2D游戏编程入门

{{buttonTypePin == 3 ? __("Scan to view more PinGo") : __("Scan to start")}}

Java 2D游戏编程入门

{{__(":people-members", {'people': item.limit_people_count})}} {{ itemCurrency }}{{ item.valid_price }} {{ itemCurrency }}{{ item.invalid_price }} {{ itemDiscount }}
Ends in
{{ itemCurrency }}{{ item.valid_price }}
{{ itemCurrency }}{{ priceFormat(item.valid_price / item.bundle_specification) }}/{{ item.unit }}
{{ itemDiscount }}
{{ itemCurrency }}{{ item.valid_price }} {{ itemCurrency }}{{ priceFormat(item.valid_price / item.bundle_specification) }}/{{ item.unit }} {{ itemCurrency }}{{ item.invalid_price }} {{itemDiscount}}
{{ itemCurrency }}{{ item.valid_price }}
Sale ends in
Sale will starts after Sale ends in
{{ getSeckillDesc(item.seckill_data) }}
{{ __( "Pay with Gift Card to get sale price: :itemCurrency:price", { 'itemCurrency' : itemCurrency, 'price' : (item.giftcard_price ? priceFormat(item.giftcard_price) : '0.00') } ) }} ({{ itemCurrency }}{{ priceFormat(item.giftcard_price / item.bundle_specification) }}/{{ item.unit }}) Details
Best before

Currently unavailable.

We don't know when or if this item will be back in stock.

Unavailable in your area.
Sold Out

Details

Full product details
Content Description

学习2D游戏开发基础,是快速积累游戏开发经验的关键。理解了2D环境的要素,将能够为游戏开发打下坚实的基础。
本书讲解使用Java进行2D游戏开发的基础知识和基本技能。本书共18章,分为基础知识、提高技能和完整游戏3个部分,详细介绍应用编程、全屏游戏、输入处理、矩阵变换、基础物理、相交测试、碰撞检测等知识点和技能,最后采用介绍的所有概念,从头到尾开发了一款完整的游戏。
本书适合游戏开发的初学者阅读,尤其适合想要学习2D游戏编程基础的任何人。本书假设读者理解核心编程概念、面向对象软件以及Java编程语言,但不需要读者具备任何游戏编程的知识。
Author Description

Timothy M. Wright是一名软件工程师,正在开发下一个美妙的独立游戏。最近10年,他都在公司的研发部门工作。此前,他是一位专业的音乐家。他获得了软件工程的学士学位,并且从事了很多年的研究和开发工作。他编写Java代码有10年以上的时间,并且之前在gamedev.net上发布了教程。在不开发游戏的时候,他喜欢钢琴爵士乐、打扑克、烹饪和酿造啤酒。
Catalogue

目录

第一部分 基础知识 1
第1章Hello World 1
1.1使用FrameRate类 1
1.2创建Hello World应用程序 2
1.3使用主动渲染 4
1.4创建定制的渲染线程 6
1.5创建一个主动渲染的窗口 9
1.6修改显示模式 11
1.7全屏显示模式中的主动渲染 15
1.8资源和延伸阅读 18
第2章 18
2.1处理键盘输入 19
2.2键盘改进 23
2.3处理鼠标输入 25
2.4相对鼠标移动 33
2.5资源和延伸阅读 41
第3章变换 41
3.1使用Vector2f类 42
3.2使用极坐标 50
3.3理解点和向量 55
3.4使用矩阵变换 57
3.5行主序矩阵和列主序矩阵 58
3.6理解Matrix3x3f类 59
3.7仿射变换 70
3.8资料和延伸阅读 72
第4章 时间和空间 72
4.1计算时间增量 72
4.2屏幕映射 78
4.3调整视口高宽比 84
4.4大炮实例 90
4.6资料和延伸阅读 96
第5章 简单游戏框架 96
5.1屏幕到世界的转换 96
5.2理解简单框架 98
5.3使用简单框架模板 104
5.4资源和延伸阅读 106
第6章Vector2f更新 106
6.1 inv( ) 106
6.2add( ) 107
6.3sub( ) 107
6.4mul( ) 107
6.5div( ) 108
6.6len( )和lenSqr( ) 108
6.7norm( ) 108
6.8perp( ) 109
6.9dot( ) 109
6.10angle( ) 110
6.11polar( ) 110
6.12toString( ) 110
6.12资源和延伸阅读 113
第7章 相交测试 113
7.1多边形中的点的测试 113
7.1.1多边形特例中的点 115
7.1.2多边形示例中的点 116
7.2使用轴对齐边界框进行相交测试 120
7.3使用圆形测试相交 121
圆和AABB的重合 122
7.4使用分隔轴方法 129
7.5使用线段-线段的重叠方法 130
7.6使用矩形-矩形的重叠方法 133
7.7优化测试 137
7.8资源和延伸阅读 137
第8章 游戏原型 138
8.1创建一个多边形包装类 138
8.2创建一个原型小行星 145
8.3创建一个原型编辑器 149
8.4用原型小行星工厂生产小行星 153
8.5原型Bullet类 159
8.6原型Ship类 160
8.7编写原型游戏 165
第9章文件和资源 172
9.1理解Java如何处理文件和目录 172
9.2理解输入/输出流 174
9.3创建Resources.jar文件进行测试 179
9.4将资源放到类路径上 181
9.5制作资源加载工具包 184
9.6利用Java属性 186
9.7XML文件概览 191
9.8资源和延伸阅读 199
第10章图像 199
10.1学习Java中的颜色 199
10.2了解不同的图像类型 200
10.3执行颜色插值 205
10.4使用VolatileImage提高速度 209
10.5创建透明图像 213
10.6使用alpha合成的规则 215
10.7绘制精灵 222
10.8探索不同的缩放算法 231
10.9资源与延伸阅读 246
第11章文本 246
11.1理解Java字体 247
11.2制作绘制字符串工具 251
11.3使用文本度量进行布局 254
11.4支持线程安全的键盘输入 265
11.5资源和延伸阅读 271
第12章 线程 271
12.1使用线程实现Callable任务 272
12.2使用线程加载文件 274
12.3使用FakeHardware类测试 277
12.4使用等待/通知方法 281
12.5在游戏循环中使用线程 283
12.6使用状态机 291
12.7 OneShotEvent类 292
12.8LoopEvent类 294
12.9RestartEvent类 296
12.10多线程事件示例 299
12.11资源和延伸阅读 301
第13章声音 301
13.1操作声音文件 303
13.2使用声音库的问题 304
13.3开发阻塞音频类 308
13.4用阻塞的Clip类 310
13.5使用AudioDataLine类 314
13.6BlockingDataLine类 320
13.7创建一个SoundEvent类 322
13.8使用OneShotEvent类 324
13.9使用LoopEvent类 325
13.10使用RestartEvent类 326
13.11添加声音控件 331
13.12资源和延伸阅读 339
第14章用ANT进行开发 339
14.1安装ANT软件 340
14.2理解构建脚本的格式 340
14.3学习常见ANT任务 343
14.4构建一个可扩展的构建脚本 345
14.5资源和延伸阅读 350
第15章碰撞检测 351
15.1带碰撞检测的弹球 351
15.2使用直线参数方程 355
15.3查找直线-矩形相交 356
15.4查找圆-直线相交 362
15.5查找直线-直线相交 367
15.6计算一个反射向量 372
15.7在一个多边形中弹回一个点 375
15.8资源和延伸阅读 381
第16章工具 382
16.1创建一个游戏框架 382
16.2更新多边形编辑器 394
16.3绘制精灵 408
16.4创建一个简单的粒子引擎 411
16.5资源和延伸阅读 416
第17章太空火箭 416
17.1 Bullet类 417
17.2PolygonWrapper类 418
17.3Particle类 421
17.4Asteroid类 422
17.5AsteroidFactory类 425
17.6AsteroidExplosion类 428
17.7Ship类 430
17.8ShipFactory类 435
17.9ShipExplosion类 437
17.10添加游戏常量 438
17.11Acme类 439
17.12GameState类 440
17.13Score类 441
17.14QuickLooper类 441
17.15QuickRestart类 443
17.16HighScoreMgr类 445
17.17管理状态 448
17.18StateController类 449
17.19CompleteGame类 450
17.20GameLoading状态 453
17.21AttractState类 458
17.22PressSpaceToPlay模式 461
17.23HighScore状态 461
17.24GameInformationState类 462
17.25LevelStarting状态 463
17.26LevelPlaying状态 464
17.27GameOver状态 470
17.28EnterHighScoreName状态 471
17.29创建构建脚本 476
17.30资源和延伸阅读 477
第18章结论 477
资源和延伸阅读 482

Specifications

Brand Jingdong book
Brand Origin China

Disclaimer

Product packaging, specifications and price are subject to change without notice. All information about the products on our website is provided for information purposes only. Please always read labels, warnings and directions provided with the product before use.

View Full Terms of Use
Add to favorites
{{ $isZh ? coupon.coupon_name_sub : coupon.coupon_ename_sub | formatCurrency }}
{{__("Buy Directly")}} {{ itemCurrency }}{{ item.directly_price }}
Quantity
{{ quantity }}
{{ instockMsg }}
{{ limitText }}
{{buttonTypePin == 3 ? __("Scan to view more PinGo") : __("Scan to start")}}
Sold by JD@CHINA
Ship to
{{ __("Ship to United States only") }}
Free shipping over 69
Genuine guarantee

Added to Cart

Keep Shopping

More to Consider

{{ item.brand_name }}

{{ item.item_name }}

{{ item.currency }}{{ item.market_price }}

{{ item.currency }}{{ item.unit_price }}

{{ item.currency }}{{ item.unit_price }}

Coupons

{{ coupon.coupon_name_new | formatCurrency }}
Clip Clipped Over
{{ getCouponDescStr(coupon) }}
{{ coupon.use_time_desc }}
Expires soon {{ formatTime(coupon.use_end_time) }}

Share this item with friends

Cancel

Yami Gift Card

Get this exclusive deal when paying with gift card

Terms and Conditions

Gift card deals are special offers for selected products;

The gift card deals will automatically be activated if a customer uses gift card balance at check out and the balance is sufficient to pay for the total price of the shopping cart products with gift card deals;

You will not be able to activate the gift card deals if you choose other payment methods besides gift card. The products will be purchased at their normal prices;

If your account balance is not enough to pay for the products with gift card deals, you can choose to reload your gift card balance by clicking on the Reload button at either shopping cart page or check out page;

Products that have gift card deals can be recognized by a special symbol showing 'GC Deal';

For any additional questions or concerns, please contact our customer service;

Yamibuy reserves the right of final interpretation.

Sold by Yami

Service Guarantee

Yami Free Shipping over $49
Yami Easy Returns
Yami Ships from United States

Shipping

  • United States

    Standard Shipping is $5.99 (Excluding Alaska & Hawaii). Free on orders of $49 or more.

    Local Express is $5.99 (Available in Parts of CA, NJ, MA & PA). Free on orders of $49 or more.

    2-Day Express (Includes Alaska & Hawaii) starts at $19.99.

Return Policy

Yami is committed to provide our customers with a peace of mind when purchasing from us. Most items shipped from Yamibuy.com can be returned within 30 days of receipt of shipment (For Food, Beverages, Snacks, Dry Goods, Health supplements, Fresh Grocery and Perishables Goods, within 7 days of receipt of shipment due to damages or quality issues; To ensure that every customer receives safe and high-quality products, we do not provide refunds or returns for beauty products once they have been opened or used, except in the case of quality issues; Some products may have different policies or requirements associated with them, please see below for products under special categories, or contact Yami Customer Service for further assistance).
Thank you for your understanding and support.

Learn More

Sold by Yami

Terms and Conditions of Yami E-Gift Card

If you choose “Redeem automatically” as your delivery method, your gift card balance will be reload automatically after your order has been processed successfully;

If you choose “Send to Email”as your delivery method, the card number and CVV will be sent to the email address automatically;

Any user can use the card number and CVV to redeem the gift card, please keep your gift card information safely. If you have any trouble receiving email, please contact Yami customer service;

Yami gift card can be used to purchase both Yami owned or Marketplace products;

Yami gift card will never expire;

Yami gift card balance does not have to be used up at once;

All rights reserved by Yami.

Return Policy

Gift card that has already been consumed is non-refundable.

Sold by JD@CHINA

Service Guarantee

Yami Free Shipping over $49
Yami Easy Returns
Yami Ships from United States

Shipping

  • United States

    Standard Shipping is $5.99 (Excluding Alaska & Hawaii). Free on orders of $49 or more.

    Local Express is $5.99 (Available in Parts of CA, NJ, MA & PA). Free on orders of $49 or more.

    2-Day Express (Includes Alaska & Hawaii) starts at $19.99.

Return Policy

You may return product within 30 days upon receiving the product. Items returned must be new in it's original packing, including the original invoice for the purchase. Customer return product at their own expense.

Sold by JD@CHINA

Service Guarantee

Yami Cross-store Free Shipping over $69
Yami 30-days Return

Yami-China FC

Yami has a consolidation warehouse in China which collects multiple sellers’ packages and combines to one order. Our Yami consolidation warehouse will directly ship the packages to your door. Cross-store free shipping over $69.

Return Policy

You may return products within 30 days upon receiving the products. Sellers take responsibilities for any wrong shipment or missing items. Packing needs to be unopened for any other than quality issues return. We promise to pack carefully, but because goods are taking long journey to destinations, simple damages to packaging may occur. Any damages not causing internal goods quality problems are not allowed to return. If you open the package and any quality problem is found, please contact customer service within three days after receipt of goods.

Shipping Information

Yami Consolidation Service Shipping Fee $9.99(Free shipping over $69)

Sellers in China will ship their orders within 1-2 business days once the order is placed. Packages are sent to our consolidation warehouse in China and combined there. Our Yami consolidation warehouse will directly ship the packages to you via UPS. The average time for UPS to ship from China to the United States is about 10 working days and it can be traced using the tracking number. Due to the pandemic, the delivery time may be delayed by about 5 days. The package needs to be signed by the guest. If the receipt is not signed, the customer shall bear the risk of loss of the package.

Sold by JD@CHINA

Service Guarantee

Free shipping over 69
Genuine guarantee

Shipping

Yami Consolidated Shipping $9.99(Free shipping over $69)


Seller will ship the orders within 1-2 business days. The logistics time limit is expected to be 7-15 working days. In case of customs clearance, the delivery time will be extended by 3-7 days. The final receipt date is subject to the information of the postal company.

Yami Points information

All items are excluding from any promotion or points events on Yamibuy.com

Return Policy

You may return product within 30 days upon receiving the product. Items returned must be new in it's original packing, including the original invoice for the purchase. Customer return product at their own expense.

Yami

Download the Yami App

Back Top

Recommended for You

About the brand

Jingdong book

为您推荐

Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折
Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折
Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折
Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折
Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折
Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折

Reviews{{'('+ commentList.posts_count + ')'}}

Have your say. Be the first to help other guests.

Write a review
{{ totalRating }} Write a review
  • {{i}} star

    {{i}} stars

    {{ parseInt(commentRatingList[i]) }}%

Yami Yami
{{ comment.user_name }}

{{ showTranslate(comment) }}Show Less

{{ strLimit(comment,800) }}Show more

Show Original

{{ comment.content }}

Yami
Show All

{{ formatTime(comment.in_dtm) }} VERIFIED PURCHASE {{groupData}}

{{ comment.likes_count }} {{ comment.likes_count }} {{ comment.reply_count }} {{comment.in_user==uid ? __('Delete') : __('Report')}}
Yami Yami
{{ comment.user_name }}

{{ showTranslate(comment) }}Show Less

{{ strLimit(comment,800) }}Show more

Show Original

{{ comment.content }}

Yami
Show All

{{ formatTime(comment.in_dtm) }} VERIFIED PURCHASE {{groupData}}

{{ comment.likes_count }} {{ comment.likes_count }} {{ comment.reply_count }} {{comment.in_user==uid ? __('Delete') : __('Report')}}

No related comment~

Review

Yami Yami

{{ showTranslate(commentDetails) }}Show Less

{{ strLimit(commentDetails,800) }}Show more

Show Original

{{ commentDetails.content }}

Yami
Show All

{{ formatTime(commentDetails.in_dtm) }} VERIFIED PURCHASE {{groupData}}

{{ commentDetails.likes_count }} {{ commentDetails.likes_count }} {{ commentDetails.reply_count }} {{commentDetails.in_user==uid ? __('Delete') : __('Report')}}

Please write at least one word

Comments{{'(' + replyList.length + ')'}}

Yami Yami

{{ showTranslate(reply) }}Show Less

{{ strLimit(reply,800) }}Show more

Show Original

{{ reply.reply_content }}

{{ formatTime(reply.reply_in_dtm) }}

{{ reply.reply_likes_count }} {{ reply.reply_likes_count }} {{ reply.reply_reply_count }} {{reply.reply_in_user==uid ? __('Delete') : __('Report')}}

Please write at least one word

Cancel

That’s all the comments so far!

Write a review
How would you rate this item?

Please add your comment.

  • A nice nickname will make your comments more popular!
  • The nickname in your account will be changed to the same as here.
Thanks for your review
Our community rely on great reviews like yours to find the best of Asia.

Report

If you find this content inappropriate and think it should be removed from the Yami.com site, let us know please.

Cancel

Are you sure to delete your review?

Cancel

You’ve Recently Viewed

About the brand

Jingdong book