Suitability for a game

Everything related to 3D programming
User avatar
d3bug
New User
New User
Posts: 8
Joined: Thu May 24, 2018 8:02 pm
Location: Milky_Way/Sol/Earth/USA/FL/Pompano

Suitability for a game

Post by d3bug »

Would PureBasic be suitable for a city building game using OGRE for the 3D engine? (I really don't want to have to learn C/C++/C# if I don't have to)
I am thinking of something similar to Ancient Cities or Ostriv
User avatar
Mijikai
Addict
Addict
Posts: 1360
Joined: Sun Sep 11, 2016 2:17 pm

Re: Suitability for a game

Post by Mijikai »

d3bug wrote:Would PureBasic be suitable for a city building game using OGRE for the 3D engine? (I really don't want to have to learn C/C++/C# if I don't have to)
I am thinking of something similar to Ancient Cities or Ostriv
PureBasic is definetly fast enough, check out the demo version
of PureBasic and see if Ogre works for you.
User avatar
d3bug
New User
New User
Posts: 8
Joined: Thu May 24, 2018 8:02 pm
Location: Milky_Way/Sol/Earth/USA/FL/Pompano

Re: Suitability for a game

Post by d3bug »

Mijikai wrote:
d3bug wrote:Would PureBasic be suitable for a city building game using OGRE for the 3D engine? (I really don't want to have to learn C/C++/C# if I don't have to)
I am thinking of something similar to Ancient Cities or Ostriv
PureBasic is definetly fast enough, check out the demo version
of PureBasic and see if Ogre works for you.
I just had another thought... how difficult is it to interface with something like UE4? (without knowing C)
Fred
Administrator
Administrator
Posts: 16618
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: Suitability for a game

Post by Fred »

UE4 is a all in one package to make game, you don't need PureBasic at all for it (and it doesn't make sens to want interface PB with it IMHO).
User avatar
nco2k
Addict
Addict
Posts: 1344
Joined: Mon Sep 15, 2003 5:55 am

Re: Suitability for a game

Post by nco2k »

you could create a whole UE4 game without using ANY code. UE4 has a visual scripting feature called blueprints. but dont expect your journey to be an easy one. UE4 is a serious engine that requires serious work.

for blueprints, you need a somewhat different way of thinking. some things that could be easily done in code with just a couple of lines, could get pretty messy with blueprints. other things that could get pretty messy with code, are surprisingly easy with blueprints. so it all has pro's and con's. there is no holy grail.

UE4 has small bugs here and there, and it might take a year or two until they get fixed. what might be high priority for you, may not be of any priority for them. so you need to workaround those issues or wait and hope.

UE4 has a lot of stuff that works out of the box, like the gamepad support for UMG widgets. it gives you the illusion of taking a shortcut. but sooner or later you want to customize things. in order to save some time, you will try to modify the existing system, instead of creating your own system from scratch. eventually you will realize that you should have created your own, and decide to do so. in the end, you wasted double the time, just because you wanted to save some time.

the UE4 answerhub and forum are dead. there is no community and you are all on your own. especially when it comes to Paper2D. if you want to learn UE4, be prepared to spend some money on some good online and/or local courses.

and last but not least, take into account the 5% license fee. love it or hate it.

if you are just starting out, i would recommend Unity instead. its easier, despite of having to learn C#. Unity has a huge community and you will find a lot of great tutorials and assets. besides, knowing C# is a skill that will always come handy. oh and btw, you can also buy some 3rd party visual scripting tools for Unity, like Playmaker or Bolt.

or of course you could stick with UE4, which is (in my opinion) the superior engine anyway. but it wont be a walk in the park.

c ya,
nco2k
If OSVersion() = #PB_OS_Windows_ME : End : EndIf
walbus
Addict
Addict
Posts: 929
Joined: Sat Mar 02, 2013 9:17 am

Re: Suitability for a game

Post by walbus »

Well, the described project is more likely something for a professional team, including architects and graphic designers
Assembling colourful boxes is no longer possible today, I guess.
With OGRE and PB, who's gonna do that ?
User avatar
nco2k
Addict
Addict
Posts: 1344
Joined: Mon Sep 15, 2003 5:55 am

