Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / Not random dynamic (rotatable) starfield generation anyone?

Author
Message
mhack
22
Years of Service
User Offline
Joined: 24th Apr 2003
Location:
Posted: 25th Apr 2003 17:25
What are the options?

I tried creating 10,000 units sphere and mapping it with 1024x1024 texture of stars but it didn't work correctly.. looked like I mapped it wrong..
Red general
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: United Kingdom
Posted: 25th Apr 2003 18:38
HAve you tried to use a sky sphere, then you could have something, also you could position it at the camera co-ords, so it would move with you, but would not have to rotate round with you

My computer melts regulary - perhaps it likes being fondue
mhack
22
Years of Service
User Offline
Joined: 24th Apr 2003
Location:
Posted: 25th Apr 2003 18:57
Is sky sphere is available in DB classic?

I need the sky (stars) to rotate when player rotates..

I'm thinking of creating a banch of small boxes like on 10,000 radius as stars..

Do you think DB can handle 1000-10000 objects?

Hell IVIonkey
22
Years of Service
User Offline
Joined: 1st Apr 2003
Location: Outer Limits
Posted: 25th Apr 2003 19:42
(before the game loop)
MAKE OBJECT SPHERE object-number, -size, size, size.
LOAD IMAGE "image", image-number
TEXTURE OBJECT object-number, image number

...
(inside the game loop)

POSITION OBJECT object-number, playerx#, playery#, playerz#
...
IF LEFTKEY()=1
TURN CAMERA LEFT angle
TURN OBJECT LEFT player-number, angle
TURN OBJECT LEFT object-number, angle
ENDIF


But it always looks better if the background doesn't rotate with the camera.
David T
Retired Moderator
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 25th Apr 2003 20:35 Edited at: 25th Apr 2003 20:35
This was created by someone called jvi a while ago:



You are the th person to view this signature.
Programmers don't die, they just Gosub without return....
mhack
22
Years of Service
User Offline
Joined: 24th Apr 2003
Location:
Posted: 25th Apr 2003 22:13
Thanks guys.. I will experiment tonight..

I agree it looks better when background doesn't turn..
I was describing diferent scenario for background to turn, when object stays in the same direction..

Last time I created a mapped sphere with stars it was mapped incorrectly stars were the size of a planet.. I'll try today..

Mr Underhill
22
Years of Service
User Offline
Joined: 23rd Apr 2003
Location: The Forgotten Worlds...
Posted: 7th May 2003 09:21
Try scaling the sphere's texture. That's what I did in Solar Alliance.

"Not all that is gold does not glitter, not all those who wander are lost, not all that is old does not whither, deep roots are not reached by the frost..." - Aragorn (Strider)
mhack
22
Years of Service
User Offline
Joined: 24th Apr 2003
Location:
Posted: 8th May 2003 17:08
Yeah, I already figured it out scalling was the problem..

Sphere with big texture looks good..

Login to post a reply

Server time is: 2025-05-17 03:08:50
Your offset time is: 2025-05-17 03:08:50