惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

美团技术团队
T
The Exploit Database - CXSecurity.com
aimingoo的专栏
aimingoo的专栏
小众软件
小众软件
T
Tailwind CSS Blog
V
V2EX
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
WordPress大学
WordPress大学
Hugging Face - Blog
Hugging Face - Blog
IT之家
IT之家
PCI Perspectives
PCI Perspectives
腾讯CDC
酷 壳 – CoolShell
酷 壳 – CoolShell
Recent Commits to openclaw:main
Recent Commits to openclaw:main
大猫的无限游戏
大猫的无限游戏
The Cloudflare Blog
N
News and Events Feed by Topic
博客园 - 三生石上(FineUI控件)
Help Net Security
Help Net Security
雷峰网
雷峰网
有赞技术团队
有赞技术团队
Last Week in AI
Last Week in AI
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
量子位
GbyAI
GbyAI
O
OpenAI News
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
AI
AI
S
Security Affairs
F
Fortinet All Blogs
L
LINUX DO - 最新话题
博客园 - 【当耐特】
Webroot Blog
Webroot Blog
Schneier on Security
Schneier on Security
W
WeLiveSecurity
Security Latest
Security Latest
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
T
Tenable Blog
L
LINUX DO - 热门话题
Google DeepMind News
Google DeepMind News
Simon Willison's Weblog
Simon Willison's Weblog
Cyberwarzone
Cyberwarzone
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
C
CERT Recently Published Vulnerability Notes
Engineering at Meta
Engineering at Meta
P
Palo Alto Networks Blog
博客园 - 叶小钗
T
Threatpost
H
Heimdal Security Blog
Microsoft Security Blog
Microsoft Security Blog

Henri Sivonen’s pages

Parin vuoden tutkimattomuus crates.io: Rust Package Registry Asiakirjatonta toimintaa It’s not wrong that "🤦🏼‍♂️".length == 7 Koulutartuntojen tilastointimenettely Perusteasiakirjoja hallussapitämättä ikärajoitettu Asiantuntijat ja nukkuva vallan vahtikoira Koronapassilausunto Suppealla tietopohjalla ohimeneväksi väitetty Text Encoding Menu in 2021 The Text Encoding Submenu Is Gone An HTML5 Conformance Checker Not Part of the Technology Stack Browser Technology Stack Bogo-XML Declaration Returns to Gecko A Look at Encoding Detection and Encoding Menu Telemetry from Firefox 86 Why Supporting Unlabeled UTF-8 in HTML on the Web Would Be Problematic Rust Target Names Aren’t Passed to LLVM Toimintamalli Activating Browser Modes with Doctype Johtopäätöksiä mallin rakenteesta Tehtävänmäärittelyä kirjoittamatta ja kuolemia laskematta laumasuojamallinnettu Character Encoding Menu in 2014 Erillissuosituksen tarpeettomuudesta yleissuosituksen poikkeukseksi? STM:n maskiaikajana Rust 2021 Oma-aloitteisesti mallinnettu Kokopinovaatimuksin kilpailutettu chardetng: A More Compact Character Encoding Detector for the Legacy Web Varauksia paisutellen tiedotettu Perusteasiakirjoitta tiedotettu Always Use UTF-8 & Always Label Your HTML Saying So IME Smoke Testing The Validator.nu HTML Parser About the Hiragino Fonts with CSS It’s Time to Stop Adding New Features for Non-Unicode Execution Encodings in C++ Rust 2020 The Last of the Parsing Quirks About about:blank Rust 2019 a Web-Compatible Character Encoding Library in Rust How I Wrote a Modern C++ Library in Rust Using cargo-fuzz to Transfer Code Review of Simple Safe Code to Complex Code that Uses unsafe A Rust Crate that Also Quacks Like a Modern C++ Library #Rust2018 No Namespaces in JSON, Please A Lecture about HTML5 Julkisesti luotettu varmenne ikidomainille TLS:ää (SSL:ää) varten -webkit-HTML5 Lists in Attribute Values The Sad Story of PNG Gamma “Correction” If You Want Software Freedom on Phones, You Should Work on Firefox OS, Custom Hardware and Web App Self-Hostablility HTML5 Parser Improvements ARIA in HTML5 Integration: Document Conformance (Draft, Take Two) Schema.org and Pre-Existing Communities Lowering memory requirements by replacing Schematron HTML5 Parsing in Gecko: A Build Introducing SAX Tree NVDL Support in Validator.nu HOWTO Avoid Being Called a Bozo When Producing XML An Unofficial Q&A about the Discontinuation of the XHTML2 WG Thoughts on HTML5 Becoming a W3C Recommendation Four Finnish Banks Training Users to Give Banking Credentials to Another Site Unimpressed by Leopard Sergeant Semantics The Content Sink Inheritance Diagram – 2006-06-30 What is EME? About Points and Pixels as Units The Performance Cost of the HTML Tree Builder Social Media Impression Management The spacer Element Is Gone Openmind 2006 Performance Mistake XHTML and Mobile Devices WebM-Enabled Browser Usage Share Exceeds H.264-Enabled Browser Usage Share on Desktop (in StatCounter Numbers) HTML5 Parser-Based View Source Syntax Highlighting Vendor Prefixes Are Hurting the Web Accept-Charset Is No More Writing Structural Stylable Document in Mozilla Editor ISO-8859-15 on haitallinen Hourglass The Scientific Method According to Hixie Maemo Source Code Karpelan lukkovertaus ontuu Digitaalisesta arkistoinnista ARIA in HTML5 Integration: Document Conformance (Draft) XHTML—What’s the Point? (Draft, incomplete) Mac OS X Browser Comparison HOWTO Spot a Wannabe Web Standards Advocate An Idea About Intermediate Language Trees and Web UI Generation Thoughts on Using SSL/TLS Certificates as the Solution to Phishing Bureaucracy Meets the Web Europe Day HOWTO Establish a 100% Literacy Rate What to Do with All These Photos? Charmod Norm Checking Validator Web Service Interface Ideas DTDs Don’t Work on the Web EFFI’s Day in Court Speaking at XTech
Dualroids
2011-12-22 · via Henri Sivonen’s pages