Re: Suitability for a game

Post by nco2k »

well, there are a lot of cheap or even free assets that you can use to prototype your game. once you got the base running, you can worry about financing it. but art is expensive. wether its a texture, a model, or a sound, art is VERY expensive. it doesnt really matter what engine you use. art will usually be the most expensive part of your game.

strategy/simulator type of games are very complicated though. you wont do yourself a favor if you take on a project that is way above your skill level. it will drain all your energy and you will lose all your motivation. my advice would be to create a 2D clone of a game like pac-man first. then create a 2D clone of a game like contra. then start playing around with 3D and create one of those ball balancing games. then you can slowly move to something bigger.

as for the initial question, personally i wouldnt use PB, OGRE, or PB+OGRE for game development today. PB is a programming language, OGRE is a 3D renderer. neither of them are actual game engines. sure, you can make games with PB+OGRE, but thats just a bonus. game development isnt really the main focus of PB. UE4 and Unity on the other hand are fully fledged game engines that were made for the sole purpose of creating games easily. you can easily manage all your assets and quickly drag and drop things in and out of the WYSIWYG editor. its a hell of a lot faster than doing it the "old fashioned way".

i often see people choose some weird engines to develope their game, and later when they want to publish it to a different system, they cant, because the engine itself doesnt support it. be smarter than that and choose one of the two major engines, that offer maximum flexibility.

c ya,
nco2k
If OSVersion() = #PB_OS_Windows_ME : End : EndIf
User avatar
StarBootics
Addict
Addict
Posts: 984
Joined: Sun Jul 07, 2013 11:35 am
Location: Canada

Re: Suitability for a game

Post by StarBootics »

My perspective on this question, I will try to be as honest as I possibly can. I think I have started learning PureBasic back in 2003 or so because at that time I was thinking grate I'm still an amateur in programming but by the time I will learn PB, the development of OGRE with PB will be completed so making a game will be easy. I don't get me wrong here, they make progress every new version but it's not it for a serious game creation even today.

Programming a game engine (including a rendering engine) from scratch with PureBasic is possible. That being said brace your self because a project like this represent many thousands lines of codes (around 100 000 lines) and countless hours of work.

For example, I'm working on a program with 31 902 lines of codes and it took me 2 years to get there and the program is still at version 0.9.1 (nothing releasable before V1.0.0).

So If I was you, and I was alone working on a game, I think I will go with C# and Unity 5 like these guys https://playoverload.com/team/ who have created the Descent 1, 2 and 3 to say the least and now the game "Overload".

Best regards
StarBootics
The Stone Age did not end due to a shortage of stones !
User avatar
TI-994A
Addict
Addict
Posts: 2512
Joined: Sat Feb 19, 2011 3:47 am
Location: Singapore
Contact:

Re: Suitability for a game

Post by TI-994A »

StarBootics wrote:... working on a program with 31 902 lines of codes and it took me 2 years to get there and the program is still at version 0.9.1 (nothing releasable before V1.0.0). ...
On an unrelated topic, and with all due respect, personal experience has taught that striving for the perfect release would be as good as not releasing at all. For one, there's never such a thing as a perfect release to begin with.

Working with commercially-motivated software houses of late, deliverables are always top priority. Managers and team leaders are well-aware of bugs, both minor and major ones, but would invariably choose to KIV them to be fixed in subsequent versions. Release dates are sacred.

While we might cringe at such policies, it delivers both product and payment. Furthermore, it's quite surprising how understanding clients could be, discovering and reporting these bugs, and patiently waiting for their fixes.

The many, many years wasted in the futile pursuit of perfection, and the many, many unperfected and unrealised projects sitting in archives, never seeing the light of day. :lol:
Texas Instruments TI-99/4A Home Computer: the first home computer with a 16bit processor, crammed into an 8bit architecture. Great hardware - Poor design - Wonderful BASIC engine. And it could talk too! Please visit my YouTube Channel :D
User avatar
StarBootics
Addict
Addict
Posts: 984
Joined: Sun Jul 07, 2013 11:35 am
Location: Canada

