Game Dev Engine #7. Mouse Pointer.

Опубликовано: 10 Август 2026
на канале: Jason Doucette
1,166
11

2023-07-19. Showcasing mouse control via pointing and multi-button clicking. The mouse has many methods of providing input, so I will be making a few small games to showcase the various methods. The windowing system is already showcasing click & drag, but I figure showing it within a game actually shows its use in a game development / usability setting. The windows are part of the engine, where as a sample game should have easily consumable mouse input relative to the game itself (in this case, the game lives inside of a window, and doesn't care about the higher level OS-style functionality).

My game of choice is a clone of Missile Command, which I have never played, so this doesn't capture all of the example enemy types -- particularly the enemy that drops bombs, and the smart targeting missile that avoids explosions. But I did add the following features:
cities and silos are procedurally generated
cities act as missile generators at level end
you obtain one new city and one new silo at level end, or bonus points if none needed
silos have no 10 missile limit, so don't waste early
missiles can split into 3, and can do so multiple times
difficulty ramp up includes: more missiles, more splits, faster missiles
middle silo fires faster missiles
explosions cause chain reactions, which can help efficiency
terrain is procedurally generated, but I don't change it, as I want to keep the sense that you're in the same country / county of cities each level
end of level: cities and silos produce more missiles

The lines are draw by the GPU as a "sprite", thus some floating point inaccuracies cause flickering. I had considered rendering this as a single (not double) buffered bitmap screen, like the original arcades (e.g. Missile Command, Defender, Robotron: 2084), which this engine allows. But there is no natural palette indexing, and I didn't want to complicate things with pixel shaders to replicate the palette cycling. I may try this for a Defender clone though.

Finally, this game offers an interesting challenge for Gamepad based input. Some great ideas to follow. If you can make this fun with a game controller -- then I think that's a huge win. It would open the floor to couch co-op multi-player.

Hope you enjoy!

Playlists:
--------------
Xona System 8:    • Game Dev Engine #1. A New Beginning.  
Voxel:    • Voxel Engine #8 - Correct Peripheral Disto...  
Ray Cast:    • 3D Ray Casting Engine: #4 (Global Game Jam...  
Graph-All:    • #1 Graph-All Equation Renderer - Multiple ...  
Scroll Shmup:    • The First Pixel: Devlog #9 - Enemies, Anim...  
Road:    • Pseudo 3D Road #8 - infinite vegetation, t...  
Arena Shmup:    • Arena Shmup Demo #3 - Object Pool Optimiza...  
Wave Function:    • A.I. Texture Generation, High Res (Wave Fu...  
3D Polygon:    • 3D Polygon Engine #9 - Multiple Materials,...  
GW-BASIC:    • GW-BASIC - Escape From Monster Caverns - C...  

Websites:
---------------
GitHub: https://github.com/JDoucette
Blog: http://thefirstpixel.com
Studio: http://xona.com