Raydium 3D Game Engine

Official forum for everything about Raydium, ManiaDrive, MeMak, ...
It is currently Thu Mar 28, 2024 6:44 pm

All times are UTC




Post new topic Reply to topic  [ 27 posts ]  Go to page Previous  1, 2
Author Message
 Post subject:
PostPosted: Fri Sep 30, 2005 4:07 pm 
Offline
User avatar

Joined: Sun Mar 16, 2003 2:53 am
Posts: 2591
Location: gnniiiii (Scrat)
Ok, working on it, i must clean file, add sounds and upload data files.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 30, 2005 4:54 pm 
Offline
User avatar

Joined: Sun Mar 16, 2003 2:53 am
Posts: 2591
Location: gnniiiii (Scrat)
Ok, it's done ! :) See explo.c


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 30, 2005 4:54 pm 
Offline
User avatar

Joined: Thu Sep 29, 2005 2:59 pm
Posts: 828
more ideas.
Instead of the usual box sky i'm working on a sphere sky with procedural colors. In that way the colors of the sky can change dynamicaly very easy.

1-we locate tha camera according to simulate the position of the sun. (The sun in the sphere will be always at the top, so we have to turn the sphere to simulate other positions)
2- draw an sphere, vertex by vertex centered in 0,0,0 of the camera. So, we'll be INSIDE the sphere.
3- the normals will point to the center, in that way it will be visible from the center of the sphere.
4- the color of the vertex will be equal at the sun light in the higest point (y=1) and the color will be variyng just the inverse of the sun light in the bottom (-1). Just a gradient from the top to the bottom.
5-This should be done first of all 3d drawing.
6-after drawing this "sky" we will erase ONLY the zbuffer(or at least not the color buffer). So we can use opengl as usual but the just rendered image will be our dynamic backgroud.

Fast and easy, isn't? :D

update: Thanks about the explo.c :P


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 30, 2005 5:01 pm 
Offline
User avatar

Joined: Sun Mar 16, 2003 2:53 am
Posts: 2591
Location: gnniiiii (Scrat)
We've posted at the same time :)
It may be a good idea to post another thread about your skysphere, and have a look to current skybox code ;)


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 30, 2005 5:50 pm 
Offline
User avatar

Joined: Thu Sep 29, 2005 2:59 pm
Posts: 828
the explosion effect was great, but a little "ortogonal". Each piece was launched perfectly in his direction.
So i have made a little change to add a random factor of torque, i think the effect is more realistic now 8) and it's affected by the distance, like the move effect.

File uploaded. :D


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 30, 2005 8:33 pm 
Offline
User avatar

Joined: Sun Mar 16, 2003 2:53 am
Posts: 2591
Location: gnniiiii (Scrat)
Thanks, great result !

But there's a few things:
- It breaks "compatibility" with previous behaviour,
- You can't adjust rand factors from application,
- It's not documented (see headers/ directory)
- (little one) Try to respect pure ISO C89 style for variables (no mixed declarations and code), since a lot of compilers rejects it.

I'm "correcting" the function like this :
- writing a new function with one more param (random factor)
- wrapping this new function into the old one with a factor = 0.0

It could be a good idea to write things like that into the wiki (something like "coding rules"), since it may be "unpleasant" for you to hear this only now :) (hopes it's not the case !)

and again, great work, it's really more realistic now !

edit : "can't" and not "can", sorry ("You can't adjust rand factors from application")


Last edited by Xfennec on Fri Sep 30, 2005 9:28 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 30, 2005 9:07 pm 
Offline
User avatar

Joined: Thu Sep 29, 2005 2:59 pm
Posts: 828
ok ok, i'll try to put the code as clean and organizated as posible.
But really, that was only a test, i have mind of make clear later.

About the ISO C89 style for variables (no mixed declarations and code)? What's that?
Maybe i have no said that i'm not "real" programmer , i started to programm years ago by hobbie.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 30, 2005 9:27 pm 
Offline
User avatar

Joined: Sun Mar 16, 2003 2:53 am
Posts: 2591
Location: gnniiiii (Scrat)
There's no problem ! :) (the only thing is : you're working on the main trunk of Raydium ;) so we must try to keep it "clean" ). ... and I'm self made too ;)

This is C89 :
Code:
void foobar(void)
{
int a,b;
printf("....");
}


This is not C89 :
Code:
void foobar(void)
{
int a;
printf("....");
int b; // can't do that : there's already some code before !
printf("....");
}


It's nothing more than that ;)


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 30, 2005 10:34 pm 
Offline
User avatar

Joined: Thu Sep 29, 2005 2:59 pm
Posts: 828
ok fine.
offtopic: do you know what means the word "lur" in english?


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 01, 2005 10:12 am 
Offline
User avatar

Joined: Sun Mar 16, 2003 2:53 am
Posts: 2591
Location: gnniiiii (Scrat)
http://en.wikipedia.org/wiki/Lur ? :)

Sorry, I've never heard that word.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 12, 2005 7:40 am 
Offline
User avatar

Joined: Thu Sep 29, 2005 2:59 pm
Posts: 828
about the new commit in teh SVN

Code:
./odyncomp.sh explo.c
Files created: libraydium.a libraydium.so
rm: no se puede borrar «test»: No existe el fichero o el directorio
libraydium.so: undefined reference to `raydium_console_cursor_blink'
collect2: ld devolvió el estado de salida 1
./odyncomp.sh: line 13: ./test: No existe el fichero o el directorio

:lol:


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 12, 2005 10:40 am 
Offline
User avatar

Joined: Sun Mar 16, 2003 2:53 am
Posts: 2591
Location: gnniiiii (Scrat)
do "make clean_f" before ;) (since there's a change in common.h)

Good try ;)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 27 posts ]  Go to page Previous  1, 2

All times are UTC


Who is online

Users browsing this forum: No registered users and 31 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group