Dualroids is a two-player asteroid shooting network game inspired by the classic game Asteroids. Dualroids is available under the Artistic License.

Requirements

Dualroids is written in Java and has been tested on JDK 1.3.1 and JDK 1.4. Compatibility with JDK 1.2 and 1.3 is unknown. Dualroids won't work with JDK 1.1. In order to run Dualroids, a graphical display is required.

Dualroids uses the Java2D API for graphics and that is also the main performance bottleneck. Performance mostly depends on the performance of the Java2D implementation.

The game uses the port 9999 both for the connection between the local client and the server running in the same process and between the remote client and the server, so that port needs to be accessible.

Running the Game

The game is started from the Dualroids.jar file either from the command line using the command "java -jar Dualroids.jar" or by double-clicking the jar file on platforms that allow jar launching by double-clicking. A dialog is brought up for entering the player name and for choosing whether the program will act as the game server or as the client only.

One player should choose to “Act as Server” and the other should “Connect to Server”. On the server side, a waiting dialog will be displayed. On the client side, a dialog for entering the server address (hostname or IP number) is displayed. The game network setup will take a few moments after the server name has been entered.

The game starts on an asteroid field where the white ship is your ship. The idea is to blow up as many asteroids as possible and to get as many points as possible in the process--without colliding with the asteroids, of course. The larger asteroids require more hits in order to explode. Points are awarded only to the player who fires the last shot that makes the asteroid explode. When there are no asteroids left, a new level starts, The number of asteroids and the velocity of the asteroids is greater on each new level. A player gets a new spare ship for every 500 points. The ships break if they collide with asteroids.

The ship is controlled with the arrow keys. The right and left arrows turn the ship and the arrow up thrusts. The space bar fires. The ship has no breaks. The ships need to be turned around in order to slow down.

The q key quits the game. The other player is informed about quitting. Quitting in the middle of a game is of course impolite.

The game ends when one player runs out of ships. A high score table is displayed in the end. (The table is stored in a file called “dualroids-scores.dat” which shouldn't be removed or altered.)

In order to start a new game, the program has to be restarted.

Known bugs, shortcomings and environment issues

  • The app has to be relaunched in order to start an new game.
  • The game was designed to work in a network where the round trip from the client to the server and back takes a reasonably short time. When the round trip time becomes longer (eg. in cable modem serves during the rush hours) visual problems show up in the game. The shot may pass through the asteroids before the asteroids explode.
  • The ship explosion animation doesn't look quite right.
  • The app doesn't remember the name of the previously used server.
  • The game doesn't work properly on Windows 98. The game requires an accurate implementation of the System.currentTimeMillis() method. On Windows 98 the value returned by System.currentTimeMillis() is reportedly updated only 18 times per second. The problem doesn't occur on NT-based Windows systems or on Unix-like systems.
  • Sometimes the remote client may show a network error dialog if the server quits. We have been able to reproduce the problem only with JDK 1.3.1 on Solaris. We haven't been able to reproduce the problem with JDK 1.4 on Solaris or on other platforms.
  • Starting the server caused a bus error in the native socket implementation on JDK 1.3.1 (Classic VM with native threads) on IRIX.
  • When two instances of Dualroids are run at the same time (for demonstration or testing purposes) on JDK 1.3.1 Update 1 on Mac OS X, NullPointerExceptions are thrown within Apple's event implementation. In this case the game reacts to keyboar input clumsily. The problem is believed to be a bug in Apple's event implementation.