Jump to content

A Simple Scene Loader in Blitzmax


Marleys Ghost
 Share

Recommended Posts

A Simple Scene Loader with Player Controller in Blitzmax

 

Using the latest sync of LWE 2.3 and Blitzmax 1.36

For those of you who may find this useful.

 

Create a new app directory. Call it Basic

 

Copy from the 2.3 SDK folder to the Basic folder the following:

 

The "scripts" folder
newton.dll
JointLibrary.dll

 

Create a new text document in the Basic folder and name it:

 

basicsceneloader.bmx

 

Double click on this file, Blitzmax should now open.

 

Copy and paste the following code into it.

 

SuperStrict

Framework leadwerks.engine

'To Generate an updated lua-gluefunctions.bmx uncomment the lines tagged [1]
'and comment out the line tagged [2]. Run the code once, then swap back.
'lua-gluefunctions.bmx needs to be inside the App directory.

Import "PATH TO YOUR 2.3 SDK FOLDER\BMX\Framework\framework.bmx"
'Import lugi.generator '[1]

Include "lua-gluefunctions.bmx" '[2]
'generateGlueCode("lua-gluefunctions.bmx") '[1]
'End '[1]

AppTitle:String = "Basic Example : BMAX + Leadwerks Engine 2.3"
GCSetMode(2)

'Register the directory under which the abstract file system will search.
RegisterAbstractPath("PATH TO YOUR SDK FOLDER")

'Create a Graphics window
Graphics(800, 600)


AFilter(1) 'Set the anisotropic filter. Range 1-16

'Using AFilter(MaxAFilter()) will use the maximum supported anisotropic filter on your PC
'Adding the line "DrawText ("MaxAFilter = " + MaxAFilter(), 0, 80)"
'after "fw.Render()" will display on screen the maximum supported anisotropic filter.

TFilter(1) 'Set trilinear filtering : 0 = off : 1 = on.


'Create a new Framework object.
Global fw:TFramework = TFramework.Create()
If Not fw RuntimeError "Failed to initialize engine."

SetScriptObject("fw", fw)'Setup the global script objects.
SetPostFX()'Setup the post processing FX
SetVegetationShadowMode(0)'Setup vegetation layer shadows : 0 = off : 1 = on.

'Load the scene. 
Global scene:TEntity = LoadScene("abstract::YOUR_SCENE.sbx")

'Setup the player controller.
Global player:TController = CreateController(2.0)
PositionEntity(player, StringToVec3(scene.getkey("cameraposition")))
EntityType(player, 3) 
SetBodyMass(player, 50.0)
SetBodyBuoyancyMode(player,0)
Collisions(1, 3, 3)

'Setup the player movement variables.
Global move:Float = 0.0
Global strafe:Float = 0.0
Global camrotation:TVec3 = Vec3(0)
Global mx:Float = 0.0
Global my:Float = 0.0
Global jump:Float = 0.0
Global playerpos:TVec3 = Vec3(0)

HideMouse()

'Set stats level : 0 = No statistics : 1 = Show frame rate : 2 = Full statistics. 
fw.SetStats(2)

'Main program loop.
Repeat
If KeyHit(KEY_ESCAPE) Exit
If AppTerminate() Exit

UpdateAppTime()
UpdateWorld(AppSpeed())

PlayerController()

fw.Update()
fw.Render()

Flip(0)
Forever
fw.renderer.gbuffer = Null
GCCollect()
End

'Functions.

Function SetPostFX()'0 = off : 1 = on.
fw.renderer.SetAntialias(1)
fw.renderer.SetBloom(1) 
fw.renderer.SetGodRays(1)
fw.renderer.SetHDR(1)
fw.renderer.SetSSAO(1)
fw.renderer.SetWireFrame(0)	
End Function

Function PlayerController()
mx = Curve(MouseX() - GraphicsWidth() / 2, mx, 6)
my = Curve(MouseY() - GraphicsHeight() / 2, my, 6)
MoveMouse(GraphicsWidth() / 2, GraphicsHeight() / 2)
camrotation.X = camrotation.X + my / 10.0
camrotation.Y = camrotation.Y - mx / 10.0
RotateEntity(fw.Main.camera, camrotation)

move = KeyDown(KEY_W) - KeyDown(KEY_S)
strafe = KeyDown(KEY_D) - KeyDown(KEY_A)
jump:Float = 0.0
If KeyHit(KEY_SPACE) & Not ControllerAirborne(player)
	jump = 4.0
