low poly

Not the best of code – but incase anyone else wants it….

;set up fps counter
fps_milli=MilliSecs(): fps_counter=0: update_frequency=10

Graphics3D 800,600,32
SetBuffer BackBuffer()

light=CreateLight()
LightColor light,50,50,170
AmbientLight 51,51,51

piv=CreatePivot()
cam=CreateCamera()

PositionEntity cam,0,0,-50
final=LoadMesh(andquot;2.xandquot;)
SeedRnd MilliSecs()

Type ship
Field X
Field Y
Field model
Field xturn
Field yturn
Field zturn
End Type

For tempx = 0 To 99
andnbsp; andnbsp; andnbsp;alien.ship = New ship
andnbsp; andnbsp; andnbsp;alienx = 25-Rnd(50)
andnbsp; andnbsp; andnbsp;alieny =25-Rnd(50)
andnbsp; andnbsp; andnbsp;alienxturn=Rnd(10)/5-1
andnbsp; andnbsp; andnbsp;alienyturn=Rnd(10)/5-1
andnbsp; andnbsp; andnbsp;alienzturn=Rnd(10)/5-1
andnbsp; andnbsp; andnbsp;alienmodel=CopyMesh(final)
Next

For alien.ship = Each ship
andnbsp; andnbsp; andnbsp;PositionEntity alienmodel,alienx,alieny,0
Next

While Not KeyDown(1)
For alien.ship = Each ship
andnbsp; andnbsp; andnbsp;TurnEntity alienmodel,alienxturn,alienyturn,alienzturn
Next

andnbsp; andnbsp; andnbsp;UpdateWorld
andnbsp; andnbsp; andnbsp;RenderWorld
; fps counter*********************
andnbsp; andnbsp; andnbsp;fps_counter=fps_counter+1
andnbsp; andnbsp; andnbsp;If fps_counter=update_frequency
andnbsp; andnbsp; fps=1000/Float(((MilliSecs()-fps_milli))/update_frequency)
andnbsp; andnbsp; fps_milli=MilliSecs()
andnbsp; andnbsp; fps_counter=0
andnbsp; andnbsp; EndIf

; print fps**************
Text 0,0,andquot;FPS:andquot;+fps

andnbsp; andnbsp; andnbsp;Flip
Wend

EndGraphics
End

a bit of a texture test and a bit of a play…
model posted to Richard incase anyone wants to have a look.

about 220 faces (can’t remember)

Looks great.Keep playing
Harold

Nice!
The perfect gift for Valentine’s day… andnbsp;;D

Bye.

Yes, I agree.

Fine model, excellent texture…

…238? You could then squeeze a hundred of
these in one render? andnbsp;:oops: That would open
possibilities, it would… andnbsp;8)

— Markku

and I forgot again andnbsp;:-[ it is 238 faces.

Thanks for the comments.

Blitz reports 244 faces….

Anyway just tried a quick test in blitz and I had 100 ships moving at once on screen at 38 frames per second on my 900 athlon, gforce4 mx 440, win me system <!– s:) –><img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile" /><!– s:) –>

You must be logged in to reply in this thread.

9 posts