spherical spacewar, two-player game program                 this page, black on gray,   yellow on blue                 program update project page                 home, user website root index

                Spacewar is a classic two-player game with ships that turn, thrust, and shoot in a two-dimensional wrapping rectangle space.   The originating purpose of   [spherical spacewar]   was to see what a Spacewar game might be like played instead over the surface of a sphere.   To map the spherical surface to the computer screen, I included a selection of various traditional map projections, in addition to orthographic and perspective projections, which look more natural.   The program also includes the option of playing in a two-dimensional rectangular space, wrapping or walled, either of which is arguably more fun than playing on the surface of a sphere.

                Program executable:
                  sphrspwa081606.zip.   md5sum e7d10ad725c8a1ef8c430838cc02c337
                  virtualbox dosvm vdi, with eee-pc retune version         dir screen

                Program source code:
                  sphrspwa082006s.zip, August 20, 2006 version.
                  sphrspwa081606s.zip, August 16, 2006 version.

                In classic Spacewar, damage from shots reduces the magnitude of a player's shields or ultimately destroys the player's ship.   For my program, I decided instead to have shot damage increase the size of a player's saucer, leaving the ultimately larger player susceptible to the judgement of having lost the space.   The larger player is quickly at a disadvantage in this program.

                I developed the program on a personal computer with a 1.8 GHz AMD Athlon 64 microprocessor.   I wrote it in C, for DOS with 320x200 8-bit VGA graphics, and compiled it in the Borland Turbo C++ 3.0 IDE.   In 2008, I began the work of porting the program to the cross-platform MinGW with SDL C/C++ compiler environment, but halted work soon after outlining the effort.     porting outline

                Spherical Spacewar has a mess of settings displayed to the user in two "Commands, Help, and Status" text screens, accessed by hitting the "?" key.   "%" increases a delay of the program's main loop completions, in increments of 1ms.   "]" will enable or disable an effort by the program to adjust the speed of the simulation to run at a standard rate on different processors or under different processor loads.

                Screens,       screens layout     screen     screen

                Further program notes, sphrspwa.txt.   Graphs.   Programmer's desk notes,


                Pages 6, 7, and 11-14 show some exploration of collision math considered and unused, and page 16 shows some detail of applying the instantaneous collision math used, normal force for the force of friction from the exchange of momentum in the collision line.   Page 2 shows a great circle step solution from a web page, poor to use versus centripetal step for the simulation in the program.   Page 29 was used two-sided, 29-1 and 29-2.

                I wrote this program at my home, in the summer of 2006, two months of full-time work for a program I wanted.   I wrote two other programs that year, 16-bit DOS programs.   Earlier in the year, I expanded an old rotating hypercube program from college, ncube we called it, written by two at a desk one evening, summer '95.   Toward the end of my '06 summer of code, I also wrote an elementary gravity simulation, a small program with rewarding runs, for me, to see some orbits and contemplate gravity.

                I've been meaning to write some more programs.   I wrote some excel_vba in 2008; this is a data merge utility from one column pair to another, by the key column keys.   Here's a 2002 basic program for playing with the Mandelbrot set, in qbasic.

                home, user website root index                 this page, black on gray,   yellow on blue                 program update project page - spherical surface ship fight

                spherical surface ship fight, two-player game program, with flat space modes
                    port from 2006 pc-dos program, spherical spacewar
                    _______     ______________________________
                    _______         port from 2006 program                  
                    _______         finer graphical rendering                
                    _______         projection combination presets      
                    _______         clairaut's formula navigation, per-player keys
                    _______         three-players playable                    
                    _______         ball or disc shot, barrel, rail, or surface throw
                    _______         ship shapes, disc, zone, puck, toroid-torus, igloo~hemisphere
                    _______         gravity, altitude, design issues        
                    _______         interface and play, design and tuning
                    _______     ______________________________

                spherical surface ship fight, two-player game program, with flat space modes