End If
If KeyDown(KEY_LSHIFT) | KeyDown(KEY_RSHIFT)
	move = move * 3.0
	strafe = strafe * 3.0
End If
playerpos = EntityPosition(player)
  	playerpos.Y = playerpos.Y + 0.80
  	PositionEntity(fw.Main.camera, playerpos)

  	UpdateController(player, camrotation.Y, move * 3, strafe * 3, jump, 500, 10)
End Function

Function StringToVec2:TVec2(text:String, scale:Float = 1.0)
Local t:TVec2 = Vec2(1)
Local sarr:String[]
sarr = text.split(",")
If sarr
	If sarr.length > 0 t.x = Float(sarr[0]) * scale
	If sarr.length > 1 t.y = Float(sarr[1]) * scale
EndIf
Return t
EndFunction

Function StringToVec3:TVec3(text:String, scale:Float = 1.0)
Local t:TVec3 = Vec3(1)
Local sarr:String[]
sarr = text.split(",")
If sarr
	If sarr.length > 0 t.x = Float(sarr[0]) * scale
	If sarr.length > 1 t.y = Float(sarr[1]) * scale
	If sarr.length > 2 t.z = Float(sarr[2]) * scale
EndIf
Return t
EndFunction

Function StringToVec4:TVec4(text:String, scale:Float = 1.0)
Local t:TVec4 = Vec4(1)
Local sarr:String[]
sarr = text.split(",")
If sarr
	If sarr.length > 0 t.x = Float(sarr[0]) * scale
	If sarr.length > 1 t.y = Float(sarr[1]) * scale
	If sarr.length > 2 t.z = Float(sarr[2]) * scale
	If sarr.length > 3 t.w = Float(sarr[3]) * scale
EndIf
Return t
EndFunction

Function SetScriptObject(name:String, o:Object)
       Local size:Int=GetStackSize()
       lua_pushbmaxobject(luastate.L,o)
       lua_setglobal(luastate.L,name)
       SetStackSize(size)
EndFunction

Function GetStackSize:Int()
       Return lua_gettop(luastate.L)
EndFunction

Function SetStackSize(size:Int)
       Local currentsize:Int=GetStackSize()
       If size<currentsize
       lua_pop(luastate.L,currentsize-size)
       EndIf
EndFunction

 

Locate the part of the code at the start that reads:

 

'To Generate an updated lua-gluefunctions.bmx uncomment the lines tagged [1]
'and comment out the line tagged [2]. Run the code once, then swap back.
'lua-gluefunctions.bmx needs to be inside the App directory.

Import "PATH TO YOUR 2.3 SDK FOLDER\BMX\Framework\framework.bmx"
'Import lugi.generator '[1]

Include "lua-gluefunctions.bmx" '[2]
'generateGlueCode("lua-gluefunctions.bmx") '[1]
'End '[1]

 

 

Follow the instructions so you now have:

 

 

'To Generate an updated lua-gluefunctions.bmx uncomment the lines tagged [1]
'and comment out the line tagged [2]. Run the code once, then swap back.
'lua-gluefunctions.bmx needs to be inside the App directory.

Import "PATH TO YOUR 2.3 SDK FOLDER\BMX\Framework\framework.bmx"
Import lugi.generator '[1]

'Include "lua-gluefunctions.bmx" '[2]
generateGlueCode("lua-gluefunctions.bmx") '[1]
End '[1]

 

Now click "build and Run"

 

When the process is complete swap the above back to:

 

Import "PATH TO YOUR 2.3 SDK FOLDER\BMX\Framework\framework.bmx"
'Import lugi.generator '[1]

Include "lua-gluefunctions.bmx" '[2]
'generateGlueCode("lua-gluefunctions.bmx") '[1]
'End '[1]

 

This will now have generated the "lua-gluefunctions.bmx" into the Basic app directory.

 

Point the RegisterAbstractPath to your Leadwerks SDK install directory.

 

That is:

 

RegisterAbstractPath("PATH TO YOUR 2.3 SDK FOLDER")

 

Now open the 2.3 editor and create a scene, save it into your 2.3 SDK's maps folder (the default). name it "basic".

 

Locate the line:

 

Global scene:TEntity = LoadScene("abstract::YOUR_SCENE.sbx")

 

and change to:

 

Global scene:TEntity = LoadScene("abstract::basic.sbx")

 

Now click "build and Run"

 

basici.th.png

 

Basic controls W,A,S,D and Space Bar to Jump : Mouse look.

 

The code is annotated with help for settings.

 