Re: Suitability for a game

Post by StarBootics »

TI-994A wrote:On a unrelated topic, and with all due respect, personal experience has taught that striving for the perfect release would be as good as not releasing at all. For one, there's never such a thing as a perfect release to begin with.

Working with commercially-motivated software houses of late, deliverables are always top priority. Managers and team leaders are well-aware of bugs, both minor and major ones, but would invariably choose to KIV them to be fixed in subsequent versions. Release dates are sacred.

While we might cringe at such policies, it delivers both product and payment. Furthermore, it's quite surprising how understanding clients could be, discovering and reporting these bugs, and patiently waiting for their fixes.

The many, many years wasted in the futile pursuit of perfection, and the many, many unperfected and unrealised projects sitting in archives, never seeing the light of day. :lol:
I understand your point of view, that being said I'm using this program for many project so far and I have discover many bugs while I'm using it. For sure I'm the only one user so I'm not pushing the envelop very far. It help me to write some code much faster. To stay on topic, let's create the "Core" module for a physic engine for example :

Code: Select all

; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; AUTOMATICALLY GENERATED CODE, DO NOT MODIFY
; UNLESS YOU REALLY, REALLY, REALLY MEAN IT !!
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; Code generated by : Dev-Module - V0.9.1
; Project name : the project name here
; File name : File name here
; File Version : 0.0.0
; Programmation : In progress
; Programmed by : StarBootics
; Creation Date : 27-05-2018
; Last update : 27-05-2018
; Coded for PureBasic : V5.62
; Platform : Windows, Linux, MacOS X
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

