My 3D game project

For everything that's not in any way related to PureBasic. General chat etc...
User avatar
idle
Always Here
Always Here
Posts: 5019
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: My 3D game project

Post by idle »

StarBootics wrote:Hello everyone,

Just to let you know that I'm still alive but I'm taking the next two weeks off. In all likelihood, 3 months of work almost 7 days a week, 12 to 14 hours a day, exhausted me more than I thought.

See you in august.

Best regards
StarBootics
last time I worked like that, I literally fell off my perch and woke up on the floor! It's all good while you're in the groove but coding like that 14 hours a day is really bad for your health, got to keep the heart beating.
Windows 11, Manjaro, Raspberry Pi OS
Image
User avatar
StarBootics
Addict
Addict
Posts: 984
Joined: Sun Jul 07, 2013 11:35 am
Location: Canada

Re: My 3D game project

Post by StarBootics »

Hello everyone,

Just to let you know that I have in the last 3 days resume the work on this project by reviewing and simplifying some section of the code. I'm not working full time on it because I have a seasonal job at the moment and since the place I work are short staffed I have to work 6 days per week. This job ends April the 4th, after that I will be able to work full time on this project.

That being said I will try to not exhaust my self like I did last summer.

Best regards
StarBootics
The Stone Age did not end due to a shortage of stones !
User avatar
StarBootics
Addict
Addict
Posts: 984
Joined: Sun Jul 07, 2013 11:35 am
Location: Canada

Re: My 3D game project

Post by StarBootics »

Hello everyone,

I have during the last 4 days worked on Procedural surface generation in order to generate some model who are very difficult to create manually using a 3D software. And as always not everything work as expected. Because equations like that and the derivatives :

Code: Select all

    *Equations\SetI(m * Cos(p * P_u) + n * Cos(q * P_u))
    *Equations\SetJ(m * Sin(p * P_u) + n * Sin(q * P_u))
    *Equations\SetK(h * Sin(t * P_u))
    
    *Derivative_1st\SetI(-m * p * Sin(p * P_u) - n * q * Sin(q * P_u))
    *Derivative_1st\SetJ(m * p * Cos(p * P_u) + n * q * Cos(q * P_u))
    *Derivative_1st\SetK(h * t * Cos(t * P_u))
    
    *Derivative_2nd\SetI(-m * p * p * Cos(p * P_u) - n * q * q * Cos(q * P_u))
    *Derivative_2nd\SetJ(-m * p * p * Sin(p * P_u) - n * q * q * Sin(q * P_u))
    *Derivative_2nd\SetK(-h * t * t * Sin(t * P_u))
The tubular mesh generation work with some m, n, h , p, q and t values but for some I have many instant twists caused by the Normal vector calculations

Code: Select all

    xpxp.f = *Derivative_1st\GetI() * *Derivative_1st\GetI()
    ypyp.f = *Derivative_1st\GetJ() * *Derivative_1st\GetJ()
    zpzp.f = *Derivative_1st\GetK() * *Derivative_1st\GetK()
    
    Part00.f = xpxp + ypyp + zpzp
    
    If Part00 <> 0.0
      
      Scalar00.f = Sqr(Part00)
      Scalar01.f = Sqr(Part00 * Part00 * Part00)
      
      *This\Tangent\SetI(*Derivative_1st\GetI() / Scalar00)
      *This\Tangent\SetJ(*Derivative_1st\GetJ() / Scalar00)
      *This\Tangent\SetK(*Derivative_1st\GetK() / Scalar00)
      
      *This\Normal\SetI((*Derivative_2nd\GetI() * (ypyp + zpzp) - *Derivative_1st\GetI() * (*Derivative_1st\GetJ() * *Derivative_2nd\GetJ() + *Derivative_1st\GetK() * *Derivative_2nd\GetK())) / Scalar01)
      *This\Normal\SetJ((-(*Derivative_1st\GetI() * *Derivative_2nd\GetI() * *Derivative_1st\GetJ() - *Derivative_2nd\GetJ() * (xpxp + zpzp) + *Derivative_2nd\GetK() * *Derivative_1st\GetJ() * *Derivative_1st\GetK())) / Scalar01)
      *This\Normal\SetK((-(*Derivative_1st\GetI() * *Derivative_2nd\GetI() * *Derivative_1st\GetK() + *Derivative_1st\GetJ() * *Derivative_2nd\GetJ() * *Derivative_1st\GetK() - *Derivative_2nd\GetK() * (xpxp + ypyp))) / Scalar01)
      *This\Normal\DivideByScalar(Scalar01)
      
      SetBinormal(*This, *This\Tangent\Cross(*This\Normal))
      
      If Normalize = #True
        *This\Tangent\Normalize()
        *This\Normal\Normalize()
        *This\Binormal\Normalize()
      EndIf
      
    EndIf