I hope this is of some use to someone.

 

UPDATED: Thanks to Macklebee for input on the global script objects.

  • Upvote 1

AMD Bulldozer FX-4 Quad Core 4100 Black Edition

2 x 4GB DDR3 1333Mhz Memory

Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5

Windows 7 Home 64 bit

 

BlitzMax 1.50 • Lua 5.1 MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro

3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET

 

LE 2.5/3.4 • Skyline UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0

 

Marleys Ghost's YouTube Channel Marleys Ghost's Blog

 

"I used to be alive like you .... then I took an arrow to the head"

Link to comment
Share on other sites

An Even Simpler Scene Loader with Player Controller in Blitzmax

 

Using the latest sync of LWE 2.3 and Blitzmax 1.36

 

In case of any confusion caused by the code in the lead post having the inclusion of the lua-gluefunctions.bmx generation, this is the code with the lua-gluefunctions.bmx generation removed. A seperate mini tutorial on creating a small app in a seperate directory to create the lua-gluefunctions.bmx can be found here

 

You will need to then copy and paste the lua-gluefunctions.bmx to the Basic app directory.

 

Create a new app directory. Call it Basic

 

Copy from the 2.3 SDK folder to the Basic folder the following:

 

The "scripts" folder
newton.dll
JointLibrary.dll

 

Create a new text document in the Basic folder and name it:

 

basicsceneloader.bmx

 

Double click on this file, Blitzmax should now open.

 

Copy and paste the following code into it.

 

SuperStrict

Framework leadwerks.engine

Import "PATH TO YOUR 2.3 SDK FOLDER\BMX\Framework\framework.bmx"
Include "lua-gluefunctions.bmx"


AppTitle:String = "Basic Example : BMAX + Leadwerks Engine 2.3"
GCSetMode(2)

'Register the directory under which the abstract file system will search.
RegisterAbstractPath("PATH TO YOUR 2.3 SDK FOLDER")

'Create a Graphics window
Graphics(800, 600)


AFilter(1) 'Set the anisotropic filter. Range 1-16

'Using AFilter(MaxAFilter()) will use the maximum supported anisotropic filter on your PC
'Adding the line "DrawText ("MaxAFilter = " + MaxAFilter(), 0, 80)"
'after "fw.Render()" will display on screen the maximum supported anisotropic filter.

TFilter(1) 'Set trilinear filtering : 0 = off : 1 = on.


'Create a new Framework object.
Global fw:TFramework = TFramework.Create()
If Not fw RuntimeError "Failed to initialize engine."

SetScriptObject("fw", fw)'Setup the global script objects.
SetPostFX()'Setup the post processing FX
SetVegetationShadowMode(0)'Setup vegetation layer shadows : 0 = off : 1 = on.

'Load the scene. 
Global scene:TEntity = LoadScene("abstract::basic.sbx")

'Setup the player controller.
Global player:TController = CreateController(2.0)
PositionEntity(player, StringToVec3(scene.getkey("cameraposition")))
EntityType(player, 3) 
SetBodyMass(player, 50.0)
SetBodyBuoyancyMode(player,0)
Collisions(1, 3, 3)

'Setup the player movement variables.
Global move:Float = 0.0
Global strafe:Float = 0.0
Global camrotation:TVec3 = Vec3(0)
Global mx:Float = 0.0
Global my:Float = 0.0
Global jump:Float = 0.0
Global playerpos:TVec3 = Vec3(0)

HideMouse()

'Set stats level : 0 = No statistics : 1 = Show frame rate : 2 = Full statistics. 
fw.SetStats(2)

'Main program loop.
Repeat
If KeyHit(KEY_ESCAPE) Exit
If AppTerminate() Exit

UpdateAppTime()
UpdateWorld(AppSpeed())

PlayerController()

fw.Update()
fw.Render()

Flip(0)
Forever
fw.renderer.gbuffer = Null
GCCollect()
End

'Functions.

Function SetPostFX()'0 = off : 1 = on.
fw.renderer.SetAntialias(1)
fw.renderer.SetBloom(1) 
fw.renderer.SetGodRays(1)
fw.renderer.SetHDR(1)
fw.renderer.SetSSAO(0)
fw.renderer.SetWireFrame(0)	
End Function

Function PlayerController()
mx = Curve(MouseX() - GraphicsWidth() / 2, mx, 6)
my = Curve(MouseY() - GraphicsHeight() / 2, my, 6)
MoveMouse(GraphicsWidth() / 2, GraphicsHeight() / 2)
camrotation.X = camrotation.X + my / 10.0
camrotation.Y = camrotation.Y - mx / 10.0
RotateEntity(fw.Main.camera, camrotation)