DeclareModule Core

  Declare GetGravity(*P_Gravity.Vector3::Vector3 = #Null)
  Declare GetHighGravity(*P_HighGravity.Vector3::Vector3 = #Null)
  Declare GetUp(*P_Up.Vector3::Vector3 = #Null)
  Declare GetDown(*P_Down.Vector3::Vector3 = #Null)
  Declare GetRight(*P_Right.Vector3::Vector3 = #Null)
  Declare GetLeft(*P_Left.Vector3::Vector3 = #Null)
  Declare GetOutOfScreen(*P_OutOfScreen.Vector3::Vector3 = #Null)
  Declare GetIntoScreen(*P_IntoScreen.Vector3::Vector3 = #Null)
  Declare GetAxisX(*P_AxisX.Vector3::Vector3 = #Null)
  Declare GetAxisY(*P_AxisY.Vector3::Vector3 = #Null)
  Declare GetAxisZ(*P_AxisZ.Vector3::Vector3 = #Null)
  Declare.f GetSleepEpsilon()
  Declare SetSleepEpsilon(P_SleepEpsilon.f)
  Declare Initialize()
  Declare Reset()

EndDeclareModule

Module Core

  ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  ; <<<<< Structure declaration <<<<<

  Structure Instance

    Gravity.Vector3::Vector3
    HighGravity.Vector3::Vector3
    Up.Vector3::Vector3
    Down.Vector3::Vector3
    Right.Vector3::Vector3
    Left.Vector3::Vector3
    OutOfScreen.Vector3::Vector3
    IntoScreen.Vector3::Vector3
    AxisX.Vector3::Vector3
    AxisY.Vector3::Vector3
    AxisZ.Vector3::Vector3
    SleepEpsilon.f

  EndStructure

  Global Instance.Instance

  ; <<<<<<<<<<<<<<<<<<<<<<<<<<<
  ; <<<<< The observators <<<<<

  Procedure GetGravity(*P_Gravity.Vector3::Vector3 = #Null)

    If *P_Gravity <> #Null
      Vector3::Copy(Instance\Gravity, *P_Gravity)
    Else
      ProcedureReturn Instance\Gravity
    EndIf

  EndProcedure

  Procedure GetHighGravity(*P_HighGravity.Vector3::Vector3 = #Null)

    If *P_HighGravity <> #Null
      Vector3::Copy(Instance\HighGravity, *P_HighGravity)
    Else
      ProcedureReturn Instance\HighGravity
    EndIf

  EndProcedure

  Procedure GetUp(*P_Up.Vector3::Vector3 = #Null)

    If *P_Up <> #Null
      Vector3::Copy(Instance\Up, *P_Up)
    Else
      ProcedureReturn Instance\Up
    EndIf

  EndProcedure

  Procedure GetDown(*P_Down.Vector3::Vector3 = #Null)

    If *P_Down <> #Null
      Vector3::Copy(Instance\Down, *P_Down)
    Else
      ProcedureReturn Instance\Down
    EndIf

  EndProcedure

  Procedure GetRight(*P_Right.Vector3::Vector3 = #Null)

    If *P_Right <> #Null
      Vector3::Copy(Instance\Right, *P_Right)
    Else
      ProcedureReturn Instance\Right
    EndIf

  EndProcedure

  Procedure GetLeft(*P_Left.Vector3::Vector3 = #Null)

    If *P_Left <> #Null
      Vector3::Copy(Instance\Left, *P_Left)
    Else
      ProcedureReturn Instance\Left
    EndIf

  EndProcedure

  Procedure GetOutOfScreen(*P_OutOfScreen.Vector3::Vector3 = #Null)

    If *P_OutOfScreen <> #Null
      Vector3::Copy(Instance\OutOfScreen, *P_OutOfScreen)
    Else
      ProcedureReturn Instance\OutOfScreen
    EndIf

  EndProcedure

  Procedure GetIntoScreen(*P_IntoScreen.Vector3::Vector3 = #Null)

    If *P_IntoScreen <> #Null
      Vector3::Copy(Instance\IntoScreen, *P_IntoScreen)
    Else
      ProcedureReturn Instance\IntoScreen
    EndIf

  EndProcedure

  Procedure GetAxisX(*P_AxisX.Vector3::Vector3 = #Null)

    If *P_AxisX <> #Null
      Vector3::Copy(Instance\AxisX, *P_AxisX)
    Else
      ProcedureReturn Instance\AxisX
    EndIf

  EndProcedure

  Procedure GetAxisY(*P_AxisY.Vector3::Vector3 = #Null)

    If *P_AxisY <> #Null
      Vector3::Copy(Instance\AxisY, *P_AxisY)
    Else
      ProcedureReturn Instance\AxisY
    EndIf

  EndProcedure

  Procedure GetAxisZ(*P_AxisZ.Vector3::Vector3 = #Null)

    If *P_AxisZ <> #Null
      Vector3::Copy(Instance\AxisZ, *P_AxisZ)
    Else
      ProcedureReturn Instance\AxisZ
    EndIf

  EndProcedure

  Procedure.f GetSleepEpsilon()

    ProcedureReturn Instance\SleepEpsilon
  EndProcedure

  ; <<<<<<<<<<<<<<<<<<<<<<<<
  ; <<<<< The mutators <<<<<
  
  Procedure SetSleepEpsilon(P_SleepEpsilon.f)

    Instance\SleepEpsilon = P_SleepEpsilon

  EndProcedure

  ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  ; <<<<< The Initialize operator <<<<<

  Procedure Initialize()
    
    Vector3::Update(Instance\Gravity, 0.0, -9.81, 0.0)
    Vector3::Update(Instance\HighGravity, 0.0, -19.62, 0.0)
    Vector3::Update(Instance\Up, 0.0, 1.0, 0.0)
    Vector3::Update(Instance\Down, 0.0, -1.0, 0.0)
    Vector3::Update(Instance\Right, 1.0, 0.0, 0.0)
    Vector3::Update(Instance\Left, -1.0, 0.0, 0.0)
    Vector3::Update(Instance\OutOfScreen, 0.0, 0.0, 1.0)
    Vector3::Update(Instance\IntoScreen, 0.0, 0.0, -1.0)
    Vector3::DefaultLocalAxis(Instance\AxisX, Instance\AxisY, Instance\AxisZ)
    Instance\SleepEpsilon = 0.3
    Instance\SleepEpsilon = 0.0
    
  EndProcedure

  ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  ; <<<<< The Reset operator <<<<<

  Procedure Reset()
    
    Vector3::Reset(Instance\Gravity)
    Vector3::Reset(Instance\HighGravity)
    Vector3::Reset(Instance\Up)
    Vector3::Reset(Instance\Down)
    Vector3::Reset(Instance\Right)
    Vector3::Reset(Instance\Left)
    Vector3::Reset(Instance\OutOfScreen)
    Vector3::Reset(Instance\IntoScreen)
    Vector3::Reset(Instance\AxisX)
    Vector3::Reset(Instance\AxisY)
    Vector3::Reset(Instance\AxisZ)
    Instance\SleepEpsilon = 0.0
    
  EndProcedure

EndModule

; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< Code generated in : 00.002 seconds (154000.00 lines/second) <<<<<
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

; <<<<<<<<<<<<<<<<<<<<<<<
; <<<<< END OF FILE <<<<<
; <<<<<<<<<<<<<<<<<<<<<<<
Another example, let's says you want to re-write the Kamera Class from the source code I have uploaded for this topic viewtopic.php?f=7&t=3555&hilit=Little3D ... 16#p489116 I prefer to start with some code already written like this one :

Code: Select all

; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; AUTOMATICALLY GENERATED CODE, DO NOT MODIFY
; UNLESS YOU REALLY, REALLY, REALLY MEAN IT !!
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; Code generated by : Dev-Module - V0.9.1
; Project name : the project name here
; File name : File name here
; File Version : 0.0.0
; Programmation : In progress
; Programmed by : StarBootics
; Creation Date : 27-05-2018
; Last update : 27-05-2018
; Coded for PureBasic : V5.62
; Platform : Windows, Linux, MacOS X
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

DeclareModule Kamera

  Declare AddInstance()
  Declare SelectInstance(P_Index.l)
  Declare FirstInstance()
  Declare LastInstance()
  Declare PreviousInstance()
  Declare NextInstance()
  Declare DeleteInstance()
  Declare ResetInstances()
  Declare ClearInstances()
  Declare InstanceIndex()
  Declare InstanceCount()
  Declare.l SearchInstancesByNear(P_Near.f)
  Declare.l SearchInstancesByFar(P_Far.f)
  Declare.l SearchInstancesByPitch(P_Pitch.f)
  Declare.l SearchInstancesByYaw(P_Yaw.f)
  Declare.l SearchInstancesByRoll(P_Roll.f)
  Declare.f GetNear()
  Declare.f GetFar()
  Declare GetPosition(*P_Position.Vector3::Vector3 = #Null)
  Declare.f GetPitch()
  Declare.f GetYaw()
  Declare.f GetRoll()
  Declare SetNear(P_Near.f)
  Declare SetFar(P_Far.f)
  Declare SetPosition(*P_Position.Vector3::Vector3)
  Declare SetPitch(P_Pitch.f)
  Declare SetYaw(P_Yaw.f)
  Declare SetRoll(P_Roll.f)
  Declare Initialize(P_Index.l)
  Declare Reset(P_Index.l)

EndDeclareModule

Module Kamera

  ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  ; <<<<< Structures declaration <<<<<

  Structure ClipPlane

    Position.Vector3::Vector3
    Plane.Plane::Plane[5]

  EndStructure

  Structure Instance

    Near.f
    Far.f
    Position.Vector3::Vector3
    Pitch.f
    Yaw.f
    Roll.f
    ClipZone.ClipPlane
    ExtClipZone.ClipPlane

  EndStructure

  Global NewList Instances.Instance()

  ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  ; <<<<< Multiple Instances Helper <<<<<

  Procedure AddInstance()

    AddElement(Instances())

  EndProcedure

  Procedure SelectInstance(P_Index.l)

    ProcedureReturn SelectElement(Instances(), P_Index)
  EndProcedure

  Procedure FirstInstance()

    ProcedureReturn FirstElement(Instances())
  EndProcedure

  Procedure LastInstance()

    ProcedureReturn LastElement(Instances())
  EndProcedure

  Procedure PreviousInstance()

    ProcedureReturn PreviousElement(Instances())
  EndProcedure

  Procedure NextInstance()

    ProcedureReturn NextElement(Instances())
  EndProcedure

  Procedure DeleteInstance()

    DeleteElement(Instances())

  EndProcedure

  Procedure ResetInstances()

    ResetList(Instances())

  EndProcedure

  Procedure ClearInstances()

    ClearList(Instances())

  EndProcedure

  Procedure InstanceIndex()

    ProcedureReturn ListIndex(Instances())
  EndProcedure

  Procedure InstanceCount()

    ProcedureReturn ListSize(Instances())
  EndProcedure

  Procedure.l SearchInstancesByNear(P_Near.f)

    Protected IsFoundAtIndex.l = -1

    ForEach Instances()

      If Instances()\Near = P_Near
        IsFoundAtIndex = ListIndex(Instances())
        Break
      EndIf

    Next

    ProcedureReturn IsFoundAtIndex
  EndProcedure

  Procedure.l SearchInstancesByFar(P_Far.f)

    Protected IsFoundAtIndex.l = -1

    ForEach Instances()

      If Instances()\Far = P_Far
        IsFoundAtIndex = ListIndex(Instances())
        Break
      EndIf

    Next

    ProcedureReturn IsFoundAtIndex
  EndProcedure

  Procedure.l SearchInstancesByPitch(P_Pitch.f)

    Protected IsFoundAtIndex.l = -1

    ForEach Instances()

      If Instances()\Pitch = P_Pitch
        IsFoundAtIndex = ListIndex(Instances())
        Break
      EndIf

    Next

    ProcedureReturn IsFoundAtIndex
  EndProcedure

  Procedure.l SearchInstancesByYaw(P_Yaw.f)

    Protected IsFoundAtIndex.l = -1

    ForEach Instances()

      If Instances()\Yaw = P_Yaw
        IsFoundAtIndex = ListIndex(Instances())
        Break
      EndIf

    Next

    ProcedureReturn IsFoundAtIndex
  EndProcedure

  Procedure.l SearchInstancesByRoll(P_Roll.f)

    Protected IsFoundAtIndex.l = -1

    ForEach Instances()

      If Instances()\Roll = P_Roll
        IsFoundAtIndex = ListIndex(Instances())
        Break
      EndIf

    Next

    ProcedureReturn IsFoundAtIndex
  EndProcedure

  ; <<<<<<<<<<<<<<<<<<<<<<<<<<<
  ; <<<<< The observators <<<<<

  Procedure.f GetNear()

    ProcedureReturn Instances()\Near
  EndProcedure

  Procedure.f GetFar()

    ProcedureReturn Instances()\Far
  EndProcedure

  Procedure GetPosition(*P_Position.Vector3::Vector3 = #Null)

    If *P_Position <> #Null
      Vector3::Copy(Instances()\Position, *P_Position)
    Else
      ProcedureReturn Instances()\Position
    EndIf

  EndProcedure

  Procedure.f GetPitch()

    ProcedureReturn Instances()\Pitch
  EndProcedure

  Procedure.f GetYaw()

    ProcedureReturn Instances()\Yaw
  EndProcedure

  Procedure.f GetRoll()

    ProcedureReturn Instances()\Roll
  EndProcedure

  ; <<<<<<<<<<<<<<<<<<<<<<<<
  ; <<<<< The mutators <<<<<

  Procedure SetNear(P_Near.f)

    Instances()\Near = P_Near

  EndProcedure

  Procedure SetFar(P_Far.f)

    Instances()\Far = P_Far

  EndProcedure

  Procedure SetPosition(*P_Position.Vector3::Vector3)

    Vector3::Copy(*P_Position, Instances()\Position)

  EndProcedure

  Procedure SetPitch(P_Pitch.f)

    Instances()\Pitch = P_Pitch

  EndProcedure

  Procedure SetYaw(P_Yaw.f)

    Instances()\Yaw = P_Yaw

  EndProcedure

  Procedure SetRoll(P_Roll.f)

    Instances()\Roll = P_Roll

  EndProcedure

  ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  ; <<<<< The Initialize operator <<<<<

  Procedure Initialize(P_Index.l)

    If P_Index = -1

      ForEach Instances()
        
        Instances()\Near = 0.0
        Instances()\Far = 0.0
        Vector3::Reset(Instances()\Position)
        Instances()\Pitch = 0.0
        Instances()\Yaw = 0.0
        Instances()\Roll = 0.0
        Vector3::Reset(Instances()\ClipZone\Position)
        
        For PlaneID = 0 To 4
          Plane::Reset(Instances()\ClipZone\Plane[PlaneID])
        Next

        Vector3::Reset(Instances()\ExtClipZone\Position)
        
        For PlaneID = 0 To 4
          Plane::Reset(Instances()\ExtClipZone\Plane[PlaneID])
        Next

        
      Next

      ClearList(Instances())

    Else

      If SelectElement(Instances(), P_Index)
        
        Instances()\Near = 0.0
        Instances()\Far = 0.0
        Vector3::Reset(Instances()\Position)
        Instances()\Pitch = 0.0
        Instances()\Yaw = 0.0
        Instances()\Roll = 0.0
        Vector3::Reset(Instances()\ClipZone\Position)
        
        For PlaneID = 0 To 4
          Plane::Reset(Instances()\ClipZone\Plane[PlaneID])
        Next

        Vector3::Reset(Instances()\ExtClipZone\Position)
        
        For PlaneID = 0 To 4
          Plane::Reset(Instances()\ExtClipZone\Plane[PlaneID])
        Next

        
        DeleteElement(Instances(), 1)

      EndIf

    EndIf

  EndProcedure

  ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
  ; <<<<< The Reset operator <<<<<

  Procedure Reset(P_Index.l)

    If P_Index = -1

      ForEach Instances()
        
        Instances()\Near = 0.0
        Instances()\Far = 0.0
        Vector3::Reset(Instances()\Position)
        Instances()\Pitch = 0.0
        Instances()\Yaw = 0.0
        Instances()\Roll = 0.0
        Vector3::Reset(Instances()\ClipZone\Position)
        
        For PlaneID = 0 To 4
          Plane::Reset(Instances()\ClipZone\Plane[PlaneID])
        Next

        Vector3::Reset(Instances()\ExtClipZone\Position)
        
        For PlaneID = 0 To 4
          Plane::Reset(Instances()\ExtClipZone\Plane[PlaneID])
        Next

        
      Next

      ClearList(Instances())

    Else

      If SelectElement(Instances(), P_Index)
        
        Instances()\Near = 0.0
        Instances()\Far = 0.0
        Vector3::Reset(Instances()\Position)
        Instances()\Pitch = 0.0
        Instances()\Yaw = 0.0
        Instances()\Roll = 0.0
        Vector3::Reset(Instances()\ClipZone\Position)
        
        For PlaneID = 0 To 4
          Plane::Reset(Instances()\ClipZone\Plane[PlaneID])
        Next

        Vector3::Reset(Instances()\ExtClipZone\Position)
        
        For PlaneID = 0 To 4
          Plane::Reset(Instances()\ExtClipZone\Plane[PlaneID])
        Next

        
        DeleteElement(Instances(), 1)

      EndIf

    EndIf

  EndProcedure

EndModule

; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
; <<<<< Code generated in : 00.001 seconds (427000.00 lines/second) <<<<<
; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

; <<<<<<<<<<<<<<<<<<<<<<<
; <<<<< END OF FILE <<<<<
; <<<<<<<<<<<<<<<<<<<<<<<
That being said it doesn't changing anything about programming a game engine from scratch, a lot of code and a lot of time required no matter what tools you might have at your disposal !

Best regards.
StarBootics
The Stone Age did not end due to a shortage of stones !
User avatar
TI-994A
Addict
Addict
Posts: 2512
Joined: Sat Feb 19, 2011 3:47 am
Location: Singapore
Contact:

Re: Suitability for a game

Post by TI-994A »

StarBootics wrote:...it doesn't changing anything about programming a game engine from scratch, a lot of code and a lot of time required no matter what tools you might have at your disposal !
Of course not. As mentioned, it's simply an unrelated segue, alluding to prolonged product testing/debugging and delayed releases.

Nevertheless, the size of any project should not be gauged purely by the lines of code, but rather by its overall architecture. Well-designed and well-coded programs effectively modulate and reuse, implementing lazy models, minimising memory footprints and CPU overheads, to ultimately optimise execution. Larger code takes more time to load, unnecessarily consuming more resources, which could then result in poor performance.

Again, simply general allusions. :wink:
Texas Instruments TI-99/4A Home Computer: the first home computer with a 16bit processor, crammed into an 8bit architecture. Great hardware - Poor design - Wonderful BASIC engine. And it could talk too! Please visit my YouTube Channel :D
marc_256
Enthusiast
Enthusiast
Posts: 742
Joined: Thu May 06, 2010 10:16 am
Location: Belgium
Contact:

Re: Suitability for a game

Post by marc_256 »

Hello all,

There is a lot of good advice in these posts/replays,

Well ...
First at all, I love PB, and the developers team.
But, for developing a game like this, (I liked to develop one also,)
you will need a lot of other programs.

After years of 3D work, I was dreaming of developing a big (very big) 3D game.
I had a lot of experience in 3D CAD/CAM, but not at all in 3D gaming development,
and it cost me 5 years of my live to start a 3D game with PB.
I almost lost my company after all these years.
I tried PB for the multi platform, and 3D ogre integration.

But today ...
I can tell you this:

First at all, OGRE is not a game engine at all, read this page ...
https://www.ogre3d.org/about
it is more a 3D render engine.

You will need a lot of other programs,
and why, PB is to limited to do a job like creating a 3D gaming.

3D gaming is not only programming,
you need 3D objects,
sounds,
music,
3D engine,
3D controls,
3D renderer (ogre),
3D knowledge and understanding,
physics,
knowledge of light and camera control,
and lot more ...

So, I restarted my development with this development parts:

- a good 3D CAD program to design detailed 3D objects (buying it cost a lot of money, and learn to use it months of work)

- I use Blender to edit/position/rotate/scale and create 3D scenes (Free but a lot of time to learn and use it)

- I wrote a converter to convert blender export collada to OGRE .mesh data (cost a lot of time to write and debug it)
(works fine now to convert data to data section in PB), but PB data section is to limited to use this kind of use.

- write a motion engine to control all these objects in the created worlds ...
from light, camera, fixed objects, moving objects, bones, animations, physics ...

- I brought a sound editing program to create sounds (no music), still have to learn this.

- PB internal editor becomes very, VERY slow, with big programs and thousands of variables ...
PB has no possibility to use upper and lowercase sensitive variable names,
so, a good external editor can be notepad++, but PB is and was never backwards compatible,
you will need to upgrade your commands in NP++.
again, this takes time.

- and if you will urn some money, you will need, a good story, not copying others ...

- ...

conclusion:

- I love PB, but for me, with PB I'm missing this little extra in every direction, so i'm blocked.
and is always late in upgrading, like for example ogre 2.1 version.
With all respect for Fred and the team, but PB is to wide and not game specific enough to do the job.
- I'm studying C++ and ASM now to integrate (fast working) external software.
- and above all, you will need a lot of experience in creating 3D objects and worlds.

And this ...
the investment in hardware ...
minimum 2 monitors needed,
backup HDDs for all the work,
- ...

my latest investment is a graphic tablet (my old one was to small and low resolution)

BUT...
I love creating 3D objects and worlds ... 8)
I will never give up ... :D

greetings,
marc
Last edited by marc_256 on Mon May 28, 2018 8:28 am, edited 1 time in total.
- every professional was once an amateur - greetings from Pajottenland - Belgium -
PS: sorry for my english I speak flemish ...
Fred
Administrator
Administrator
Posts: 16618
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: Suitability for a game

Post by Fred »

Unity is the perfect fit if you want to create a 3D game which runs everywhere with a modern tech. The 3D engine found in PB can be used to do game as well, but it's not its main goal. It's more a way to render a 3D scene using the the way you know (commandset similar to other libs) for any kind of use.
Post Reply