Just to remember that Normal vector is pointing into the direction of the curvature center and if the curve change direction you will have an instant change in direction. This instant change in direction generate an instant twist during the tubular mesh generation. But the worse part about this, I don't know how to solve this problem yet.

Best regards
StarBootics
The Stone Age did not end due to a shortage of stones !
User avatar
Demivec
Addict
Addict
Posts: 4082
Joined: Mon Jul 25, 2005 3:51 pm
Location: Utah, USA

Re: My 3D game project

Post by Demivec »

zuraizk66 wrote: Fri Apr 16, 2021 7:29 pm
StarBootics wrote: Wed May 27, 2020 6:32 pm Hello everyone,

About the fridge, I will receive the new one on Saturday. It's a relief that I will not need to wait 3 weeks to get it.

Best regards
StarBootics
Since we talking about the fridge here, I wanted to know why is my fridge making a popping noise?
:D :D :D Classic 1st post :D :D :D
User avatar
StarBootics
Addict
Addict
Posts: 984
Joined: Sun Jul 07, 2013 11:35 am
Location: Canada

Re: My 3D game project

Post by StarBootics »

Demivec wrote: Sat Apr 17, 2021 6:57 am
zuraizk66 wrote: Fri Apr 16, 2021 7:29 pm
StarBootics wrote: Wed May 27, 2020 6:32 pm Hello everyone,

About the fridge, I will receive the new one on Saturday. It's a relief that I will not need to wait 3 weeks to get it.

Best regards
StarBootics
Since we talking about the fridge here, I wanted to know why is my fridge making a popping noise?
:D :D :D Classic 1st post :D :D :D
I was not sure if that post was done by bot or not. Anyway my new fridge is making strange noise from time to time and it is less than one year old.

Best regards
StarBootics
The Stone Age did not end due to a shortage of stones !
Olli
Addict
Addict
Posts: 1071
Joined: Wed May 27, 2020 12:26 pm

Re: My 3D game project

Post by Olli »

Use a Pelletier system. Very expensive, but no noise.
User avatar
StarBootics
Addict
Addict
Posts: 984
Joined: Sun Jul 07, 2013 11:35 am
Location: Canada

Re: My 3D game project

Post by StarBootics »

Hello everyone,

Beside the Fridge noise subject, I think I have figure out how to generate a tubular mesh without any instant twist and even a slow twist. I still have some work to do make the solution 100% proof.

While I'm at it, I have a partially working B-Spline 3D and a fully working Bézier Spline also in 3D. So I'm making progress but it's very slow in the making. B-Spline in 3D, I have spent the entire week to make it working and I will probably need another week to make it working at 100%.

After that I will tackle an interpolation spline in 3D.

Best regards.
StarBootics
The Stone Age did not end due to a shortage of stones !
User avatar
tft
User
User
Posts: 84
Joined: Mon Dec 29, 2008 9:34 am

Re: My 3D game project

Post by tft »

respect, I feel very lost with my little ELITE project. I want to squeeze the game into 782 lines. Is there a video or a link to take a look.

Sorry Google Englisch.

TFT
TFT seid 1989
Aktuelles Projekte : Driving School Evergarden
YouTube : Pure Basic to go
FaceBook : Temuçin SourceMagic Games
DISCORD : SourceMagic
W10 , i9 9900K ,32 GB Ram , GTX Titan , 3 Monitore FHD
ARDUINO Freak :-)
User avatar
StarBootics
Addict
Addict
Posts: 984
Joined: Sun Jul 07, 2013 11:35 am
Location: Canada

Re: My 3D game project

Post by StarBootics »

tft wrote: Sun Apr 18, 2021 1:04 pm respect, I feel very lost with my little ELITE project. I want to squeeze the game into 782 lines. Is there a video or a link to take a look.

Sorry Google Englisch.

TFT
There is no video or link to show anything just yet beside what I have posted here in this post. I'm currently making progress but very slowly.

Best regards
StarBootics
The Stone Age did not end due to a shortage of stones !
User avatar
tft
User
User
Posts: 84
Joined: Mon Dec 29, 2008 9:34 am

Re: My 3D game project

Post by tft »

if you like, take a look at my YouTube channel.