move = KeyDown(KEY_W) - KeyDown(KEY_S)
strafe = KeyDown(KEY_D) - KeyDown(KEY_A)
jump:Float = 0.0
If KeyHit(KEY_SPACE) & Not ControllerAirborne(player)
	jump = 4.0
End If
If KeyDown(KEY_LSHIFT) | KeyDown(KEY_RSHIFT)
	move = move * 3.0
	strafe = strafe * 3.0
End If
playerpos = EntityPosition(player)
  	playerpos.Y = playerpos.Y + 0.80
  	PositionEntity(fw.Main.camera, playerpos)

  	UpdateController(player, camrotation.Y, move * 3, strafe * 3, jump, 500, 10)
End Function

Function StringToVec2:TVec2(text:String, scale:Float = 1.0)
Local t:TVec2 = Vec2(1)
Local sarr:String[]
sarr = text.split(",")
If sarr
	If sarr.length > 0 t.x = Float(sarr[0]) * scale
	If sarr.length > 1 t.y = Float(sarr[1]) * scale
EndIf
Return t
EndFunction

Function StringToVec3:TVec3(text:String, scale:Float = 1.0)
Local t:TVec3 = Vec3(1)
Local sarr:String[]
sarr = text.split(",")
If sarr
	If sarr.length > 0 t.x = Float(sarr[0]) * scale
	If sarr.length > 1 t.y = Float(sarr[1]) * scale
	If sarr.length > 2 t.z = Float(sarr[2]) * scale
EndIf
Return t
EndFunction

Function StringToVec4:TVec4(text:String, scale:Float = 1.0)
Local t:TVec4 = Vec4(1)
Local sarr:String[]
sarr = text.split(",")
If sarr
	If sarr.length > 0 t.x = Float(sarr[0]) * scale
	If sarr.length > 1 t.y = Float(sarr[1]) * scale
	If sarr.length > 2 t.z = Float(sarr[2]) * scale
	If sarr.length > 3 t.w = Float(sarr[3]) * scale
EndIf
Return t
EndFunction

Function SetScriptObject(name:String, o:Object)
       Local size:Int=GetStackSize()
       lua_pushbmaxobject(luastate.L,o)
       lua_setglobal(luastate.L,name)
       SetStackSize(size)
EndFunction

Function GetStackSize:Int()
       Return lua_gettop(luastate.L)
EndFunction

Function SetStackSize(size:Int)
       Local currentsize:Int=GetStackSize()
       If size<currentsize
       lua_pop(luastate.L,currentsize-size)
       EndIf
EndFunction

 

Point the RegisterAbstractPath to your Leadwerks SDK install directory.

 

That is:

 

RegisterAbstractPath("PATH TO YOUR 2.3 SDK FOLDER")

 

Now open the 2.3 editor and create a scene, save it into your 2.3 SDK's maps folder (the default). name it "basic".

 

Locate the line:

 

Global scene:TEntity = LoadScene("abstract::YOUR_SCENE.sbx")

 

and change to:

 

Global scene:TEntity = LoadScene("abstract::basic.sbx")

 

Now click "build and Run"

 

Basic controls W,A,S,D and Space Bar to Jump : Mouse look.

 

The code is annotated with help for settings.

  • Upvote 1

AMD Bulldozer FX-4 Quad Core 4100 Black Edition

2 x 4GB DDR3 1333Mhz Memory

Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5

Windows 7 Home 64 bit

 

BlitzMax 1.50 • Lua 5.1 MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro

3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET

 

LE 2.5/3.4 • Skyline UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0

 

Marleys Ghost's YouTube Channel Marleys Ghost's Blog

 

"I used to be alive like you .... then I took an arrow to the head"

Link to comment
Share on other sites

I think Google Chrome works ... don't use it myself but am sure someone said they did for copying and pasting code from the forum.

AMD Bulldozer FX-4 Quad Core 4100 Black Edition

2 x 4GB DDR3 1333Mhz Memory

Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5

Windows 7 Home 64 bit

 

BlitzMax 1.50 • Lua 5.1 MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro

3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET

 

LE 2.5/3.4 • Skyline UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0

 

Marleys Ghost's YouTube Channel Marleys Ghost's Blog

 

"I used to be alive like you .... then I took an arrow to the head"

