-
Posts
3,946 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Downloads
Everything posted by macklebee
-
Dont get upset because I am stating what it appears that you want... Several people in this post have tried to help you and have asked you repeatedly to define what you are asking help with on how to create a lua scripted entity. From what you have posted, you continue to say that you're not going to even try until you get some magical tut that explains how to do everything you could want to do in lua & LE. If thats the wrong impression, then sorry but that's what it appears that you are asking. Just try to follow the tut, look at the examples, look at what has been shown in this post, and post what exactly you are having difficulties with getting to work. There are a lot of people here that are more than willing to help in any way they can.
-
Hey Roland, here are the other couple of bmax templates I had talked to you about adding. bmax + framework ' ==================================================================== ' This file was generated by Leadwerks C++/LEO/BlitzMax Project Wizard ' Written by Rimfrost Software ' http://www.rimfrost.com ' ==================================================================== SuperStrict Framework leadwerks.ENGINE Import "$(MediaDir)\BMX\Framework\Framework.bmx" GCSetMode(2) RegisterAbstractPath("$(MediaDir)") Graphics($(ScreenWidth), $(ScreenHeight)) Global fw:TFramework = CreateFramework() If Not fw RuntimeError "Failed to initialize engine." Local mesh:TMesh Local light:TLight Local ground:TMesh Local material:TMaterial PositionEntity fw.Main.camera, [0.0, 0.0, - 2.0] material=LoadMaterial("abstract::cobblestones.mat") mesh=CreateCube() PaintEntity mesh,material ground=CreateCube() ScaleEntity ground,[10.0,1.0,10.0] PositionEntity ground,[0.0,-2.0,0.0] PaintEntity ground,material light=CreateDirectionalLight() RotateEntity light,[45.0,45.0,45.0] Repeat TurnEntity mesh,[AppSpeed()*0.5,AppSpeed()*0.5,AppSpeed()*0.5] If KeyHit(KEY_ESCAPE) Exit If AppTerminate() Exit fw.Update() fw.Render() Flip(0) Forever fw.renderer.gbuffer = Null FreeEntity light GCCollect() End and also bmax + framework + lua integration: ' ==================================================================== ' This file was generated by Leadwerks C++/LEO/BlitzMax Project Wizard ' Written by Rimfrost Software ' http://www.rimfrost.com ' ==================================================================== SuperStrict Framework leadwerks.ENGINE Import "$(MediaDir)\BMX\Framework\Framework.bmx" 'To create a new lua-gluefunctions.bmx file, comment and uncomment the following lines. Include "lua-gluefunctions.bmx" '--Comment this line out to create new lua-gluefunctions.bmx 'Import lugi.generator '--Uncomment this line to create new lua-gluefunctions.bmx 'GenerateGlueCode("lua-gluefunctions.bmx") '--Uncomment this line to create new lua-gluefunctions.bmx 'Notify("All Done", 0) '--Uncomment this line to create new lua-gluefunctions.bmx 'End '--Uncomment this line to create new lua-gluefunctions.bmx GCSetMode(2) RegisterAbstractPath("$(MediaDir)") Graphics($(ScreenWidth), $(ScreenHeight)) Global fw:TFramework = CreateFramework() If Not fw RuntimeError "Failed to initialize engine." SetScriptObject("fw", fw) Local mesh:TMesh Local light:TLight Local ground:TMesh Local material:TMaterial PositionEntity fw.Main.camera, [0.0, 0.0, - 2.0] material=LoadMaterial("abstract::cobblestones.mat") mesh=CreateCube() PaintEntity mesh,material ground=CreateCube() ScaleEntity ground,[10.0,1.0,10.0] PositionEntity ground,[0.0,-2.0,0.0] PaintEntity ground,material light=CreateDirectionalLight() RotateEntity light,[45.0,45.0,45.0] Repeat TurnEntity mesh,[AppSpeed()*0.5,AppSpeed()*0.5,AppSpeed()*0.5] If KeyHit(KEY_ESCAPE) Exit If AppTerminate() Exit fw.Update() fw.Render() Flip(0) Forever fw.renderer.gbuffer = Null FreeEntity light GCCollect() End 'this enables lua framework to work inside bmax 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
-
ah nice... thanks. i would love to see a comparison of fps of your animation code versus if it was in a lua script for the entity... would be interesting to see.
-
i couldn't interact with anything on my own server... but then again i cant connect to anyone else's server atm...
-
cool... nice work klepto! ok... i have to ask this question where is this model from? I keep seeing it everywhere...
-
hmmm then i dont know why it doesn't work in c++/gamelib i can get the simple firepit model example working in bmax with no problems...
-
and where is this? //Set Lua variable BP L=GetLuaState(); lua_pushobject(L,framework); lua_setglobal(L,"fw"); lua_pop(L,1);
-
you need to have some reference to "fw" because the firepit uses framework worlds for the emitters
-
ok... i didnt expect your entire code what i am not seeing is the anything that integrates the lua to c++.. arent you missing this code somewhere: //Set Lua variable BP L=GetLuaState(); lua_pushobject(L,framework); lua_setglobal(L,"fw"); lua_pop(L,1); and off hand i dont see the framework being initialized... unless of course thats all being handled in gamelib?
-
hmmm... i guess i would have just called the exe Sokoban 1_0 if i was going to be that worried about what the log file was named... but perhaps thats something josh can easily fix with the multiple dots...
-
where else are you trying to run it? via bmax or c++ and loaded into a scene? or just with a lua game script? give an example of the code where it doesn't work...
-
what they are asking is for you to make every possible thing they could ever want in a game as an example so they can just cut and paste... basically make the LE version of FPSCreator. This way they don't have to learn anything about programming at all and they have a playable game which they can put their name on. And could you have that done by this weekend?
-
yeah... kinda have to agree... i rent two game servers myself and it would be impossible if it required a graphics card...
-
the firepit = fire barrel? if so, that one is updated and works just fine for me... does it work in the editor for you? the windmill isn't updated (actually i think lumooja did it?)... and i dont think its actually even in the latest download since we went to singlestate lua... perhaps you should try a clean download of the SDK?
-
hmmm... i guess i never understood the comparison to unreal... imo its not even in the same ballpark for graphics as LE... but to each his own i guess
-
weird... do you have to do that for any other scripts?
-
seems you are not doing something right because i dont see how this could be a bug... where is the lua file? wherever it is put it in the main SDK directory. Now drag it and drop it on the engine.exe. should work fine.
-
tell your friends to get a real graphics card... or you make them a nice game using FPSCreator
-
you should call yours E so it makes it seem even more impressive!
-
your code works fine for me when ran directly from the script editor and when dragged onto the engine.exe... what exactly are you having troubles with?
-
is there already a TNetwork?
-
I guess I don't understand how people don't consider the standard models/entities that have lua scripts as working examples? After using the 'Getting Started...' tut and actually trying the examples within, I looked at the existing models/entities scripts as examples of how to implement. The only difference I see here that is making people complain is because there is no video?
-
kinda works? appears to work just fine for me... My game now has the title 'Sokoban 1.0' as well.
-
can't you just rename the engine.exe to whatever you wish so it will have that name on the title? because technically isn't that the EXE that is running?
-
you might be interested in this post at Newton also to get access to the locked tuts, just enter your SDK registration key as the username and password