Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Alex

Pages: [1] 2
GeeXLab - english forum / Re: simple Lua framework over GeeXLab Lua API
« on: October 19, 2017, 08:44:13 PM »
Hi JeGX,

Any news about high level framework ?


GeeXLab - english forum / simple Lua framework over GeeXLab Lua API
« on: September 30, 2017, 11:55:55 AM »
Hi JeGX,

Can you share plans for high-level Lua framework over GeeXLab Lua API?

I am hoping to use new GeeXLab in similar way old GeeXLab was envisioned.

Kind regards,

GeeXLab - english forum / Re: GeeXLab SDK ?
« on: November 27, 2016, 02:26:03 PM »
Hi JeGX,

Thanks for the encouraging answer.

Previous GeeXLab workflow was just perfect.

Maybe a simple Lua framework over GeeXLab Lua API can help you

Yes this would be awesome ! Now i feel like i need to know every detail in the industry to get me started. How can i get to the point where all works by default and i just change specifics of my visualization ? For example being able to not worry about render-loop code from the start, all added objects are visible and rendered in proper sequence, planes with alpha textures can be translucent, etc...

Before all i needed to do is specify plane with texture in XML or create in Lua and run it with GeeXLab player.


GeeXLab - english forum / Re: GeeXLab SDK ?
« on: November 27, 2016, 02:03:19 AM »
I just now realized how this version of GeeXLab is different from last one i used :o Too low-level for me, seams like i can't create simple scene no more. Sad day for me.

GeeXLab - english forum / GeeXLab SDK ?
« on: November 27, 2016, 01:26:11 AM »
Hi JeGX,

Can I buy professional version of GeeXLab ?

Long ago there was SDK version allowing one to create and package windows application. I very much liked that feature.


GeeXLab - english forum / Raspberry py and synergy
« on: June 01, 2016, 06:33:16 PM »

I am running GeexLab on raspberry pi and Synergy to share keyboard and mouse. In this setup mouse is not captured by GeexLab :(

General Discussion / Re: Some question ^^
« on: February 10, 2010, 05:44:38 PM »
Is it possible to group multiple meshes in a model using lua script ?
Yes, there is no particular problem.

Or even group multiple models together in the same(local) coordinate space, that would be nice :D
Never tried, but that should work...

Which example describes this ?

General Discussion / Re: Some question ^^
« on: February 08, 2010, 05:09:09 PM »
Is it possible to group multiple meshes in a model using lua script ?

Or even group multiple models together in the same(local) coordinate space, that would be nice :D

General Discussion / Re: Some question ^^
« on: February 08, 2010, 02:18:02 AM »

I tried to make box model out of 6 planes. The idea is to encapsulate 6 planes in parent object and make some method to change material of individual plane. So far box is created but it seams `HYP_Object.AddChild` is not enough to make a composite object.

here is test code:
Code: [Select]
<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
<scene name="test" show_ref_grid="TRUE" display_fps="TRUE">
<window_size width="960" height="640" width_offset="30" height_offset="50" fullscreen="FALSE" />
<ref_grid_color r="0.423" g="0.423" b="1.0" />

<camera name="myCamera" fov="60.0" navigation_mode="EXAMINE" near_plane="1.0" far_plane="40000.0" inertia="FALSE">
<lookat x="0.0" y="0.0" z="0.0" w="1.0" />
<position x="0.0" y="31.0" z="-15.0" />
<bkg_color r="0.0" g="0.0" b="0.0" />

<light name="myLight">
<ambient r="0.2" g="0.2" b="0.2" a="1.0" />
<specular r="0.1" g="0.1" b="0.1" a="1.0" />
<orientation pitch="-0.7" yaw="-0.70" roll="-0.70" />
<position x="1.0" y="40.0" z="1.0" />
<diffuse r="2.0" g="2.0" b="2.0" a="1.0" />

<texture name="imageJPG" filename="room.jpg" pixel_format="BGR" />       

<material name="constuctionPlaneMat" >
<add_texture name="imageJPG" />

<mesh name="plane1" shape_type="PLANE" render="TRUE" lighting="FALSE"
back_face_culling="FALSE" >
<plane x_size="150.0" z_size="128.0"  />
<position x="0.0" y="0.0" z="0.0" />
<orientation pitch="90.0" />
<attach_material name="constuctionPlaneMat" />

<script name="logging.lua" filename="logging.lua" run_mode="INIT" />
<script name="class_structure.lua" filename="class_structure.lua" run_mode="INIT" />
<script name="box.lua" filename="box.lua" run_mode="INIT" />
<script name="test_init.lua" filename="test_init.lua" run_mode="INIT" />

<script name="update_frame.lua" filename="mainloop.lua" run_mode="FRAME" />


Code: [Select]

CustomBox = GenericClass:new()

function, width, height, depth)
log( " Creating new box ..."..width..', '..height..', '..depth )
local new = getmetatable(self).new(self)
if not depth then depth=0 end
if not height then height=0 end
if not width then width=0 end
new.width, new.height, new.depth = width, height, depth

-- replacing this call:
-- = HYP_Mesh.CreateBox(width, height, depth, 1, 1, 1)
-- creating 6 planes to represent a box
local material = HYP_Object.GetId("constuctionPlaneMat")
new.sides = {}
new.sides[0] = new:CreatePlane(height, depth, 1, 1, CustomBox.PLANE_TYPE_YZ, material)
new.sides[1] = new:CreatePlane(height, depth, 1, 1, CustomBox.PLANE_TYPE_YZ, material)
HYP_Object.SetPosition(new.sides[0], width/2, 0, 0)
HYP_Object.SetPosition(new.sides[1], -width/2, 0, 0)

new.sides[2] = new:CreatePlane(width, depth, 1, 1, CustomBox.PLANE_TYPE_XZ, material)
new.sides[3] = new:CreatePlane(width, depth, 1, 1, CustomBox.PLANE_TYPE_XZ, material)
HYP_Object.SetPosition(new.sides[2], 0, height/2, 0)
HYP_Object.SetPosition(new.sides[3], 0, -height/2, 0)

new.sides[4] = new:CreatePlane(width, height, 1, 1, CustomBox.PLANE_TYPE_XY, material)
new.sides[5] = new:CreatePlane(width, height, 1, 1, CustomBox.PLANE_TYPE_XY, material)
HYP_Object.SetPosition(new.sides[4], 0, 0, depth/2)
HYP_Object.SetPosition(new.sides[5], 0, 0, -depth/2)

log( " Making box out of planes ..." )
-- reparent sides to form a box model
--    There is no method to create empty model obj. to hold this meshes, will try with gizmo ;)
local parent = HYP_Object.CreateGizmo()
for index = 0, 6 do
HYP_Object.AddChild( parent, new.sides[index] )

new.model = parent

return new

CustomBox.PLANE_TYPE_XZ = 0
CustomBox.PLANE_TYPE_XY = 1
CustomBox.PLANE_TYPE_YZ = 2

-- somehow HYP_Mesh.CreatePlane`s fifth parameter doesnot work ... so here we make a litle zbudz
function CustomBox.CreatePlane(self, w, h, w_segs, h_segs, plane_type, material)
local ret = HYP_Mesh.CreatePlane(w, h, w_segs, h_segs, PLANE_XZ)
log("new plane: "..w..', '..h..', '..plane_type)
log("mat id: ".. tostring(material))

if material then HYP_Object.SetMaterial(ret, material) end
if plane_type == CustomBox.PLANE_TYPE_XY then
log("rotate about X")
HYP_Object.SetPitch(ret, 90, 2)
elseif plane_type == CustomBox.PLANE_TYPE_YZ then
log("rotate about Z")
HYP_Object.SetRoll(ret, 90, 2)
return ret

Code: [Select]
our_box = CustomBox:new(1, 3, 7)

HYP_Object.SetPosition(our_box.model, 10, 0, 0)

`HYP_Object.SetPosition(our_box.model, 10, 0, 0)` is intended to move the whole box to new position, but i didn`t reparent those planes properly ...

Code: [Select]
LOG_USE_FILE = false

if LOG_USE_FILE == true then
local f = assert("app.log", "ab"))
f:write('\n\n\n\n\n\n\n\n\n\n\n\n\n logging started ..............................\n')

function log(msg)
if LOG_USE_FILE == true then
f:write(msg .. '\n')