Link to comment
Share on other sites

  • 4 weeks later...

This is a great example and has been helping me out a lot but I have one issue.

 

If I try to load any map that uses the tree_spruce_2 asset as vegetation ( eg the terrain_arctic.sbx map ) I get the following error:

 

Unhanded Exception:Zip data error

 

Which is pointing towards the line in the basicsceneloader.bmx

 

'Load the scene. 
       Global scene:TEntity = LoadScene("abstract::terrain_arctic.sbx")

 

Thanks

BMax 1.38 * Leadwerks 2.4 * Unity 3.0 Pro * Intel Core 2 Duo 6600 - Win7 64bit - ATI 4870

Link to comment
Share on other sites

vegetation_tree_spruce_2 is a protected asset an can only be used in the editor and not in seperate applications.

AMD Bulldozer FX-4 Quad Core 4100 Black Edition

2 x 4GB DDR3 1333Mhz Memory

Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5

Windows 7 Home 64 bit

 

BlitzMax 1.50 • Lua 5.1 MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro

3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET

 

LE 2.5/3.4 • Skyline UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0

 

Marleys Ghost's YouTube Channel Marleys Ghost's Blog

 

"I used to be alive like you .... then I took an arrow to the head"

Link to comment
Share on other sites

There is a great tree pack you can download (if you have not already) European Nature Pack. Its by Michael Betke and well worth the Download ;)

AMD Bulldozer FX-4 Quad Core 4100 Black Edition

2 x 4GB DDR3 1333Mhz Memory

Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5

Windows 7 Home 64 bit

 

BlitzMax 1.50 • Lua 5.1 MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro

3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET

 

LE 2.5/3.4 • Skyline UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0

 

Marleys Ghost's YouTube Channel Marleys Ghost's Blog

 

"I used to be alive like you .... then I took an arrow to the head"

Link to comment
Share on other sites

well, I don't get that specific error, but the issue is because thats a protected asset in the private folder. These items cannot be used in your own programs unless you purchase them. Same goes for the viperscout. There is a file in the Private folder called: dexsoft-games.txt which states:

www.dexsoft-games.com

 

Go here to get the full versions of these models.

 

Viperscout pack

Northern Vegetation pack

 

EDIT--dangit MG ;)

Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590

LE / 3DWS / BMX / Hexagon

macklebee's channel

Link to comment
Share on other sites

Cool thanks, that clears things up. I saw the private folder but never clicked inside it.

 

I think Dexsoft-games might get a sale out of me some time in the future :)

BMax 1.38 * Leadwerks 2.4 * Unity 3.0 Pro * Intel Core 2 Duo 6600 - Win7 64bit - ATI 4870

Link to comment
Share on other sites

EDIT--dangit MG :)

 

 

Now what did I do ? :)

AMD Bulldozer FX-4 Quad Core 4100 Black Edition

2 x 4GB DDR3 1333Mhz Memory

Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5

Windows 7 Home 64 bit

 

BlitzMax 1.50 • Lua 5.1 MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro

3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET

 

LE 2.5/3.4 • Skyline UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0

 

Marleys Ghost's YouTube Channel Marleys Ghost's Blog

 

"I used to be alive like you .... then I took an arrow to the head"

Link to comment
Share on other sites

MG, you can also keep your abstract path relative to your app's folder, in case you're working outside LE's, with:

RegisterAbstractPath AppDir

Win8.1 Pro X64/ Intel core I7 @ 3.5GHz / 32GB DDR3 SDRAM / GeForce GTX 660+760/ VC++ Express 2013/ Blender /Unwrap3dpro3 /Modo 8

Link to comment
Share on other sites

MG, you can also keep your abstract path relative to your app's folder, in case you're working outside LE's, with:

RegisterAbstractPath AppDir

 

 

 

Very true, and there is also a very good reason why any basic sample code I post always uses the path to the SDK folder ;)

AMD Bulldozer FX-4 Quad Core 4100 Black Edition

2 x 4GB DDR3 1333Mhz Memory

Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5

Windows 7 Home 64 bit

 

BlitzMax 1.50 • Lua 5.1 MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro

3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET

 

LE 2.5/3.4 • Skyline UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0

 

Marleys Ghost's YouTube Channel Marleys Ghost's Blog

 

"I used to be alive like you .... then I took an arrow to the head"

Link to comment
Share on other sites

which is? ;)

 

 

It saves months of having to ask the same questions to those with "alleged" problems like "have you copied <insert one of the numerous files that need to be in the appdir to run your app from that dir.> to the Appdir?" ;)

