![]() ![]() In order to make a star approach the viewport, the current Z-value of a star´s position is decreased according to the individual Z-velocity of the star for each animation frame while the initial X- and Y-positions remain unchanged as long as the star travels along its trajectory. The screen center resembles the value 0 for the X- and Y-coordinate accordingly. The viewport of the user is setup in a way that the screen is orthogonal to the Z-axis and intersects the Z-axis at 0 with the user viewing in positive Z-direction. Each star is defined via its X-, Y- and Z-coordinate in 3D-space and its velocity in negative Z-direction. The starfield consists out of a set of up to 60 single stars (starting from a minimum of 8 stars). Furthermore, in order to add some randomness to the star field generation, the code needs some sort of pseudo random number generation that yields a sequence of evenly distributed random numbers that don’t show up in repeating patterns that are recognized easily.Īt the end of the article I will do a quick side trip into 6502-profiling by giving a short introduction to the champ 6502/65C02-profiler project and show some profiler output when running the 3D-starfield. Parts of the code are also a spin-off from the 3D-Demo since calculating the 3D star position needs some 3D-calculations as I will explain later. In this article I want to give an insight into the development of a 3D-HIRES-starfield on the Apple ][ in action is shown below. One of these screensavers was the 3D-Starfield Simulation. ![]() As an example 3D-games like Elite for the Apple ][ featured a simple 3D-starfield.Īnother historical example for a 3D-starfield – which should be widely known – is Windows 3.11, released in 1992, which was probably the first operating system to ship with a selection of screensavers. 2D side scrollers are rather simple to program whereas 3D-starfields are much more complex. Most shooter games feature a 2D-starfield where stars are moving in a single direction as a side scroller on the computer screen in order to simulate the flight of a spaceship. Simulating starfields is an essential problem in space action game development. 6502 Assembler: Programming a 3D-Starfield Simulation
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |