FMC:Phoniex Alpha Test 2

Community Forums/Showcase/FMC:Phoniex Alpha Test 2

AntonyWells(Posted 2006) [#1]
Updated version, no longer uses vc2005 dlls so should run ok on the majority of machines.

http://dreamspace.banishedstudios.com/Aurora.rar (7mb)

3D Voodoo by Adrian Tysoe
Engine Monkey:Antony Wells
Demo Man:Damien Sturdy



Sceenies:


Real time physic applied to all boxes and real time self shadowing stencil shadows.





WASD To drive, mouse to look, lmb to fire. Esc to quit.


AdrianT(Posted 2006) [#2]
might work, we havent tested it on any systems that havent been through a windows update yet. Works on the two systems that wouldn't work yesterday.

If it doesn't work can you state which version of windows, and brand Graphics card you have?


Alienforce(Posted 2006) [#3]
Wow! Thanks.
Works for me. DellM70 XP sp2


kenshin(Posted 2006) [#4]
Wicked!! Works fine on my sig.


Robert Cummings(Posted 2006) [#5]
It works ok. It seems wildly unplayable on my pc though. Could this have something to do with my mouse being a G5?

The framerate seemed to be around 30 ish on my x800xT dual core cpu system.


Beaker(Posted 2006) [#6]
Considering I was running it on an nVidia GF440mx, it wasn't too bad. Apart from being quite slow at times, a few problems you should take note of:

On DX:
Shadows don't always overlap nicely.
The skybox has parts missing, due to draw distance not being high enough (I think).

On both DX and GL:
The glowy thing above the door isn't drawn in the right order (seems like its not just me, looking at your pics above).

The speed was mostly affected when all the boxes were on screen (I think).


AdrianT(Posted 2006) [#7]
30ish? My athlon 1200 geforce3, 256mb system ram beats that in DX9!!! I get only 15-25FPS in GL though

My a64 3200+ with 1gb ram, and a 6600GT 128mb AGP gets around 140fps in DX9 and high 70's in GL

Not bad considering everything including bullets and blocks cast shadows. I havent touched the level in a couple of days and need to fix the glowy bits, I messed those up while trying to stop them recieving shadows.


Dustin(Posted 2006) [#8]
That was enjoyable. Ran it at 1920x1200 and it was smooth as silk (AMD 64 3000 & GeForce 7800).

Seemed to 'catch' on the geometry when I'd go off the ramps and land on the top of the central ring sometimes.

How about an adjustment for mouse speed? Right now it's just way too fast for me to control it properly.

Those AI bots are relentless!!! But I guess that's a good thing right?

Very nice for an 'alpha' test! I'll be following your progress on this BMax 3D engine for sure!


Stevie G(Posted 2006) [#9]
Looks good and physics seem nice but the controls are dreadful ... I never touched the mouse and was in a continuous spin most of the time .. maybe I'm just shYte at it though :(

I didn't get any shadows either .. probably because of my ageing gfx440?

Stevie


AdrianT(Posted 2006) [#10]
heh, Damien and I must have similar mouse setups as we get fairly decent controls till we get hit. The demo will be started from scratch again soon, when we start on the actual game. This stuff was thrown together mostly to test the engine features as we went along.


Red Ocktober(Posted 2006) [#11]
ran like before on the 2 xp machines... and this time also ran on the win2k/733mHz /radeon9200 system...

a lil slow on a 733mHz machine, but still workable and playable...

nice job you guys... what did you discover was the problem... curious...

--Mike


Damien Sturdy(Posted 2006) [#12]
From the other thread:

...we tracked the problem down to vc2005 dlls not working on old machines, so we switched to one dll compiled in 2003, which worked



Mikele(Posted 2006) [#13]
Works fine but with few issues in DX (shadows and sky issues like Beaker said), much better in OGL.
I tested this on P4/3GHZ + GF4200Ti/128


AdrianT(Posted 2006) [#14]
seems like older cards have some kind of clipping range problem, or are at least rendering differently. By 4/5 year old GF3 system has the clipping issue on the skybox too, whilst my newer system doesn't.


Booticus(Posted 2006) [#15]
Works great here. Excellent!


puki(Posted 2006) [#16]
I haven't had a go yet - but this certainly looks interesting.


AntonyWells(Posted 2006) [#17]
70 replies for a demo that didn't work, 16 for one that did. That says something about this place :)


Red Ocktober(Posted 2006) [#18]
That says something about this place :)


... and yet you keep coming back.

--Mike


Damien Sturdy(Posted 2006) [#19]

70 replies for a demo that didn't work, 16 for one that did. That says something about this place :)



Unfortunately alot of people won't bother since the original didn't work. And a lot of others will download, play, and then when they get bored delete it or whatever, but if it works you've got more chance of the players not posting a response.

if it *didn't* work, they'll come and complain so we can fix it. :)


walu(Posted 2006) [#20]
on 17 April,we paid all via gbp.swreg.org , to buy" Aurora Game SDK",but haven't recvd yet, pls contact us on walu@... or send us the software immediately !


Damien Sturdy(Posted 2006) [#21]
Ant- it would be useful if you put an Email address in your profile so people can contact you from here if they have problems.


DrDerekDoctors(Posted 2006) [#22]
GeForce 6600 - Blue-screened-super-crash.


Damien Sturdy(Posted 2006) [#23]

GeForce 6600 - Blue-screened-super-crash.



Ah. hmmm. When did it crash?


DrDerekDoctors(Posted 2006) [#24]
Ran for about a second and then FOOM!


Naughty Alien(Posted 2006) [#25]
nVidia 5600FX here...at DX9.0 renderer I experianced David Coperfield dissapear trick..on OGL working fine without problems at all and very smooth..my question is..why this engine is called Aurora, if on my window staying OGRE renderer window, as well as OGRE initialization window?? Whats the deal? You selling Open source engine??


Damien Sturdy(Posted 2006) [#26]
No, Aurora is powered by Ogre. It is not just Ogre :-) Nor is it technically 100% complete yet. I imagine Ant will add a way to set the window titles soon.


AntonyWells(Posted 2006) [#27]

on 17 April,we paid all via gbp.swreg.org , to buy" Aurora Game SDK",but haven't recvd yet, pls contact us on walu@... or send us the software immediately !


I recall sending you the package along with everyone else. Give me another e-mail address that can take 10mb+ e-mails with the rar extension. Or exe.

You selling Open source engine??


Everything I'm doing is legal, I only have to release my source for the wrapper if I statically link to ogre, which I do not.

What people are paying is not ogre it's self, but all my weeks of man hours coding, testing it, and continued support, updates and bug testing. In total hundreds of man hours of work for 40 pound. It's a fair price. And it's about to be even fairer once I release the C#,C++ versions, both of which are free to existing bmax owners.


Naughty Alien(Posted 2006) [#28]
..ok, appart from confusing OGRE windows, demo looking very nice...can you tell me when you planning to 100% finish engine, since Cyg said its not 100% done?


Damien Sturdy(Posted 2006) [#29]
Features are getting added all the time, just like ogre itself. When I said i don't think it was 100% complete, what i meant by that was that It's always being worked on to improve it.


boomboom(Posted 2006) [#30]
It worked fine here (in both modes). I have a Geforce 6600GT


walu(Posted 2006) [#31]
ok


AntonyWells(Posted 2006) [#32]
Sent, let me know if you got it ok.


walu(Posted 2006) [#33]
Check


walu(Posted 2006) [#34]
ok


AdrianT(Posted 2006) [#35]
Ant, you do have to state that your using ogre in your product as well, and provide a link to the source, like www.ogre3d.org. There's a thread about this very subject on the ogre forums, Otherwise your perfectly legal.

As far as fewer replies go. Thats why you shouldn't release stuff prematurely if you want extensive feedback. Much better to be close to final and then release something when it's almost done. You only really get one chance, we will have to wait a couple of months to get another go at some constructive criticism me thinks.

Thats another reason hype is typicaly destructive, when you hype something prematurely and release something that doesn't live up to expectations, people lose interest real fast and chances are, many won't bother later.


Naughty Alien(Posted 2006) [#36]
hey Ant..can you release Bmax source of this demo...I wanna see how complex/simple code looking...is that possible?


AntonyWells(Posted 2006) [#37]
I'd rather not release the source to this demo because it's just rushed prototype code and not indicative of the nice oo manner in which you can code with Aurora.

We're supposed to be starting the game portion over again today so next public release I'll almost certainly release the source code provided Damien has no issue with this as he'll be co-writing it with me.


Damien Sturdy(Posted 2006) [#38]
Sorry, I'm not releasing source to this one. As ant said, It was rushed and extremely messy :D


ImaginaryHuman(Posted 2006) [#39]
It might help some people


Damien Sturdy(Posted 2006) [#40]
I don't mind throwing a simple hover sample together, but code thats based on our future product might be best kept under wraps for now.

The code is over-complicated and uses a few workarounds that just makes the code look worse.

What i'll do, is in my spare time Recreate this demo with primitives. JV-ODE has been updated (Thanks Viper!) and the workaround have been fixed. You will need the Max version of JV-ODE to use it though since that gives us better physics control.

I'll do this in the next couple of weeks, been bogged down a bit at the moment!


Naughty Alien(Posted 2006) [#41]
..okay..so, where I can see complete list of features supported by now? Is there any water reflection/refraction demo, with shaders?? Since Aurora is sitting on the top of the OGRE, is that mean that everything builted by Freeworld3D is ready to use in Aurora, even water features from Freeworld3D??


Paul "Taiphoz"(Posted 2006) [#42]
really dont like the control system at all, I always ended up with the mouse way over to the right of my mouse mat and then having to spin the ship like a nutter to get it back center.

the GFX, game play and basic game idea looks prity sweet tho, just fix or change the control system.

I would also recomend reducing the impact of the bullet thingis on the ship, you get bounced about way to much and it stops you moving.


AntonyWells(Posted 2006) [#43]
Yeah the control system seems to be universally hated so far, definitely back to the drawing board on that one :)


..okay..so, where I can see complete list of features supported by now? Is there any water reflection/refraction demo, with shaders?? Since Aurora is sitting on the top of the OGRE, is that mean that everything builted by Freeworld3D is ready to use in Aurora, even water features from Freeworld3D??




Check the site for a relatively complete list of features.

I have no idea what you're refering to with FreeWorld3D? Is it abstraction layer to ogre or a plugin? Either way since I've not heard of it it's safe to assume I've not wrapped it.

Here's a early look of the newly wrote game demo code, this time my me. (Damien will be co-writing it with me though, he's just not around at the mo)

Strict
'----------------------------=
'
'    Full Metal Conflict 2 : Phoniex
'	
'
'  Coded by Antony Wells & Damien Sturdy
'
' (c)Kinetic Realities 2006
'	
'----------------------------=

'---[ Imports ]---

Import "Aurora.bmx"

Rem
	[ Game ] Class
	
	:Controls general game settings and initialization

End Rem
Type TGame

	'Free Resources
	Function FreeResources()
	
		VisualLevel.Dispose()
		ProxyLevel.Dispose()
		Actors.Dispose()
		PickUps.Dispose()
	
	End Function
	
	'Initialize the game
	Function Initialize()
		
		VisualLevel = TEntityGroup.Create("Level Visuals")
		ProxyLevel = TEntityGroup.Create("Level Proxies")
		Actors = TEntityGroup.Create("Actors")
		PickUps = TEntityGroup.Create("Pick Ups")
		
		InitializeOde()
		
		
	End Function
	
	'Initialize the ode wrapper and set up spaces and contact gruops.
	Function InitializeOde()
		
		World = OWorld.Create()
		Space = OSpace.Create()
		scenespace = ospace.Create()
		pickspace:Ospace = Space
		playerspace:ospace=ospace.Create()
		Group = OContactGroup.Create()
		dWorldSetQuickStepNumIterations (world.world,16)
		World.SetAutoDisable( True )
		World.SetGravity( OVector3.Create(0,-1.98,0) )
		OOde.SetContactMode( ContactBounce )
		Oode.SetContactBounce( 0.8 )
		Oode.SetContactFriction( 1 )
		todecontroller.Init()

	End Function
	
	'Initliaze the display window/screen.
	Function InitDisplay()
		
		Display = TDisplay.Create()
		Display.OpenScreen()
		cam = TCamera.Create()
		TGui.Init( Cam )
				
	End Function
	
	'Load a level 
	Function LoadLevel(file:String)
		
		TSceneLoader.LoadBest( file )
		
		
		Display.ShadowMode( Shadows_StencilMod )
		
	End Function
	
	
	'---[ Game Related Globals ]
	Global Display:TDisplay
	Global cam:TCamera
	Global VisualLevel:TEntityGroup
	Global ProxyLevel:TEntityGroup
	Global Actors:TEntityGroup
	Global PickUps:TEntityGroup
	
	'---[ Ode related globals ]
	Global World:OWorld 
	Global Space:OSpace 
	Global SceneSpace:OSpapce 
	Global PickSpace:OSpace 
	Global PlayerSpace:OSpace 
	Global Group:OContactGroup 
	 
	
	
End Type


Rem

	[ App ] Clas
	
	Controls and starts the application.

End Rem
Type TApp

	'App entry point.
	Function Go()
		
		TGame.Initialize()	
		TGame.InitDisplay()
		
		Repeat
			
		Until TInput.KeyDown(Key_Escape)
		
		Quit()	
							
	End Function
	
	Function Quit()
	
		TGame.FreeResources()
	
	End Function
	
	
End Type

Rem

	Begin the application

End Rem
TApp.Go()




Naughty Alien(Posted 2006) [#44]
Freeworld3D is world creation tool, whats capable to load and export OGRE .mesh files(B3D too) as well as excellent water based on OGL pixel shader...so, if you have some time, take a look on to this beautiful world creation tool, and tell me can I use Aurora with it..also, since OGRE is basement for Aurora, is that mean i can use all OGRE exporters for 3DSMAX and use it for fusion with Aurora??

http://www.freeworld3d.org


Naughty Alien(Posted 2006) [#45]
.sorry Ant, but on link for Official forums, i cant find any info about features...


Braincell(Posted 2006) [#46]
What the hell is Aurora? Oh... i remember now... that engine that the guy who never completes engines was writing.


Damien Sturdy(Posted 2006) [#47]
Hehe, Ant, you haven't added the website to your sig! NA, thats where the feature list is.

NA, yes, Evak is using 3DSMAX to create levels for Aurora. The features of the ogre format and the 3DSMAX Exporter are part of the reason we decided to use Ogre as the renderer for Aurora.


Naughty Alien(Posted 2006) [#48]
..aha...now you make me interested in to this...Cyg, is there any doc files about Aurora where i can take a look at command reference or something??


AntonyWells(Posted 2006) [#49]
Online docs.

http://dreamspace.banishedstudios.com/AuroraDocs/index.html

Official Website
http://dreamspace.banishedstudios.com/Aurora3DEngine.htm


AntonyWells(Posted 2006) [#50]
D, do I have the latest build of your demo? I'm basing most of my initial code on it so wanna be sure i'm up to date.


Naughty Alien(Posted 2006) [#51]
hey And..are you really serious this time about this stuff..I'm not provocating you really, I just wanna know is it this time really serious work for this or just an adventure..I'm asking becouse i am interested, really...


AntonyWells(Posted 2006) [#52]
As serious as you are about your job since this is mine. Working with ad, and damien is my job in other words even if we're not getting paid for it yet.


AntonyWells(Posted 2006) [#53]
Another look at the new game source, starting to take shape now.

Not sure if I'll be able to release any more publically, thsi isn't just my code so dunno. I don't see no harm in it personally. At least for now.
Strict
'----------------------------=
'
'    Full Metal Conflict 2 : Phoniex
'	
'
'  Coded by Antony Wells & Damien Sturdy
'
' (c)Kinetic Realities 2006
'	
'----------------------------=

'---[ Imports ]---

Import "Aurora.bmx"

Rem
	[ Game ] Class
	
	:Controls general game settings and initialization

End Rem
Type TGame

	'Free Resources
	Function FreeResources()
	
		VisualLevel.Dispose()
		ProxyLevel.Dispose()
		Actors.Dispose()
		PickUps.Dispose()
		For Local tm:oTriMesh = EachIn TriMeshes
			tm.dispose()
		Next
		trimeshes.clear()
			
	End Function
	
	'Initialize the game
	Function Initialize()
		
		VisualLevel = TEntityGroup.Create("Level Visuals")
		ProxyLevel = TEntityGroup.Create("Level Proxies")
		Actors = TEntityGroup.Create("Actors")
		PickUps = TEntityGroup.Create("Pick Ups")
		TriMeshes = CreateList()
		InitializeOde()
		
		
	End Function
	
	'Initialize the ode wrapper and set up spaces and contact gruops.
	Function InitializeOde()
		
		World = OWorld.Create()
		Space = OSpace.Create()
		scenespace = ospace.Create()
		pickspace:Ospace = Space
		playerspace:ospace=ospace.Create()
		Group = OContactGroup.Create()
		dWorldSetQuickStepNumIterations (world.world,16)
		World.SetAutoDisable( True )
		World.SetGravity( OVector3.Create(0,-1.98,0) )
		OOde.SetContactMode( ContactBounce )
		Oode.SetContactBounce( 0.8 )
		Oode.SetContactFriction( 1 )
		todecontroller.Init()
		OHelper.SetActiveSpace( Space )
		dSetInternalSpaceCollideMode(0)


	End Function
	
	'Initliaze the display window/screen.
	Function InitDisplay()
		
		Display = TDisplay.Create()
		Display.OpenScreen()
		
				
	End Function
	
	'Load a level 
	Function LoadLevel(file:String)
		
		TSceneLoader.LoadBest( file )
		Display.ShadowMode( Shadows_TextureMod )
		
		cam = TCamera.Create()
		TGui.Init( Cam )
		cam.position(0,70,70)
		cam.lookat(0,0,0)
		
		Local Trimesh:oTrimesh
		Local collisionScene:TSceneLoader = New TSceneLoader 
		Local colScene:TScene = collisionScene.Loadsafe("Media/"+file)
		For Local v:TEntity =EachIn colscene.entities
			v.castshadows( False )
			v.position(0,-10000,0)
			'v.visible( False )
			'trimesh:oTrimesh=oTrimesh.CreateTriMesh(Space.Space,v.filename)
			'trimeshes.addlast( triMesh )
	
		Next
		
		
	End Function
	
	
	'---[ Game Related Globals ]
	Global Display:TDisplay
	Global cam:TCamera
	Global VisualLevel:TEntityGroup
	Global ProxyLevel:TEntityGroup
	Global Actors:TEntityGroup
	Global PickUps:TEntityGroup
	
	'---[ Ode related globals ]
	Global World:OWorld 
	Global Space:OSpace 
	Global SceneSpace:OSpace 
	Global PickSpace:OSpace 
	Global PlayerSpace:OSpace 
	Global Group:OContactGroup 
	Global TriMeshes:TList
	 
	
	
End Type

Rem 
	
	[ Actor ] Class
	
	Base Abstract class for all actor classes.

End Rem
Type TActor Abstract
	
	Field Visual:TEntity
	Field Body:OBody
	Field Ent:OEntity
	Field isBase
	Field mesh:String
	Field bWidth#,bHeight#,bDepth#
	Field bWeight#
	Field name:String
	Function AddBase(in:TActor )
		bases.addlast( in )
	End Function
	Function FindBase:TActor(name:String)
		For Local base:TActor = EachIn bases
			If base.name.tolower() = name.tolower()
				Return base
			EndIf
		Next
		Return Null
	End Function
	
	Method CreateResources()
	End Method
	
	
	Function Spawn:TActor( from:String,x#,y#,z# )
		Local base:Tactor = tactor.findbase( from )
		If base = Null	
			RuntimeError from+" Does not exist. Unable to spawn."
		End If
		Return base.spawn( x,y,z )
	End Function

	Method Spawn:TActor( x#,y#,z# ) Abstract
	
	Global Bases:TList
	
End Type
TActor.Bases = CreateList()

Rem
	
	[ Ship ] Class Extends [ Actor] Class
	
	Ship class. Used for all hovering vehicles.
	
End Rem
Type TShip Extends TActor Final 
	
	Function CreateBase:TShip(name:String,mesh:String,width#,height#,depth#)
		
		Local out:TShip = New tship
			
			out.bwidth = width
			out.bheight = height
			out.bdepth = bdepth
			out.mesh = mesh
			out.name = name
			out.isbase = True
			tactor.addBase( out )
			
		Return out
				
	End Function
	
	Method Spawn:TActor(x#,y#,z#)
		
		Local out:TShip = New TShip
		out.CreateResources()
		Return out
		
	End Function
	
End Type

Rem

	[ App ] Clas
	
	Controls and starts the application.

End Rem
Type TApp
	'Create Demo Resources
	Function CreateDemoResources()
		TShip.CreateBase( "Hammer","hammer.mesh",3,5,4 )
	End Function
	
	'App entry point.
	Function Go()
		
		TGame.Initialize()	
		TGame.InitDisplay()
		TGame.LoadLevel("scene.OSM")
		CreateDemoResources()	
		Repeat
			
			Self.Update()
			
			Self.Render()
						
		Until TInput.KeyDown(Key_Escape)
		
		Quit()	
							
	End Function
	
	Function Update()
		
		tgame.cam.pitch( - tinput.mouseyspeed() )
		tgame.cam.yaw( - tinput.mousexspeed() )
		If tinput.keydown( KEY_W )
			tgame.cam.move(0,0,2 )
		End If
		If tinput.keydown( KEY_S )
			tgame.cam.move(0,0,-2)
		End If
		CaptureInput()
		
	End Function
	
	Function Render()
		
		Render3D()
		
	End Function
	
	
	Function Quit()
	
		TGame.FreeResources()
	
	End Function
	
	
End Type


Rem

	[ Helper ] Class
	
	Helper funmctions to simplfy commonly used algos.

End Rem

Type THelper
	
	Function linepick(fromspace:ospace,tospace:ospace,x#,y#,z#,xdir#,ydir#,zdir#,length#,group:OContactGroup)
		Local ray=dCreateRay(fromspace.space, length#)
		dGeomRaySet(ray ,x#,y#,z#, xdir#,ydir#,zdir#)
		dspacecollide2(ray,Tospace.space,tgame.World.world , Group.group )
		Local px#=9999999999999,py#=99999999,pz#=99999999
 
		Local hit = False
		If dGeom1CountCollisions(ray) > 0 Then
			For Local Count=1 To dGeom1CountCollisions(ray)
				Local cx#,cy#,cz#
				cx = dGeom1CollisionX(ray,count)
				cy = dGeom1CollisionY(ray,count)
				cz = dGeom1CollisionZ(ray,count)
				Local d1#,d2#
				d1 = Distance( cx,cy,cz,x,y,z )
				d2 = distance( px,py,pz,x,y,z )
				If d1<d2
					px = cx
					py = cy 
					pz = cz
					hit = True
				EndIf
			Next
		EndIf
		If dGeom2CountCollisions(ray) > 0 Then
			For Local Count=1 To dGeom2CountCollisions(ray)
				Local cx#,cy#,cz#
				cx = dGeom2CollisionX(ray,count)
				cy = dGeom2CollisionY(ray,count)
				cz = dGeom2CollisionZ(ray,count)
				Local d1#,d2#
				d1 = Distance( cx,cy,cz,x,y,z )
				d2 = distance( px,py,pz,x,y,z )
				If d1<d2
					px = cx
					py = cy 
					pz = cz
					hit = True
				EndIf
			Next
		EndIf
		pickx = px
		picky = py
		pickz = pz
		dGeomDestroy(Ray)
		Group.empty()
		Return hit
	End Function	

	Global pickx#,picky#,pickz#
	Global picknx#,pickny#,picknz#
	
	Function Distance#(x1#,y1#,z1#,x2#,y2#,z2# )
		Local xd#,yd#,zd#
		xd = x2-x1
		yd = y2-y1
		zd = z2-z1
		Return Sqr( xd*xd+yd*yd+zd*zd )
	End Function
	
End Type


Rem 
	
	[ TriMesh ] Class
	
		Holds Tri Mesh data for each collision proxy.
	
End Rem

 Type oTrimesh
	Field mesh
	Field Vertbank:TBank
	Field tribank:TBank
	Field trimeshdata:Int
	
	'Function CreateTriMesh:Int(trispace:Int,xscale:Float=1.0,yscale:Float=1.0,zscale:Float=1.0)
	Function CreateTriMesh:oTrimesh(trispace:Int,Meshfile$,parent:tentity=Null,x=0,y=0,z=0,doit=1)
	
		Local xscale:Float = 1.0 , yscale:Float = 1.0 , zscale:Float = 1.0
		Local Pivot:tpivot = TPivot.Create()

		If parent<>Null Then
			pivot.position(parent.x() , parent.y() , parent.z() )
			pivot.rotate(parent.getpitch(),parent.getyaw(),parent.getroll())
		EndIf

		If FileType("media\"+meshfile$)<>1 Then RuntimeError "Oh no! "+meshfile$
		Local md:tmeshdata = pivot.CreateMeshData(meshfile$)
		If MD.TRIANGLES()>0 Then
			
			Local vertexlistx#[(md.triangles() * 3)+1]
			Local vertexlisty#[(md.triangles() * 3)+1]
			Local vertexlistz#[(md.triangles() * 3)+1]
			Local cnt=0,vrt
			Local ntris = md.triangles()
			Local nverts=ntris*3
						
			For Local j=0 To md.triangles()-1
				For Local v=0 To 2 
					Local vert = md.getTriIndex( j,v ) 
					md.GetVertex( vert ) 
					vertexlistx[cnt] = md.x() 
					vertexlisty[cnt] = md.y() 
					vertexlistz[cnt] = md.z() 
					cnt = cnt + 1
				Next 
			Next



			Local tribank:TBank=CreateBank(NTris*3*4)
			Local Vertbank:TBank=CreateBank(NVerts*4*4)
			Local Offset:Int=0
			Local TriOffset:Int=0
			
			Local tm:oTrimesh = New oTrimesh
			tm.tribank=tribank
			tm.Vertbank=Vertbank
			ListAddFirst(Trimeshlist,tm:oTrimesh)
			
			For Local v=0 To cnt-1
 				PokeFloat(Vertbank,Offset,vertexlistx[v])
 				Offset:+4
 				PokeFloat(Vertbank,Offset,vertexlisty[v])
 				Offset:+4
 				PokeFloat(Vertbank,Offset,vertexlistz[v])
 				Offset:+ 8
 			Next
			ntris = ((cnt) / 3)-1
			nverts=cnt-1
			For Local v = 0 To NTRIS'(cnt - 1) / 3
				DebugLog trioffset+"   "+BankSize(tribank)
 				PokeInt(tribank,TriOffset,vrt)
				TriOffset:+4
 				PokeInt(tribank,TriOffset,vrt+1)
 				TriOffset:+4
 				PokeInt(tribank,TriOffset,vrt+2)
 				TriOffset:+ 4
				vrt=vrt+3
			Next
			
				Local trimeshdata:Int=dGeomTriMeshDataCreate()
				dGeomTriMeshDataBuildSimple(trimeshdata , BankBuf(Vertbank) , NVerts , BankBuf(tribank) , NTris * 3)
				tm.mesh = dCreateTriMesh(trispace , trimeshdata)
				tm.trimeshdata=trimeshdata
			
			Return tm
		EndIf
	End Function
	
	Method dispose()
	
		If Not disposed
		
			dGeomTriMeshDataDestroy(Self.trimeshdata)	
			Self.Vertbank = Null
			Self.tribank = Null
			ListRemove(trimeshlist,Self)
			disposed=True
		
		EndIf
		
	End Method
	
	
	Method Delete()
		dispose()
	End Method
	Field disposed
	
End Type



Rem

	Begin the application

End Rem

TApp.Go()



Damien Sturdy(Posted 2006) [#54]
I'm not too sure releasing that code is a good idea....


AdrianT(Posted 2006) [#55]
Ant I also don't think you should be releasing source intended for the game. I think everyone has been pretty easy going so far, but some company policy needs to be established, as well as legaly binding contracts.


Alienforce(Posted 2006) [#56]
Ant or any Aurora user: Any other techdemos ?? Cubes or FPS level it dosent matter :)


boomboommax(Posted 2006) [#57]
oh er, is that even your wip game to release the code for?


Damien Sturdy(Posted 2006) [#58]
It's okay, he coded what was posted above. It's based on what I (mostly) wrote.

Since this code is going to be part of the final product it's not a good idea to share it about though. :)


Defoc8(Posted 2006) [#59]
well it worked fine on my crappy system - though it ran
like dirt...very slow.
800mhz 512megs 9600pro - so its probably not a suprise.


Damien Sturdy(Posted 2006) [#60]
Hehe, Defoc8, it's about time your processor cought up with your GFX card! :D

Good that in ran though :)


AntonyWells(Posted 2006) [#61]
I have the same speed processor and it's playable with stencil shadows on, but runs silkly smooth without them. In short, stencil shadows are cpu hogs.


Alienforce(Posted 2006) [#62]
Ant do you have done anything with the FPS demo..?
Sorry for nagging.


AntonyWells(Posted 2006) [#63]
Not yet.

I did code an fps demo before aurora was released of sorts I could release. It's just you, a gun and a dozen or so human shaped target boards with newton powered physics. Anyone interested in that?


AntonyWells(Posted 2006) [#64]
D, any luck with that bug i showed you last night?

P.s, install trillian at work. Bosses will be too dumb to realise it's a chat program :)


Alienforce(Posted 2006) [#65]
Ant: Yes i would like to take a look that demo please.


AntonyWells(Posted 2006) [#66]
Ok, give me a hour or so to get it working in the latest build.

For now, here's the source to it to show easy it was.

Strict
Import "Aurora.bmx"
'-=-=-=-=-=-=-=-=-=-=-
'
'      Ogre Max
'        V1.0
'
'    '     First Person Shooter. Demo.
'
'-=-=-=-=-=-=-=-=-=-=-


Local Display:TDisplay = TDisplay.Create()
Display.OpenScreen()

Local Light:TLight = Tlight.CreateOmni()
Light.Diffuse( 255,255,255 )
Light.Position( 0,30,0 )
Light.Specular( 0,0,0 )
TLight.SetAmbient( 128,128,128 )
'Display.ShadowMode( Shadows_StencilAdd )
'Local Sl:TSceneLoader = New TSceneLoader

'Local Scene:TScene = Sl.Load("Media/Arena1.osm")
LoadScene("Scene.OSM".tocstring())


'---- Scene Set up
Local Camera:TCamera = TCamera.Create()
TGui.Init( Camera )

Local InputDevice:TInput = TInput.Create()
TPhysics.Init( Camera )
TPhysics.SetWorldSize( -1000,-1000,-1000,1000,1000,1000 )
Local Terrain:TEntity = TEntity.CreateMesh("terrain.mesh")



Local Col:TCollider = TCollider.CreateStatic( Terrain )
Local GBody:TBody = tbody.Create( col,"Ground" )
gbody.attachtopivot( terrain )
gbody.setInertia( Tinertia.CreateCube( 0,1,1,1 ) )
Local Sky:TEntity = TEntity.CreateMesh("sky.mesh")

'--- Gun set up

Local Gun:TEntity = TEntity.CreateMesh("gun1.mesh")
Gun.scale( 0.05,0.05,0.05 )
gun.setmaterial( "Examples/BumpMapping/MultiLightSpecular" )

'---Target set up

Type Target
	Function Create:Target( x#,z#,xs#,ys#,zs#)
		
		Local out:target = New target
		out.ent = TEntity.CreateMesh( "target1.mesh" )
		out.ent.castshadows( True )
		out.ent.scale( xs,ys,zs )
		Local col:TCollider = TCollider.Createconvex( out.ent )
		out.bod = Tbody.Create( col,"Target" )
		out.bod.attachtopivot( out.ent )
		out.bod.setinertia( Tinertia.createCube( 0.5,2.5,6,1 ) )
		out.bod.setCenterOfMass( 0,0.2,0 )
		out.bod.enableGravity()
		out.bod.ActivateForceAndTorque()
		Local groundy#
		If traycast.cast( x,200,z,0,-400,0 )
			groundy = traycast.y()+1
		Else
			groundy=100
		EndIf
		out.bod.position(x,groundy,z)
		Return out	
	End Function
	Field bod:TBody
	Field Ent:TEntity
End Type

Local targets = 20
Local tars:Tlist = CreateList()
For Local j=1 To targets
	
	Local tar:Target = target.create(Rnd(-100,100),Rnd(-100,100),0.2,0.2,0.2 )
	tars.addlast( tar )
	
		
Next

Local GunFire:TSound = LoadSound("Media/Shot1.wav")
Local FireTime:TTimer = TTimer.Create(100)

'--- Player Vars. Normally would be a type but this is supposed to be an easy to understand demo so not here it ain't. 
Local playx#,playy#,playz#
Local xi#,zi#
Local cinc#
Repeat


	'update physics.
	For Local j=1 To 3
		tphysics.update( 0.1 )
	Next
	
	
	If inputdevice.mousedown( 0 ) 
		If firetime.clicked()
		
	
		If camera.pick( displaywidth()/2,displayheight()/2 )
			
			Local hx#,hy#,hz#
			hx = camera.pickx()
			hy = camera.picky()
			hz = camera.pickz()
			Local bod:Tbody = camera.pickBody()
			
			Local vx#,vy#,vz#,mag#
			vx = bod.x()-camera.x()
			vy = bod.y()-camera.y()
			vz = bod.z()-camera.z()
			mag = Sqr( vx*vx+vy*vy+vz*vz )
			vx = vx/mag
			vy = vy/mag
			vz = vz/mag
			Local strength# = 100
			bod.addpush( vx*Strength,vy*Strength,vz*strength )
			'bod.push( hx,hy,hz,vx*strength,vy*strength,vz*strength )
			TParticleController.Create( hx,hy,hz,"Examples/Smoke",250,1000 )
			
		EndIf
		PlaySound gunfire
		EndIf
			
	Else
		firetime.reset()
	EndIf
	TparticleController.UpdateAll()
	
	'Check to see where the player should be on the terrain.
	If traycast.cast( playx,10,playz,0,-100,0 ) 'cast a ray
		
		playx = traycast.x()
		playy = traycast.y()+4
		playz = traycast.z()
		
	EndIf
	'position and rotate camera based on player input
	camera.position( playx,playy,playz )
	camera.pitch( -inputdevice.mouseyspeed() )
	camera.yaw( -inputdevice.mousexspeed() )
	
	If inputdevice.keydown( Key_W )
		Camera.TFormVector( 0,0,-0.2 )
		xi:+Camera.TFormedX()
		zi:+Camera.TFormedZ()
	EndIf
	If inputdevice.keydown( KEY_A )
		camera.tformvector( -0.05,0,0 )
		xi:+camera.tformedx()
		zi:+camera.tformedz()
	End If
	If inputdevice.keydown( KEY_D )
		camera.tformvector( 0.05,0,0 )
		xi:+Camera.tformedx()
		zi:+camera.tformedz()
	End If
	If inputdevice.keydown( KEY_S )
		camera.tformvector( 0,0,0.2 )
		xi:+camera.tformedx()
		zi:+camera.tformedz()
	End If
	
	xi:*0.9
	zi:*0.9
	playx:+xi
	playz:+zi
	
	'determine gun's position
	camera.tformpoint( -1,-1,-3 )
	
	gun.position( camera.tformedx(),camera.tformedy(),camera.tformedz() )
	
	'Determine gun's orientation
	
	gun.setquat( camera.getQuat() )
	
	
	Render3D()
	CaptureInput()
	tgui.freeevents()
	tgui.updateevents()
	
Until InputDevice.KeyDown(Key_Escape)




Damien Sturdy(Posted 2006) [#67]
GGG:

No. Your build chucks up an error, "Uninitialised function call". I got peed and went to bed at that point, I'll look later tonight when we get that one fixed :)


AntonyWells(Posted 2006) [#68]
Yeah I forgot to send the update OgreMax.dll, i'll send it to your home addy.


smilertoo(Posted 2006) [#69]
that demo has a few glitches, like the glow part is visible through scenery.


Damien Sturdy(Posted 2006) [#70]
Yeah we know. It's an *old* demo. As Evak said above, (i think) The glow was him playing with the level, It wasn't quite final at the time of this demo :)