https://www.youtube.com/channel/UCm0pNX ... -RvP1etUJg
TFT seid 1989
Aktuelles Projekte : Driving School Evergarden
YouTube : Pure Basic to go
FaceBook : Temuçin SourceMagic Games
DISCORD : SourceMagic
W10 , i9 9900K ,32 GB Ram , GTX Titan , 3 Monitore FHD
ARDUINO Freak :-)
User avatar
StarBootics
Addict
Addict
Posts: 984
Joined: Sun Jul 07, 2013 11:35 am
Location: Canada

Re: My 3D game project

Post by StarBootics »

Hello everyone,

I decided to take a break with the B-Spline curves. Instead I have nailed the nonuniform Catmull-Rom spline. Next spline system I will implement will be the Hermite Curves but for that I need to learn how to solve a Tri-diagonal matrix system of equations using the Thomas algorithm.

@tft : I will have a look at your Youtube channel.

Best regards
StarBootics
The Stone Age did not end due to a shortage of stones !
KayBur
User
User
Posts: 20
Joined: Tue Apr 20, 2021 11:45 am

Re: My 3D game project

Post by KayBur »

StarBootics wrote: Wed Apr 21, 2021 8:25 pm Hello everyone,

I decided to take a break with the B-Spline curves. Instead I have nailed the nonuniform Catmull-Rom spline. Next spline system I will implement will be the Hermite Curves but for that I need to learn how to solve a Tri-diagonal matrix system of equations using the Thomas algorithm.

@tft : I will have a look at your Youtube channel.

Best regards
StarBootics
Good plan. Have you already been able to figure out the implementation of your planned game moments?
User avatar
StarBootics
Addict
Addict
Posts: 984
Joined: Sun Jul 07, 2013 11:35 am
Location: Canada

Re: My 3D game project

Post by StarBootics »

KayBur wrote: Thu Apr 22, 2021 2:48 pm Good plan. Have you already been able to figure out the implementation of your planned game moments?
For the moment, I'm working out the smalls mechanics such as splines but not how I will use them later on into the game it's self. For the AI standpoint for what I want it to be capable to do, I'm not sure if I can get away with just following way-points. So I'm studying various kind of Splines, how they work, how they can be used and for what purposes.

I have implemented the Hermite curve (single segment cubic curve) even if they are easy to implement my study show that the magnitude of the tangent vector at both ends of the curve have a huge impact on the shape of the curve. And this was not expected at all so I don't know if I will continue with the Hermite curves.

To make a long story short, I'm not a professional game developer and most important point I'm doing this project to learn new stuff. That being said, I'm doing it seriously and I really look forward to complete this project no matter what time it will take to make it happen.

Best regards
StarBootics
The Stone Age did not end due to a shortage of stones !
KayBur
User
User
Posts: 20
Joined: Tue Apr 20, 2021 11:45 am

Re: My 3D game project

Post by KayBur »

StarBootics wrote: Thu Apr 22, 2021 5:30 pm
KayBur wrote: Thu Apr 22, 2021 2:48 pm Good plan. Have you already been able to figure out the implementation of your planned game moments?
For the moment, I'm working out the smalls mechanics such as splines but not how I will use them later on into the game it's self. For the AI standpoint for what I want it to be capable to do, I'm not sure if I can get away with just following way-points. So I'm studying various kind of Splines, how they work, how they can be used and for what purposes.

I have implemented the Hermite curve (single segment cubic curve) even if they are easy to implement my study show that the magnitude of the tangent vector at both ends of the curve have a huge impact on the shape of the curve. And this was not expected at all so I don't know if I will continue with the Hermite curves.

To make a long story short, I'm not a professional game developer and most important point I'm doing this project to learn new stuff. That being said, I'm doing it seriously and I really look forward to complete this project no matter what time it will take to make it happen.

Best regards
StarBootics
You are doing everything right. the best way to learn something new is to try it out in practice. Knowledge of theory alone is not enough, you need practical skills. Of course, a beginner will most likely not be able to implement the generation of random waypoints.
User avatar
StarBootics
Addict
Addict
Posts: 984
Joined: Sun Jul 07, 2013 11:35 am
Location: Canada

Re: My 3D game project

Post by StarBootics »

KayBur wrote: Fri Apr 23, 2021 11:42 am You are doing everything right. the best way to learn something new is to try it out in practice. Knowledge of theory alone is not enough, you need practical skills. Of course, a beginner will most likely not be able to implement the generation of random waypoints.
I'm not really a beginner at programming with PureBasic. I have started somewhere in July 2003 and I was thinking about this project since then. I have learn how to program for this particular project and this project only nut. But the journey took me to other programming projects along the way.

Best regards
StarBootics
The Stone Age did not end due to a shortage of stones !
Post Reply