Topic: A new kind of ball
Lately the topic of ball variety has come up in a number of threads. For a long time my intent has been to generalize the way the ball is represented and, in so doing, allow for much greater flexibility in defining the ball model. Whenever it comes up, we all agree "That's something for after 1.5".
But each time the topic comes up I starting thinking in the back of my mind about how I'd accomplish this. This morning, I realized most of the work is already done. It occurred to me that ball geometry could be defined using the exact same mechanisms and tools used to define levels and backgrounds. These already support OBJ loading, a variety of material types, moving objects, animated sprites, and transparency effects. On top of that, they're stored in a very generalized, powerful and compact file format that mapc is very good at optimizing. I realized it would be easy.
So, today I sat down and implemented a new ball creation mechanism based on this idea. I created a branch called ball-test. To test this code, I set about recreating the original ball using the new system, as well as new example balls that exercise all of the power of new system. Here are the results:
Here's our old friend "basic-ball". It looks as good as ever, and is even slightly more efficient now that it's been processed by mapc. At the core of basic-ball is a new ball OBJ which defines a simple textured sphere. basic-ball.obj is referred to by a misc_model entity in basic-ball-solid.map. A "-solid.map" file defines the rolling geometry of the ball. All of the other new balls are also based upon this same OBJ; they just texture it differently and augment it with other entities.

Here's "saturn". It references basic-ball.obj from within saturn-solid.map, but it also adds another OBJ for the rings, which is defined in saturn-outer.map. This "-outer.map" file defines geometry that sits outside of the rolling geometry, but remains balanced at all times. Of course, the rings are not physical, and the ball bounces normally, rolling around in its ring.

Now here's "reactor". It is very animated, and the screenshot doesn't do it justice. Reactor includes billboard entities in a file called reactor-inner.map. An "-inner.map" file defines geometry that sits inside of the rolling geometry. Like outer geometry, inner geometry is balanced and does not rotate with the ball. In this case, the inner MAP includes pulsing flares and animated sparkling billboards. These billboards pulse beyond the bounds of the ball, giving it a nice glow effect. In addition to the balanced billboards, reactor includes several "solid" billboards and a "solid" OBJ, which rotate with the ball. This combination of balanced and rotating entities makes for a very complex and dynamic appearance.

Finally one more: this is "snowglobe". It's just like basic-ball, but with an inner MAP with OBJs and billboards. Several snowflake sprites rotate smoothly, giving the impression of fluttering flakes in a holiday snowglobe. I wanted to make the little train run around its track, but I haven't yet thought of a good way to do that.

The "ball" key in the neverballrc has changed completely. If you try this branch, just delete that key and let the game create it using the default.
Yes, this works in Neverputt. Currently, the Neverputt ball color is applied to the new models, which can do weird things. In the future, instead of colored balls, I was thinking it might be cool to allow Neverputt players to select balls they've earned playing Neverball. We'll see.
None of this new stuff invalidates any of the new skins that people have been making. We'll still use them, and we'll be able to improve upon them with the full power of the SOL at our disposal.