AMD Bulldozer FX-4 Quad Core 4100 Black Edition

2 x 4GB DDR3 1333Mhz Memory

Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5

Windows 7 Home 64 bit

 

BlitzMax 1.50 • Lua 5.1 MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro

3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET

 

LE 2.5/3.4 • Skyline UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0

 

Marleys Ghost's YouTube Channel Marleys Ghost's Blog

 

"I used to be alive like you .... then I took an arrow to the head"

Link to comment
Share on other sites

But then if you need to run your project on another pc that doesn't have the SDK you're screwed ;)

i.e. if you want to do a showcase presentation to a client on his pc. I always like to keep things local because of that, making sure all of the required files are there.

Win8.1 Pro X64/ Intel core I7 @ 3.5GHz / 32GB DDR3 SDRAM / GeForce GTX 660+760/ VC++ Express 2013/ Blender /Unwrap3dpro3 /Modo 8

Link to comment
Share on other sites

But then if you need to run your project on another pc that doesn't have the SDK you're screwed

 

Then what is required is a Basic scene loading example using the Appdir. :blink:

 

And the author of that can spend months of having to ask the same questions to those with "alleged" problems like "have you copied <insert one of the numerous files that need to be in the appdir to run your app from that dir.> to the Appdir?" :unsure:

AMD Bulldozer FX-4 Quad Core 4100 Black Edition

2 x 4GB DDR3 1333Mhz Memory

Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5

Windows 7 Home 64 bit

 

BlitzMax 1.50 • Lua 5.1 MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro

3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET

 

LE 2.5/3.4 • Skyline UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0

 

Marleys Ghost's YouTube Channel Marleys Ghost's Blog

 

"I used to be alive like you .... then I took an arrow to the head"

Link to comment
Share on other sites

looooooooool. :unsure:

I'm not at that point yet, and prolly will never be, but it's always good to consider the "worst case scenario", heheheh. Asking here and getting responses like yours' make me learn a lot...believe me!

Win8.1 Pro X64/ Intel core I7 @ 3.5GHz / 32GB DDR3 SDRAM / GeForce GTX 660+760/ VC++ Express 2013/ Blender /Unwrap3dpro3 /Modo 8

Link to comment
Share on other sites

  • 4 weeks later...
Guest Red Ocktober

i was following your similar logic in the other thread MG... great stuff you have here... thx for generously making it available...

 

this is the kinda stuff that needs to be posted (with a lil explanation) in the tuts boards...

 

to the guy who had issues with the text format being destroyed... simply right click on the browser and select view source... copy and paste and then replace the special formated characters, you'll see em...

 

--Mike

Link to comment
Share on other sites

Guest Red Ocktober

there appears to be an issue with your simple loader and blitzmax in the debug mode... i loaded up a scene and walked around it, an at the same spot turning in the same direction i consistantly got an exception (reference to a null object) in the renderer...

 

but when i ran it in the release mode (no debugging) the error dissappeared...

 

go figure...

 

anyways.... me thinks (just guessing) it has nothing to do with your code... blitzmax 1.34 seems to be at issue here...

 

just thought you'd like to be aware of these sorta things... gonna try blitzmax 1.37 build later on...

 

i'm reallying getting tired of messing with this sorta stuff... need to get some sorta game done ;)

 

 

--Mike

Link to comment
Share on other sites

Sounds more like an issue with an object in the scene hence reference to a null object. As for Bmax versions I am currently on 1.38 not sure which version Mack is using. But I upgrade everytime a new release is out.

AMD Bulldozer FX-4 Quad Core 4100 Black Edition

2 x 4GB DDR3 1333Mhz Memory

Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5

Windows 7 Home 64 bit

 

BlitzMax 1.50 • Lua 5.1 MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro

3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET

 

LE 2.5/3.4 • Skyline UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0

 

Marleys Ghost's YouTube Channel Marleys Ghost's Blog

 

"I used to be alive like you .... then I took an arrow to the head"

Link to comment
Share on other sites

Guest Red Ocktober
Sounds more like an issue with an object in the scene hence reference to a null object.

 

yeah... that's what i thougt at first... but there's only a submarine, a terrain, some water, an oil barrel, and a train car... most stock stuff....

 

then when i compiled in the release mode, the error vanished...

 

hey MG, does bmax have trace facilities like c... all i get so far is an error msg pointing to something in the renderer... would be nice to be abe to step through the code...

 

 

--Mike

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...