Author Topic: 3D Entity System [DE]  (Read 171337 times)

Offline Quentin

  • Prof. Inline
  • *****
  • Posts: 915
    • View Profile
Re: 3D Entity System [DE]
« Reply #300 on: 2009-Sep-28 »
naja, war ja wohl so gewollt von dir :)

Vorschlag:

Neues Attribut "deleted"

EntityEnable --> setzt Enabled auf true/false --> wird bei false duch EntityAddInternal NICHT ?berschrieben
EntityFree --> setzt deleted auf true --> kann ?berschrieben werden.

Offline bigsofty

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 2793
    • View Profile
Re: 3D Entity System [DE]
« Reply #301 on: 2010-Feb-05 »
Did this come out of beta, anyone been using it?

I noticed when "[""]" are used it crashed the demo?
Cheers,

Ian.

“It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration.”
(E. W. Dijkstra)

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10852
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: 3D Entity System [DE]
« Reply #302 on: 2010-Feb-05 »
Does it crash, still?

Offline bigsofty

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 2793
    • View Profile
Re: 3D Entity System [DE]
« Reply #303 on: 2010-Feb-05 »
Yep, maybe I used the wrong link? I used the one at the beginning of this thread?
Cheers,

Ian.

“It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration.”
(E. W. Dijkstra)

Offline Moru

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1793
    • View Profile
    • Homepage
Re: 3D Entity System [DE]
« Reply #304 on: 2010-Feb-05 »
I used it when it was still fresh and it was very easy to use but I haven't tried it since then except for trying to add X_sprites. That test failed since they are displayed centered on the lower middle of the sprite.

Offline Hemlos

  • To boldy go where no pixel has gone before!
  • Global Moderator
  • Prof. Inline
  • *******
  • Posts: 1622
  • Particle Hawk
    • View Profile
Re: 3D Entity System [DE]
« Reply #305 on: 2010-Feb-08 »
Does it crash, still?

3des crashes on me when i use the button commands ][
Volume_of_Earth(km^3) = 4/3*3.14*POW(6371.392896,3)

Offline codegit

  • Dr. Type
  • ****
  • Posts: 270
    • View Profile
Re: 3D Entity System [DE]
« Reply #306 on: 2010-Feb-09 »
Is the link at the start of this thread the correct and latest version?  :)
------------------------------------------
1 X Acer TravelMate 4270, laptop, XP PRO
1 X Dell Studio 17 laptop, Windows 7
1 X MacBook Pro 2,2 GHz Core 2 Duo, 2 GB RAM, 160 GB HDD, 9400M
2 X iTouch
1 X HTC Desire (Android 2.1)
iPad soon to be added

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10852
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: 3D Entity System [DE]
« Reply #307 on: 2010-Feb-09 »
OK - my fault. It was a mixture of several bugs. I fixed them all.

I'll update the sample in post #1 and will provide an update for GLBasic tonight, that fixes the crash (and also memory consumption. The GENX_OBJ did not use free slots when you loaded an object "" or X_OBJSTART; X_OBJEND).

Offline bigsofty

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 2793
    • View Profile
Re: 3D Entity System [DE]
« Reply #308 on: 2010-Feb-09 »
Thanks Gernot  :good:, downloaded the new sample, it still crashes but this is down to not having the new update, I'll re-try it after I get the GLB update.
Cheers,

Ian.

“It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration.”
(E. W. Dijkstra)

Offline bigsofty

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 2793
    • View Profile
Re: 3D Entity System [DE]
« Reply #309 on: 2010-Feb-10 »
No update last night, problems?
Cheers,

Ian.

“It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration.”
(E. W. Dijkstra)

Offline codegit

  • Dr. Type
  • ****
  • Posts: 270
    • View Profile
Re: 3D Entity System [DE]
« Reply #310 on: 2010-Feb-11 »
I gave this a quick test. I had problems with EntityLoadTexture and EntityApplyTexture. I was unable to load a .png and then texture a cube.  :(
------------------------------------------
1 X Acer TravelMate 4270, laptop, XP PRO
1 X Dell Studio 17 laptop, Windows 7
1 X MacBook Pro 2,2 GHz Core 2 Duo, 2 GB RAM, 160 GB HDD, 9400M
2 X iTouch
1 X HTC Desire (Android 2.1)
iPad soon to be added

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10852
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: 3D Entity System [DE]
« Reply #311 on: 2010-Feb-11 »
Small example, please?

Offline Quentin

  • Prof. Inline
  • *****
  • Posts: 915
    • View Profile
Re: 3D Entity System [DE]
« Reply #312 on: 2010-Feb-11 »
for me it works as expected. Where did you get a crash? And about the .png file. Are you able to display it with DRAWSPRITE?

Offline codegit

  • Dr. Type
  • ****
  • Posts: 270
    • View Profile
Re: 3D Entity System [DE]
« Reply #313 on: 2010-Feb-12 »
SETCURRENTDIR("Media") /// NOTE bump.png is in the MEDIA directory
TestJim()

FUNCTION TestJim:

   camera=EntityCreateCamera()
   EntityEnable(camera, TRUE)
   EntitySetCameraRange(camera,1,4000)


   light = EntityCreateLight(RGB(255,255,255) )
   cube = EntityCreateCube(1)

   EntitySetPosition(camera,0,0,-10)
   EntityParent(light, camera)
   jtex = EntityLoadTexture("bump.png")
   notex=EntityMakeNullTexture()
   EntityApplyTexture(cube,jtex,notex)
   //EntitySetAlpha(cube,0.5)

   WHILE TRUE
      // Draw all entites, using entity camera
      IF (KEY(200))
         EntityMove(camera,0,0,0.2)

      ENDIF
      IF (KEY(208))
         EntityMove(camera,0,0,-0.2)

      ENDIF
      IF (KEY(203))

         EntityRotate(camera,0,1,0)

      ENDIF
      IF (KEY(205))

         EntityRotate(camera,0,-1,0)

      ENDIF
      EntityRotate(cube,1,0,0)
      EntityDrawSystem()
      SHOWSCREEN

   WEND

ENDFUNCTION
« Last Edit: 2010-Feb-12 by codegit »
------------------------------------------
1 X Acer TravelMate 4270, laptop, XP PRO
1 X Dell Studio 17 laptop, Windows 7
1 X MacBook Pro 2,2 GHz Core 2 Duo, 2 GB RAM, 160 GB HDD, 9400M
2 X iTouch
1 X HTC Desire (Android 2.1)
iPad soon to be added

Offline codegit

  • Dr. Type
  • ****
  • Posts: 270
    • View Profile
Re: 3D Entity System [DE]
« Reply #314 on: 2010-Feb-12 »
Are you able to display it with DRAWSPRITE?

YES ....  8)

SETCURRENTDIR("Media")

LOADSPRITE "bump.png",1
DRAWSPRITE 1,20,20
SHOWSCREEN
WHILE TRUE
WEND
« Last Edit: 2010-Feb-12 by codegit »
------------------------------------------
1 X Acer TravelMate 4270, laptop, XP PRO
1 X Dell Studio 17 laptop, Windows 7
1 X MacBook Pro 2,2 GHz Core 2 Duo, 2 GB RAM, 160 GB HDD, 9400M
2 X iTouch
1 X HTC Desire (Android 2.1)
iPad soon to be added