Monoquash™
Play an endless, keyboard-only, minimal, top-down, twin-stick shooter game in the browser.
Game
Instructions
Move within the pulsing circle to activate powerful weapons, then shoot enemies while avoiding them.
Fictional depictions of danger, frantic animations and hypnotic repetition may trigger sensitivity issues.
Performance may lag on lower-end computers if the browser's JavaScript engine hasn't implemented the appropriate Eightomic libraries yet.
Play
Click on the playing area, zoom in, then use arrow keys to shoot and w a s d keys to move.
License
It's free and open source.
Explanation
It's a minimalist twin-stick shooting game to unleash carnage upon zombie-like enemies.
Each weapon projectile is rendered as its own object.
There are thousands of different enemy splatter effects that use static HTML elements and an efficient combination of both vanilla CSS without shortcodes and use strict JavaScript animations.
Hundreds of hours were spent tweaking parameters to ensure each new wave of enemies is a rewarding display of entropy and a unique interaction with high-quality, satisfying visual effects.
The intuitive control scheme combined with intense gameplay, linearly-increasing difficulty and no HUD distractions encourages deep focus for brainstorming and "flow state" activation.
It scales to any 16:9 resolution without any image assets.
The default weapon is a slow, weak handgun.
The pulsing circle changes position every 5 seconds, alternating between an SMG upgrade and an automatic shotgun upgrade.
During development, Eightomic noticed an efficient, practical method for calculating collisions of 2 circular objects based on a constant multiplier.
It uses a combination of circular and rectangular bounds with an approximated multiplier constant that's accurate within a few pixels.
It's a derivative of the following code segment that detects a collision between 2 rectangular objects in a 2D game, one as a player and the other as a traversable zone.
if (
player_offset_left <= zone_offset_right &&
player_offset_top <= zone_offset_bottom &&
(player_offset_right) >= zone_offset_left &&
(player_offset_bottom) >= zone_offset_top
) {
collision();
}
To accommodate for a circular zone shape, the zone's X coordinates are summed with the zone's radius, then the player's X coordinates are summed with the player's square side length.
The result is the difference as a positive value multiplied by a constant approximate to ⅓ , but increased to 0.38. The aforementioned calculation is duplicated with the Y coordinates.
Eightomic originally attempted multiplying the zone's radius by an estimated constant derived from π, although the final 0.38 result from trial-and-error compensates for square-shaped player bounds and emulates circular bounds with fewer calculations.
The following code segment demonstrates an example of a square player object in a game colliding with a circular zone of varying sizes less than 200 pixels.
player_side_length_half = player_side_length >> 1;
zone_size = (randomness & 63) + 130;
zone_size_half = zone_size >> 1;
zone_offset_left = (randomness % (614 - zone_size));
zone_offset_top = (randomness_offset % (320 - zone_size));
zone_offset_left_circular_arc = abs(
(zone_offset_left + zone_size_half)
- (player_offset_left + player_side_length_half)
) * 0.38;
zone_offset_top_circular_arc = abs(
(zone_offset_top + zone_size_half)
- (player_offset_top + player_side_length_half)
) * 0.38;
if (
(player_offset_left + zone_offset_top_circular_arc)
<= (zone_offset_left + zone_size) &&
(player_offset_top + zone_offset_left_circular_arc)
<= (zone_offset_top + zone_size) &&
(player_offset_left + player_side_length)
>= (zone_offset_left + zone_offset_top_circular_arc) &&
(player_offset_top + player_side_length)
>= (zone_offset_top + zone_offset_left_circular_arc)
) {
collision();
}
It's optimal for small circles with a diameter of up to 300 pixels.
Furthermore, Monoquash only requires random numbers in a range from 1 to 672, so it uses a JavaScript variation of Eightomic PRNG 16 B to improve upon the performance of Math.random().
The open-source license is intended to allow developers to extract the aforementioned snippets of code from Monoquash to improve to their own JavaScript development instead of encouraging developers to either copy the entire game without attribution or port it to another platform.
To support the development of optimal computing primitives by Eightomic for computer science innovation, Eightomic plans on porting Monoquash to dedicated gaming consoles and smartphones.
The paid version will have additional polish, different game modes, high-quality sound effects, increased enemy counts and more weapons.
In the meantime, enjoy the free-to-play, in-browser version.