Have advice?

Started by
1 comment, last by Infinisearch 8 years, 5 months ago

I'm currently coding on a raspberry 2 in python. My goal is to create a world in which the player seems to travel far distances and through woods, into space and perhaps into orbit around far-distant suns.

What I'd like some help about is choosing a 3d system, as in should I implement some of python's modules or get a compiler for something else? To be honest, writing my own engine from pygame seems appealling as if I worked on it i'm sure I could get something to work... Anyway I'd like any advice you have, cheers

Advertisement
My first advice is that you do not attempt to implement these as a unified coordinate system, and that you do not attempt to implement them at the same scale.

For reasoning, floating point math has a scale of about six decimal digits. Operations that you work on typically get subdivided into frames, so as a fraction of a second you often lose two or three of those six digits. Assuming a meter scale, and that you want some objects to be about as small as a player's hand, the most extreme distances you can go are under a kilometer on the level.

If you are talking planetary sizes you cannot mix the scale of a human-sized critter (1-2 meters) with the orbit of a planet (200,000,000,000 meters). Since floats give you six digits of precision, if you are working on the scale of a planetary orbit the smallest items need to be millions of meters big. A single planet is vanishingly small relative to the orbit it takes up, the Earth is only about 6 million meters across, compared to its two-hundred-billion meter orbit of the sun. Neither float nor double floating point will work at these scales.

So build zones with their own coordinate systems, fake your orbit with billboards of stars and billboards of planet surfaces drawn without distance at infinity or just plastered on a skybox.

I think the rasberry pi 2 only has 1gig of RAM, that is going to be one of the biggest hurdles you will have to deal with. Look into procedural generation of content, random and pseudo random content generation. This will help you deal with that hurdle. But yeah what frob said in regards to scale.

-potential energy is easily made kinetic-

This topic is closed to new replies.

Advertisement