Code: [Select]
GenericClass = {
new = function(self, obj)
local obj = obj or {}
setmetatable(obj, self)
self.__index = self
return obj

-- return a copy of the table t
function Clone(t)
local new = {}
local i, v = next(t, nil)
while i do
new[i] = v
i, v = next(t, i)
setmetatable(new, getmetatable(t) or {})
return new

-- return a copy of the table t
function DeepClone(t)
local new = {}             -- create a new table
local i, v = next(t, nil)  -- i is an index of t, v = t[i]
while i do
if type(v) == "table" then v = DeepClone(v) end
new[i] = v
i, v = next(t, i)        -- get next index
setmetatable(new, getmetatable(t) or {})
return new

General Discussion / Can we get a wiki
« on: February 07, 2010, 11:56:24 PM »
Hi JeGX,

Can You setup some wiki for geexlab users ? trac or something like that ... then we can move and expand documentation.


General Discussion / Re: Access command line parameters
« on: November 28, 2009, 12:02:00 AM »
Code: [Select]
myprogam.exe -size 1680 1050 -multiplayer

General Discussion / Access command line parameters
« on: November 22, 2009, 07:50:03 PM »

Is there a way to access command line parameters inside lua script ?



General Discussion / Beginners Work In Progress: Space, shooter minigame
« on: November 14, 2009, 02:51:24 PM »
Hi all,

Here is small video of current game progress :

There is also roadmap defined but its not in english, so i will try to summarize:

 - belongs to action / duengon / strategy / one-line shooter genre
 - planed to make game menu so player can choose game type according to his/her age
 - going to limit object movement in one plane. As I am convinced that it is tiresome for human players to think in 3D
 - for strategy mode there are great details for ship classes and technologies that you can put on ships. Ship class list:
         - Utility         
         - Interceptor      
         - Gunboat         
         - Heavy Gunship      
         - Corvette         
         - Frigate         
         - Lineship/Carrier   
         - Destroyer         
         - Cruiser         
         - Battlecruiser      
         - Battleship      
         - Dreadnought      
         - Leviathan         
         - Titan            
         - Death star      
   every advanced ship class can take greather number of technologies.

There are very few visual effects in game right now. Planed to add laser, gun, damage, etc .. effects after gameplay is done.

General Discussion / Object shadows
« on: November 10, 2009, 06:11:58 PM »
I am looking at `Shadow_Mapping` and `Shadow_Volumes` demos to see how it works.

What does that `shadow_caster="TRUE"` do?

Simply adding `shadow_caster="TRUE"` to my models introduces their shadows in the scene. So shader programs used in demos somehow add to that builtin shadow_caster functionality ?

How can every model cast shadow using one of those two techniques ?
Maybe iterating through every model, apply `HYP_Object.SetShadowCasterState`, apply shader program for every material in every mesh


General Discussion / Re: commandline
« on: October 12, 2009, 02:20:39 AM »
Thanks  :)

General Discussion / commandline
« on: October 11, 2009, 03:01:23 PM »

Is there some commandline options so that we can start demo from notepad++`s run dialog ?

General Discussion / Re: 2D physix
« on: October 10, 2009, 10:38:57 AM »
here is that code
Code: [Select]
local z,x,c = HYP_PhysX.GetActorLinearVelocity(body)
HYP_PhysX.SetActorLinearVelocity(body, z, 0, c)
z,x,c = HYP_PhysX.GetActorGlobalPosition(body)
HYP_PhysX.SetActorGlobalPosition(body, z, 0, c)
z,x,c = HYP_PhysX.GetActorAngularVelocity(body)
HYP_PhysX.SetActorAngularVelocity(body, 0.0, x, 0.0)
Runs in every frame.

When objects colide there is slight change in actor`s direction vector, it is no longer in game plane.

But what if there is function `HYP_PhysX.GetActorGlobalOrientation( )` then we could do this
Code: [Select]
local angle, x, y, z = HYP_PhysX.GetActorGlobalOrientation(body)
HYP_PhysX.SetActorGlobalOrientation(body, angle, x, y, z)
And then it can be done in every couple of seconds, not in every frame.

I tried with `HYP_Object.GetDirection` to retrieve current direction vector of body and failed.

General Discussion / 2D physix
« on: October 08, 2009, 11:17:36 PM »
Can we limit physics simulation to one plane ?
What would be the nice way to fix object y coordinate ?

General Discussion / Screenshots
« on: October 07, 2009, 10:30:43 AM »
The minigame has elements:
 - object movement. Done by `HYP_PhysX.AddSphereActorToScene`
 - shooting.
    - laser effect with `HYP_Primitive.CreateLine`
    - sound effect
    - and if there is target a particle effect on hit position

a screenshot:

Particle effect is working as expected, could not find doc about it in api reference.

Laser effect is not working. `HYP_Primitive.CreateLine` does return valid id (id > 0) but is not rendered, here is code :
Code: [Select]
line = HYP_Primitive.CreateLine('dzebana')
log('laser created : '.. line)
HYP_Primitive.SetLineVertexPosition(line, 0, pos.x, pos.y, pos.z)
HYP_Primitive.SetLineVertexPosition(line, 1, target.x, target.y, target.z)
HYP_Primitive.SetLineVertexColor(line, 0, 1, 0, 0, 0.7)
HYP_Primitive.SetLineVertexColor(line, 1, 1, 0, 0, 0.7)

For every sound effect (when ship fires you can hear 'zaap') I use load so user can hear effects overlapping :
Code: [Select]
local effect = HYP_Sound.Load('data/sound/zap.wav', 0)
HYP_Sound.SetSourcePosition(effect, pos.x, pos.y, pos.z)
I do not know whether to always create a new sound.

For collision detection I use `HYP_Scene.CastRay`. To better the detection model has sort of bounding box around it, with material that has alpha == 0 and white color. Somehow that material is not loaded properly or was lost during export from google sketchup to 3ds.
Maybe if I add boundingbox mesh manualy to model and set its material in script ..

Ideally, I would calculate collision with physix actors but I didn`t found the way to do it.

I like to define model in xml and then use it as template for instancing objects with the same model. In this case clone function comes handy. And I don`t know if it is good to use `HYP_Model.Load`every time when new element is inserted in scene.

Also there is another model far to the right but is not visible somehow.


Pages: [1] 2