-
Posts
124 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Posts posted by AndyGFX
-
-
This is very strange because i have used same method to return value from native code to lua script.
Try add check inside C code if it's really function pointer returned from lua stack.
state = lua_type(L,-1);
state constants are:
LUA_TNIL = 0; LUA_TBOOLEAN = 1; LUA_TLIGHTUSERDATA = 2; LUA_TNUMBER = 3; LUA_TSTRING = 4; LUA_TTABLE = 5; LUA_TFUNCTION = 6; LUA_TUSERDATA = 7; LUA_TTHREAD = 8;
-
Hi Rick
i never tried put loop inside lua execute function, i think this isn't good.
In my code i have luaV_execute defined as separated exec for external lua function and in native code when i call OnUpdate loop on any object (i.e. gui element) i call this external lua function in loop. From my point of view, your partly published code, look like recursive call => stack overflow or crash.
When you want look on my implementation (but in Delphi) you look here: http://sites.google.com/site/andygfxproject/free-pascal/final3d-sdl-ngine source are on bottom of page.
Note: Yes I'm always around here, but now i work more for mobiles and Tablets with Monkey.
-
For ~150€ you get a 460GTX which is has the best prize/performance ratio atm. At least thats what i read.
Thank. This one looks good for me now in my "critical situation"
-
Thx. I know this card, but now I don't need card which is GR. CARD KING of WORLD now I looking now, card with has good ratio - performance : price.
-
Which NV gr. card is similar to NV8800GTX now?
I'm little shaggy, with new NV signs.
Or which NV card is good?
-
Hmm ... a haven't experiencies with this phys. things, but i have other idea.
Make 1st phase as animation (rotate catapult arm) and then apply force to the thing throwed from catapult. Your idea is good, but from my point of view, not all in-game solution you have to make "totaly" real
-
I have same problem with this page. I think that problem is with loading steam IMG TAG assigned to account.
Opera shows that Maclebee has assigned this image tag from Steam, but isn't loaded (Me too).
When I disable "Show Image" from Opera, then never-ending load is stoped
-
When you want create effect which looks like "LookAt", use align to forward direction [Z axis] - PointEntity(a, b, 3,1,0)
-
Hmm ... strange ... looks like i have now same problem with NV 258.96 (before i have installed 197.13) and full version of LE (2.40), after installation this one DRV crash ALL programs - Editor, Engine and my programs too. In DEBUG mode from BLIde, program is stopped in buffer.bmx. More infos i can't get, because this is LE core.
Log look like:
Leadwerks Engine 2.40 Initializing Renderer... OpenGL Version: 3.3.0 GLSL Version: 3.30 NVIDIA via Cg compiler Render device: GeForce 8800 GTX/PCI/SSE2 Vendor: NVIDIA Corporation DrawBuffers2 supported: 1 32 texture units supported. GPU instancing supported: 1 Max batch size: 64 Shader model 4.0 supported: 1 Conditional render supported: 0 Loading shader "zip::e:/_3d_engines/leadwerks engine sdk 2.40 final/tools/adn/shaders.pak//query.vert", ""... Invoking script "E:/_3D_Engines/Leadwerks Engine SDK 2.40 Final/Scripts/start/collisions.lua"... Invoking script "E:/_3D_Engines/Leadwerks Engine SDK 2.40 Final/Scripts/start/fliphook.lua"... Invoking script "E:/_3D_Engines/Leadwerks Engine SDK 2.40 Final/Scripts/start/globals.lua"... Loading shader "", "incbin::../../TerrainColorAndLight.frag"... Loading shader "", "incbin::../../TerrainColorAndLight.frag"... Loading texture "e:/_3d_engines/leadwerks engine sdk 2.40 final/models/entities/light/directional/light_directional_icon.dds"... Loading model "e:/_3d_engines/leadwerks engine sdk 2.40 final/models/entities/light/directional/light_directional.gmf"... Loading mesh "e:/_3d_engines/leadwerks engine sdk 2.40 final/models/entities/light/directional/light_directional.gmf"... Loading material "e:/_3d_engines/leadwerks engine sdk 2.40 final/materials/effects/invisible.mat"... Loading script "e:/_3d_engines/leadwerks engine sdk 2.40 final/models/entities/light/directional/light_directional.lua"... Creating class light_directional
-
When i create an ini file with classname="blablabla" for gmf model and this model is added to scene and then saved, all properties from INI file are added to SBX file too.
But when i create INI file with classname="blablabla" for entity without gmf file (like camera with invisible material + icon only) then this properties from INI file isn't saved to SBX file.
Is it a bug or Josh's intent?
-
-
This pack contain two old class collection HUD and GUI posted from "old" LE forum. They are now writed little bit specialy.
This dev. pack is designer on two different BMX mods - miniB3DExtNew and Leadwerks.
This solution is good for me , because i have crapy notebook in office and i want some-time work on my game prototypes and ideas.
What is include:
01 - GUI sample
02 - HUD sample
03 - SBX file loader
04 - Space Invaders Game
All this samples are possible compile with LE or miniLE (modified miniB3DExtNew) very simple.
For miniLE compilation u need use this part of code:
Import agfx.agfx_minile Include "classes/AGFX_WRAPPER/miniB3Dext/TAGFX_LE_Wrapper_to_mB3D.bmx" Include "classes/TAGFX.bmx"
and for LE compilation u need use this part of code:
Framework leadwerks.engine Import "classes/Framework/Framework.bmx" Include "classes/AGFX_WRAPPER/Leadwerks/TAGFX_LE_Wrapper_to_LE.bmx" Include "classes/TAGFX.bmx"
Note #1: Wrapper contain basic commands for entity, color, fonts, text, texture, World, ...
Note #2: you need use absolut path to file for loading content, this path is automaticaly converted to abstract path when is used LE compilation.
Example:
File "media_si/Models/enemy_a/si_enemy_a.gmf" is with miniLE converted to "media_si/Models/enemy_a/si_enemy_a.b3d" and with LE to "abstract::si_enemy_a.gmf".
For more infos look inside my code - are free - like before
Screenshots:
Download: DEV PACK
-
Yeah, good for relax after very "bad" day
-
Hi,
when anybody like Cube 2: Sauerbraten Justice Edition, from today i have private game-server Cube2Fun up.
How-to connect:
1) Press key T
2) put this line: /connect 213.160.164.14 28000 tmsk
3) press ENTER
Note: Daily since 18:00 - 23:00 CET
-
Death is fact, all others is illusion.
-
Very nice tool. Great job.
-
execute script inside code:
lua_dofile(...)
lua_dostring(...)
-
A lot of years only WASD + mouse, last few years only JOYPAD on X360, and i like it too.
-
-
File Name: TFontManager
File Submitter: AndyGFX
File Submitted: 03 Jul 2010
File Category: BlitzMax Code
TFontManager Class:
Type TFontManager Field fonts:TMap Field CurrentFont:TGLFont Method New() Self.fonts = New TMap Local def:TGLFont = LoadFont("incbin::Arial9") Self.fonts.Insert("Arial9", def) End Method Method AddFont(fname:String) Local fnt:TGLFont = LoadFont("abstract::" + fname) Self.fonts.Insert(fname, fnt) ? Debug Print("FONT: " + fname + " loaded.") ? End Method Method RemoveFont(fname:String) Self.Fonts.Remove(fname) End Method Method SetCurrentFont(fname:String) Self.CurrentFont = TGLFont(Self.fonts.ValueForKey(fname)) SetFont(Self.CurrentFont) End Method Method GetCurrentFont:TGLFont() Return Self.CurrentFont End Method end type
sample:
... Global Fonts:TFontManager = New TFontManager ... Fonts.AddFont("courier_new_8_bold") Fonts.AddFont("courier_new_8_normal") Fonts.AddFont("verdana_10_normal") Fonts.AddFont("verdana_10_bold") ... Fonts.SetCurrentFont("courier_new_8_normal") DrawText("FPS: " + UPS(), 10, GraphicsHeight() - 16 * 2) Fonts.SetCurrentFont("courier_new_8_bold") DrawText("FPS: " + UPS(), 10, GraphicsHeight() - 16) ... ' get current font Local actualfont:TGLFont = Fonts.GetCurrentFont() ... 'set default font back Fonts.SetCurrentFont("Arial9")
-
Here is simple example howto write FontManager for LE in BMX.
Class:
Type TFontManager Field fonts:TMap Field CurrentFont:TGLFont Method New() Self.fonts = New TMap Local def:TGLFont = LoadFont("incbin::Arial9") Self.fonts.Insert("Arial9", def) End Method Method AddFont(fname:String) Local fnt:TGLFont = LoadFont("abstract::" + fname) Self.fonts.Insert(fname, fnt) ? Debug Print("FONT: " + fname + " loaded.") ? End Method Method RemoveFont(fname:String) Self.Fonts.Remove(fname) End Method Method SetCurrentFont(fname:String) Self.CurrentFont = TGLFont(Self.fonts.ValueForKey(fname)) SetFont(Self.CurrentFont) End Method Method GetCurrentFont:TGLFont() Return Self.CurrentFont End Method end type
sample:
... Global Fonts:TFontManager = New TFontManager ... Fonts.AddFont("courier_new_8_bold") Fonts.AddFont("courier_new_8_normal") Fonts.AddFont("verdana_10_normal") Fonts.AddFont("verdana_10_bold") ... Fonts.SetCurrentFont("courier_new_8_normal") DrawText("FPS: " + UPS(), 10, GraphicsHeight() - 16 * 2) Fonts.SetCurrentFont("courier_new_8_bold") DrawText("FPS: " + UPS(), 10, GraphicsHeight() - 16) ... ' get current font Local actualfont:TGLFont = Fonts.GetCurrentFont() ... 'set default font back Fonts.SetCurrentFont("Arial9")
-
i like it ... actual result 50:50 BMX/C++
-
-
@NA: OK. Today i prepare my GUI/HUD code as Demo and then i send you link to download via PM. Look on it and then we prepare final design doc of GUI/HUD and then we make decision what we/users need to finish or how to extend your or splited code, etc.
Note: Thank for positive opinion on my coding
Lua methods called from Editor
in Programming
Posted
WHen you want see how work my code, you can download it here: https://sites.google.com/site/andygfxproject/free-pascal/final3d-sdl-ngine/Final3D_SDL_nGine.rar?attredirects=0&d=1
Run: F3D_DEMO_scene_render.exe and press F1 or F3D_DEMO_gui_with_lua.exe - GUI has used call function from native code.
LUAfile:
..\Final3D_SDL_nGine\bin\data\scripts\editor\editor_gui.lua
and fnc is defined:
and now GUI.GetHSliderValue in native code: wF3D_GUI.pas
F3D.ScriptEngine.AddListFunction('GetHSliderValue', @lua_GUI_HSlider_GetValue);
Maybe your function isnt properly defined. I have used this steps
1) F3D.ScriptEngine.StartList('GUI');
2) Add functions to GUI table;
3) F3D.ScriptEngine.EndList(); (F3D_ScriptEngine.pas)
I have used Lua 5.1 and bum dll, for linux was used lua.so