Murga-Projects Forums
iGame3D MurgaLua'd - Printable Version

+- Murga-Projects Forums (http://www.murga-projects.com/forum)
+-- Forum: Project Forums (/forumdisplay.php?fid=1)
+--- Forum: MurgaLua - General (/forumdisplay.php?fid=2)
+--- Thread: iGame3D MurgaLua'd (/showthread.php?tid=257)


iGame3D MurgaLua'd - iGame3D - 11-24-2007 06:54 PM

iGame3D is an open source scriptable 3D game engine and modeling project for Mac and Windows.
We switched to an all Lua with murgaLua solution around May or so,
then life happens...
...months later we have this list of things that iGame3D manipulates  
  • Game Levels
  • 2D Text
  • Mesh Editing
  • 3D Model I/O
  • Object Animation
  • Particle Systems
  • 3D Sound
  • Lights
  • Paths
  • Scriptable GL Control
  • Object and Mesh Materials
  • Movie export
  • Networking
  • MurgaLua FLTK Interfaces

Here's the in progress documentation to date:
iGame3D Lua Reference
iGame3D Scripting Reference
Materials Reference
Particles Reference
Scripting Samples
and thanks to Chrimo we have FAQ

Here's a movie of our most recent feature, ragdolls



The source is up on Source Forge via SVN. Here are instructions on how to check out the SVN

Last year or so the new interface for it  it looked like this:


Where and how best to start over with murgaLua?
What feature to exploit/explain first and foremost?

Just looking for ideas and would appreciate some suggestions.


RE: iGame3D MurgaLua'd - chrimo - 11-24-2007 09:36 PM

iGame3D Wrote:
iGame3D is an open source scriptable 3D game engine and modeling project for Mac and Windows.
We switched to an all Lua with murgaLua solution around May or so,
then life happens...

Just looking for ideas and would appreciate some suggestions.


WOW, this sounds for me like a perfect environment for my Lego-NXT-Robot-Simulation...

Christian


RE: iGame3D MurgaLua'd - chrimo - 11-24-2007 09:53 PM

chrimo Wrote:

iGame3D Wrote:
iGame3D is an open source scriptable 3D game engine and modeling project for Mac and Windows.
We switched to an all Lua with murgaLua solution around May or so,
then life happens...

Just looking for ideas and would appreciate some suggestions.


WOW, this sounds for me like a perfect environment for my Lego-NXT-Robot-Simulation...

Christian


iGame3D,
please can you post some simple introduction about svn checkout and
how to start the first very very simple application ?

Idea: just moving around a Lego-Robot, controlled by Lua (robot.forward(speed), robot.left(degree), robot.stop())
Later: escape the robot from a labyrinth :-) (us_distance=robot.ultrasonic(), ir_detect=robot.infrared())

Something like this:
http://www.java-hamster-modell.de/
http://www.heise.de/ct/projekte/ct-bot/ct-sim.shtml

This will be a excellent testenvironment for pbLua (native Lua at Lego-Hardware)
http://www.hempeldesigngroup.com/lego/pbLua/
http://mindstorms.lego.com/

Thanks for more :-)
Bye
Christian


RE: iGame3D MurgaLua'd - chrimo - 11-24-2007 10:13 PM

First step: check out from repository for beginners :-)

1. install subversion (svn), I use fink or ports (OSX-User)

2. running check out command
svn co https://igame3dsource.svn.sourceforge.net/svnroot/igame3dsource
>>Checked out revision 368.

3. collecting more informations and try to find some readme :-)

More later
Bye
Christian


RE: iGame3D MurgaLua'd - chrimo - 11-24-2007 10:50 PM

chrimo Wrote:
3. collecting more informations and try to find some readme :-)

More later
Bye
Christian


I need to recompile for OSX 10.5.1 (PPC)

Building target “iGame3D Player (Upgraded)” of project “iGame3D Player” with configuration “Development” — (1 error)
    cd /Users/chrimo/prog/3D/igame3dsource/ig3d_mac_xcode
    /Developer/usr/bin/gcc-4.0 -o "/Users/chrimo/prog/3D/igame3dsource/ig3d_mac_xcode/build/iGame3D Player.build/Development/iGame3D Player (Upgraded).build/Objects-normal/ppc/iGame3D Player" -L/Users/chrimo/prog/3D/igame3dsource/ig3d_mac_xcode/build/Development -L. -F/Users/chrimo/prog/3D/igame3dsource/ig3d_mac_xcode/build/Development "-FiGame3D Player.app/Contents/Frameworks" "-F/Users/chrimo/prog/3D/igame3dsource/ig3d_mac_xcode/iGame3D Player.app/Contents/Frameworks" -filelist "/Users/chrimo/prog/3D/igame3dsource/ig3d_mac_xcode/build/iGame3D Player.build/Development/iGame3D Player (Upgraded).build/Objects-normal/ppc/iGame3D Player.LinkFileList" -lnewton32 -framework AGL -framework OpenGL -framework QuickTime -framework Carbon -lnewton64 -framework OpenAL -framework Ogg -framework Vorbis -llua -lluasocket -lfltk_forms -lfltk_images -lfltk_jpeg -lfltk_png -lfltk_z -lfltk /Users/chrimo/prog/3D/igame3dsource/ig3d_mac_xcode/murgaLua.a -arch ppc -mmacosx-version-min=10.4 -lstdc++ -lm -ldl -header_pad_max_install_names -trigraphs -isysroot /Developer/SDKs/MacOSX10.4u.sdk
ld: duplicate symbol dgCollisionChamferCylinder::~dgCollisionChamferCylinder()in ./libnewton64.a(dgCollisionChamferCylinder.o) and ./libnewton32.a(dgCollisionChamferCylinder.o)

collect2: ld returned 1 exit status
ld: duplicate symbol dgCollisionChamferCylinder::~dgCollisionChamferCylinder()in ./libnewton64.a(dgCollisionChamferCylinder.o) and ./libnewton32.a(dgCollisionChamferCylinder.o)
collect2: ld returned 1 exit status
Build failed (1 error)

Now I need your help

Bye
Christian


RE: iGame3D MurgaLua'd - chrimo - 11-24-2007 11:21 PM

I've tried it at my OSX 10.5.1 (Intel) too....
Same problem when trying to build.

Now you should ask me: why do you try to rebuild ?
Answer: when trying to start Player, I get the error message:

Your architecture is not supported

OSX 10.51 (Leopard) problem ?

Christian


RE: iGame3D MurgaLua'd - Tobi - 11-25-2007 04:36 AM

Hello,

yes it looks like a leopard problem. Probably some small things need to be fixed in the xcode project file to get it to work. Too bad none of us devs is on 10.5 yet.
Looks like I need to upgrade :/

-Tobi

chrimo Wrote:
I've tried it at my OSX 10.5.1 (Intel) too....
Same problem when trying to build.

Now you should ask me: why do you try to rebuild ?
Answer: when trying to start Player, I get the error message:

Your architecture is not supported

OSX 10.51 (Leopard) problem ?

Christian




RE: iGame3D MurgaLua'd - iGame3D - 11-25-2007 05:14 AM

Hey thanks for going that far.

I use ZigVersion for SVN, keychain access to the repository.
I forget about having to learn how to do it.

I'll post a hello world while we get the fleas out of leopard.


RE: iGame3D MurgaLua'd - Tobi - 11-25-2007 05:37 AM

Oh, by the way, the player app that comes with the svn checkout is NOT the one to execute. It is used for a framework embedding workaround in a post-link phase. So you always need to build the player yourself which will go into the "build"-Folder.

One idea to fix your link error is to remove libnewton64.a from the xcode project and rebuild. It works fine without it for me, maybe it helps you.

Good luck


RE: iGame3D MurgaLua'd - chrimo - 11-25-2007 06:16 AM

Tobi Wrote:
Oh, by the way, the player app that comes with the svn checkout is NOT the one to execute. It is used for a framework embedding workaround in a post-link phase. So you always need to build the player yourself which will go into the "build"-Folder.

One idea to fix your link error is to remove libnewton64.a from the xcode project and rebuild. It works fine without it for me, maybe it helps you.

Good luck


my result:
15 errors when trying to build
Are you interested in more details ?

Thanks for all you support
Bye
Christian


RE: iGame3D MurgaLua'd - chrimo - 11-25-2007 06:38 AM

After a "Clean all targets" from XCode I got 197 erros ;-(
Everything based on svn "Updated to revision 368"

Bye
Christian


iGame3D Hello World - iGame3D - 11-25-2007 09:20 AM

This is about our seventh system version since starting the project.
Onward marches progress.

I posted a link earlier and realised that the Data folder was missing.
You'll need to SVN the Data folder once we get this thing back on its tentacles.

Once you have a working version you should be able to drag this
script to the application icon (as a file from finder) and get Hello world.

Code:
-- text box creation 101
gTextboxes={}

-- note the image file and path you must have, its usually bundled.
gTextboxes[1]=make(ig3d_text_box, "Data/FontPngs/default32_1.png")

--font styling
setText_boxInfo(gTextboxes[1], IG3D_COLOR, 1.0,1.0,1.0,1)
setText_boxInfo(gTextboxes[1], IG3D_SIZE, 64)

--textbox position
setText_boxInfo(gTextboxes[1], IG3D_POSITION, 45 , 45)

--define a function for the game loop
function gamemodefunc()
setText_boxInfo(gTextboxes[1], IG3D_TEXT, "Hello World")
end

--tell engine what function to loop in game mode
game_func= gamemodefunc

--tell engine what the edit loop is, for now its the same
edit_func= gamemodefunc

ig3d_SetMode_i(4)  -- play mode!



Scripts branch beginning in iGame3D Player.app/Data/game script.lua

To have the engine do nothing but hello world the script above as the game script would do the job.

Theoretically a whole game or program could be run from game script.lua,
but that would be madness.

Usually at the end of the game script we send a loadLevel command which seeks a folder within the Levels folder and runs a "load script.lua" there in, clearing any level content previously loaded.

I'm getting ahead of myself, next we'll interact using the example above.
And clear up any questions..?


iGame3D Play and Edit Mode Toggle - iGame3D - 11-26-2007 05:30 AM

ok here's the same code as above, only "hello world" is now a clock
and the escape key toggles between play and edit modes.

In edit mode you'll be able to move the text box around with the mouse.

Code:
gTextboxes={}
gTextboxes[1]=make(ig3d_text_box, "Data/FontPngs/default32_1.png")
setText_boxInfo(gTextboxes[1], IG3D_COLOR, 1.0,1.0,1.0,1)
setText_boxInfo(gTextboxes[1], IG3D_POSITION, 45 , 45)
setText_boxInfo(gTextboxes[1], IG3D_SIZE, 64)

function time()
return string.sub(os.date(),11,20)
end

--define a function for the game loop
function gamemodefunc()
    setText_boxInfo(gTextboxes[1], IG3D_TEXT, time())
    fltk_update();
    char,code,name=input(false)
    --Toggle to edit mode on escape key down
    if name=="Escape" then ig3d_SetMode_i(1) end
end

--define a function to handle editing mode events
function editmodefunc()
    setText_boxInfo(gTextboxes[1], IG3D_TEXT, time())
    fltk_update();
    char,code,name=input(false)
--Toggle to play mode on escape key down
    if name=="Escape" then ig3d_SetMode_i(4) end
end

game_func= gamemodefunc--tell engine what the game loop is
edit_func= editmodefunc--tell engine what the edit loop is
ig3d_SetMode_i(4)  --- play game!


Next up a murgaLua UI.


iGame3D Background Color Controller UI - iGame3D - 11-26-2007 05:55 AM

I made the UI in Fluid, save to cxx, iGame3D converts it to a lua file and runs it on drag and drop to the application icon.

This UI controls the background color.

Code:
    

--UI roller callback for color values
function color_Rollers()

--retrieve roller values
RedBack=Red_roller:value()
BlueBack=Blue_roller:value()
GreenBack=Green_roller:value()

--set the background color
setSceneInfo(IG3D_BACKGROUND_COLOR, RedBack, BlueBack, GreenBack)

--update labels
Red_roller:label(RedBack)
Blue_roller:label(BlueBack)
Green_roller:label(GreenBack)
end

--a Window with three rollers
  do local object = fltk:Fl_Double_Window(155, 137);
    window = object;
    do BackgroundColor = fltk:Fl_Group(0, 10, 145, 125, "Background Color");
      BackgroundColor:labelsize(9);
      do Red_roller = fltk:Fl_Roller(10, 10, 135, 25);
        Red_roller:type(1);
        Red_roller:labelsize(9);
        Red_roller:callback(color_Rollers);
      end -- Fl_Roller* Red_roller
      do Blue_roller = fltk:Fl_Roller(10, 55, 135, 25);
        Blue_roller:type(1);
        Blue_roller:labelsize(9);
        Blue_roller:callback(color_Rollers);
      end -- Fl_Roller* Blue_roller
      do Green_roller = fltk:Fl_Roller(10, 100, 135, 25);
        Green_roller:type(1);
        Green_roller:labelsize(9);
        Green_roller:callback(color_Rollers);
      end -- Fl_Roller* Green_roller
      Fl_Group:current(Fl_Group:current():parent());
    end -- Fl_Group* BackgroundColor
    Fl_Group:current(Fl_Group:current():parent());
  end

  
--Activate this window
  window:show();
  ig3d_RebuildMacMenubar();

--lets ask tobi for a description of this section
  if game_func==nil then
      function runner()
          fltk_update();
      end
      game_func=runner;
  end

--UI style
  Fl:scheme("plastic")


If we wanted to set the text color interactively we might do something like

Code:
setText_boxInfo(gTextboxes[1], IG3D_COLOR, RedBack, BlueBack, GreenBack,1)


Ok that about covers the very basics. What next?


RE: iGame3D MurgaLua'd - chrimo - 11-27-2007 06:01 AM

Hi,
I give up, trying to compile the code at Leopard now ;-(
Coming back when seeing a sign at svn update :-)

In the meantime I try to understand the idea of your engine and murgaLua integration... I think, it seems to be  a perfect environment for pseudo simulation (game like) robotics... Virtualisation ist the first step for my idea - simulation physics the next part :-)

Thanks for all
Bye
Christian


iGame3D Object import and control - iGame3D - 11-27-2007 06:34 PM

I had a longer post, now lost to the ether, a more complex script was created for this demonstration but here's a quick and dirty version to demonstrate object creation at its leanest and direct translation of the object in space via the keyboard WASDRF keys.

Code:
--Create an object
gObjects[1]={}
gObjects[1].cObj=make(ig3d_object, "cube.wtf")
theCube=gObjects[1].cObj
setObjectInfo(theCube, IG3D_NAME, "cube1")
                                       
--define a function for the game loop
function MoveBoxWithWASDRF()
objectSpeed=0.02
--control the object with keyboard
fltk_update();
char, code, name=input(false)
--forward and back
    if key("w","-") then zm= -objectSpeed end
    if key("s","-") then zm=objectSpeed end
    if zm~=0 then xm,ym=0,0 end
--left and right
    if key("a","-") then xm= -objectSpeed end
    if key("d","-") then xm=objectSpeed end
    if xm~=0 then zm,ym=0,0 end
--up and down
    if key("r","-") then ym=objectSpeed end
    if key("f","-") then ym= -objectSpeed end
    if ym~=0 then xm,zm=0,0 end
--stop the motion with spacebar
    if key(" ","-") then xm,ym,zm=0,0,0 end

--get object coordinates
ox,oy,oz=getObjectInfo(theCube,IG3D_POSITION)

--modify coordinates
ox=ox+xm
oy=oy+ym
oz=oz+zm

--reposition object
setObjectInfo(theCube,IG3D_POSITION, ox,oy,oz)
end

--tell engine what function to loop in game mode
game_func= MoveBoxWithWASDRF

-- for now edit is the same as game loop
edit_func= MoveBoxWithWASDRF

ig3d_SetMode_i(4)  -- play mode!


The same basic code can be used to create and manipulate other entities in the iGame3D scene. In a game scenario we don't manipulate objects so directly, we use physics, which I'll demonstrate soon with this robot thing in mind.

Perhaps a simple robot emulation program for me to test?
What data will the robot and 3D scene share?


RE: iGame3D MurgaLua'd - chrimo - 11-28-2007 12:26 AM

Hi,

I use a very simple testprogram for my old simulation with murgaLua...
It uses a field of LEGO-brick and walls, moving around and should never collidate
with the walls :-)

What format is used for the moving object ?
Are png's OK for the static objects (bricks for the wall) ?

I think your environment will make me happy in the future :-)

Christian


Code:
-----------------------------------
-- Robot Programm for Lua Beginners
-- VERSION
-- @Author: chrimo@moccy.xdsnet.de
-- @DATE: May 2007
-- @LASTCHANGE: today
-----------------------------------


-- Robot for Beginners Project --
-- Simple framework for kids or young people without programming experience
-- functions are filled up step by step
--

--[[
Implemented robot functions:
**********************
robot.forward(speed)
robot.backward(speed)
robot.turn(degree);
robot.left(speed)
robot.right(speed)
robot.stop()
robot.off()
robot.beep(count)
robot.idle(mseconds)
robot.info()
--]]

-- nxt.SimInit();
near_distance=30;
-- robot.info(1);
while(nxt.ButtonRead() == -1) ) do
    -- Simple Ant-Brain :D forward or back-left algorithm
    
    if(robot.USRead(4) <= near_distance) then
        robot.backward(100);
        robot.left();
    else
        robot.forward(100);
    end
end




RE: iGame3D MurgaLua'd - Tobi - 11-28-2007 06:04 AM

Hi Christian,

You can use PNGs (and only PNGs) for your textures.
Those textures can be applied to both dynamic objects and the static world, ie brickwalls. We'd be glad to see some robot action happening in iGame3D!

Getting back to the linking problem:
Obviously there is a problem with the newton physics engine.
It would be great help if you could download the mac version of this engine from http://www.newtongamedynamics.com and try to build it with your xcode and tell us the results of this of course Wink

Regards,

Tobi

chrimo Wrote:
Hi,

I use a very simple testprogram for my old simulation with murgaLua...
It uses a field of LEGO-brick and walls, moving around and should never collidate
with the walls :-)

What format is used for the moving object ?
Are png's OK for the static objects (bricks for the wall) ?

I think your environment will make me happy in the future :-)

Christian




RE: iGame3D MurgaLua'd - chrimo - 11-28-2007 06:32 AM

Hi Tobi,

give me a second, I try it now...

Bye
Christian


RE: iGame3D MurgaLua'd - chrimo - 11-28-2007 06:36 AM

Result:
download, extract, double click xcode.project-file, build and run...

The earth rotates very fast !

What now ?

Christian


RE: iGame3D MurgaLua'd - Tobi - 11-28-2007 07:11 AM

Thanks for testing that.
Hm, ok, then it might not be newton. I guess we need to buy Leopard to sort out the problems. But so you can still try iGame3D I have uploaded the universal binary build of the player application to
http://www.igame3d.de/player.zip

You can download it from there and put it into /ig3d_mac_xcode/build/Development

Do you have the folder /ig3d_mac_xcode/Data ?

If not, you should cd into ig3d_mac_xcode and checkout the Data folder from svn into it.

Now you should be able to run this player in the Development folder. (Without the Data folder it will launch and present a grey window only).

Good luck!

Tobi

chrimo Wrote:
Result:
download, extract, double click xcode.project-file, build and run...

The earth rotates very fast !

What now ?

Christian




RE: iGame3D MurgaLua'd - chrimo - 11-28-2007 07:29 AM

Tobi Wrote:
Hm, ok, then it might not be newton. I guess we need to buy Leopard to sort out the problems. But so you can still try iGame3D I have uploaded the universal binary build of the player application to
http://www.igame3d.de/player.zip
[quote=chrimo]
Result:
download, extract, double click xcode.project-file, build and run...

The earth rotates very fast !


Hi Tobi,

your precompiled Player works out of the box with Leopard !!!

I got your "hello work" just this moment :-)
This will be a very nice startup point for more test :-)

Thanks a lot for excellent support

Bye
Christian


RE: iGame3D MurgaLua'd - Tobi - 11-28-2007 07:43 AM

Great! At least it runs under Leopard, getting it to build with new xcode should be straightforward once we upgrade.

Be sure to check out the iFly, FPS and SquigLand levels in the player ;-)
W,A,S,D keys and mouse are used to control them.

Have fun

Quote:
Hi Tobi,

your precompiled Player works out of the box with Leopard !!!

I got your "hello work" just this moment :-)
This will be a very nice startup point for more test :-)

Thanks a lot for excellent support

Bye
Christian




RE: iGame3D MurgaLua'd - chrimo - 11-29-2007 02:58 AM

Hi Tobi,

what does this mean in detail ? Isn't the svn checkout enough ?

While playing around I have some more questions:

1. how can I open/run own scripts with your player (cmd line or open requester) ?
Currently, I have just patched the default "game script.lua" inside the Player.app for my tests...
2. Are these demo-snipsets  available as downloadable scripts ?

Thanks for more input :-)

Bye
Christian


RE: iGame3D MurgaLua'd - iGame3D - 11-29-2007 03:25 AM

chrimo Wrote:
What format is used for the moving object?


The model format for non-static objects is WTF.
iGame3D can import 3DS, OBJ, and LWO files and export the WTF file.

We also have a WTF exporter for AC3D, which I think supports the Lego format.
We have another exporter for Blender, but I believe it may not support textures.

chrimo Wrote:
Are png's OK for the static objects (bricks for the wall) ?

For a simple fast approach, you may want to use modified clones of the WTF files "square" and "cube"

Square.wtf can be thought of as a sprite.
Its four corners, 2 polygons, 1 face, it can be solid, mobile, and you can make an unknown amount of equally controllable clones.

Lets look inside this file at its Materials properties.
I'm going to comment some data but normally thats not in a WTF file.
I also removed OpenGL's extra zero's.

Code:
#Materials: -- here's the header to search for in a WTF
1 -- number of materials on this object
acmat_0 -- the material name..this model came from ac3d
13 -- number of properties the material has
smooth=0
color=1.0,1.0,1.0,1.0
ambient=0.20,0.20,0.20,1.0
diffuse=0.80,0.80,0.80,0.80
specular=0.0,0.0,0.0,1.0
shininess=0.0
emission=1.0,1.0,1.0,1.0
blend=1
wire=0.0
depth=1
-- Just modify a path at these lines to change textures. 
texture=1,Data/Images/BrickRoomLarge_wtf.png
texture=2,Data/Images/cloud.png
lux=true
2
1,0,3,1.0,0.0,0.0,0.0,0.0,1.0
3,2,1,0.0,1.0,1.0,1.0,1.0,0.0


This material currently has 2 textures, it can have more or less.

Let your imagination go wild with the uses of a flat plane wooo!

The cube is probably best to deal with, you can place it without worrying about its open behind, and scale it to meet various thicknesses.

Its texture can be replaced easily in a text editor or with scripts as well.
I'll dig for a scripting example of textures to amend this with.


RE: iGame3D MurgaLua'd - chrimo - 11-29-2007 03:50 AM

MAGIC!
but very confusing for a 3D-rookie ;-)

After some more tries, I have to ask for more details...

I see the "Lego-NXT-Sim" at the horizon

Thanks for all this input
Bye
Christian


RE: iGame3D MurgaLua'd - iGame3D - 11-29-2007 04:02 AM

chrimo Wrote:
While playing around I have some more questions:
1. how can I open/run own scripts with your player (cmd line or open requester) ?
Currently I have just patches the default "game script.lua"


Add a folder inside "Data/Levels/" create your script and call it "load script.lua"
When you launch the current player it will show up in the list, just click to test, you can hide some of those other level folders to make the list shorter.
don't hide level "default", that makes the list of levels

You could also have a load script that simply loads one or many scripts from the Scripts folder as well. I tend to break the load scripts down into digestible smaller scripts, and then tell the load script to load all those files.

You could also redirect the game script.lua to open your level instead of level "default" .. this is the line you change for that.

Code:
if game_func==nil then loadLevel("Data/Levels/default") end


I don't like file requesters, I usually make lists that can load the available levels or models with a click or a drag. I'm not sure how far I got with that in MurgaLua last summer, looks like whatever I did I broke at some point.

There are two .sh files in the Data/Scripts/ folder, thats about as close as we've been to launching igame3d via a terminal window. I monkeyed with that for a bit, but didn't find it particularly useful. iGame3D feeds errors output to console.app, so you'll want that open from time to time to see where if things go wrong.

For a command line in the player, hit Command T after you open the program.
"Command I" creates an inspector window.

chrimo Wrote:
2. Are these demo-snipsets  available as downloadable scripts ?


You mean what I posted in the thread?
Here  they are as level folders and load scripts.

You'll find the background color script is in "ig3d_mac_xcode/Data/Fluid/background_color"

There's plenty of scripts in the Data folder to check out, especially in "/Data/Scripts/Functions/", these are used by most of the current levels available.

Also The Fluid folder is full of UI scripts, that I stopped working on as I was missing something important that ties them all together, still don't know what that is.

Hope that explained some things.

The SVN checkout  should be fine, if you also grab the extra Data directory.
iFly and the other demos are in the levels folder of that, the source with binary alone are pretty much a blank slate as far as content goes.
Not sure what Tobi uploaded for you to test, its probably everything you need.

There is some new documentation that Tobi just posted as well
Particles instructions
Materials instructions
More scripting docs coming up soon.

[edit--added script snippet link]


RE: iGame3D MurgaLua'd - chrimo - 11-29-2007 06:25 AM

Hi all my supporters,

that's really much stuff to learn ;-)
I think, I'll post my experiences after first success...

Millions thanks for your excelent support

Bye
Christian


RE: iGame3D MurgaLua'd - Tobi - 11-29-2007 07:07 AM

Ah, good to see Bill came up with one of his magic huge posts Smile

Just to be sure:

Chris, did you checkout both the "ig3d_mac_xcode" module and the "Data" module?
If not, you need to checkout the Data module so that it is a sub-directory of ig3d_mac_xcode Wink


RE: iGame3D MurgaLua'd - chrimo - 11-29-2007 07:29 AM

I've checked out just one single url and I got the following content:

main directory:
igame3dsource

Folder:
Data

Content:
Emitters Images WTF
Exporters Levels game script.lua
Fluid Scripts ogame script.lua
FontPngs Shaders oogame script.lua
Help Sounds testarmybuilder.xml
Icons Users

Folder:
ig3d_mac_xcode
...

Folder:
ig3d_win_mingw
...


Is this enough or do I need more ?

Christian


RE: iGame3D MurgaLua'd - chrimo - 11-29-2007 07:42 AM

Just another question:

where is the searchpath for Data ?
Is there a way to extend or manipulate the search path ?

Data is at the same level as:
Data ig3d_mac_xcode
iGame3D Player.app ig3d_win_mingw

Christian


RE: iGame3D MurgaLua'd - Tobi - 11-29-2007 07:45 AM

Ah, you checked out the whole thing.

The mac source (ig3d_mac_xcode), the Windows source (ig3d_win_mingw) and the Data folder.

Our idea was that the user would only checkout the source of his particular operating system and then checks out the Data folder into the source directory.

I guess we might need to reorganize that Wink

Since you already have the Data folder, you should simply move it into the source folder.

So that it looks like this:

ig3d_mac_xcode/Data

The player app should be in

ig3d_mac_xcode/built/Development/iGame3D Player.app

With this setup everything should work fine.


RE: iGame3D MurgaLua'd - Tobi - 11-29-2007 07:52 AM

Yes, you can change the search path for the data folder.

To do this, put something like this into the game script.lua inside the Data folder of the player bundle.

setSceneInfo(IG3D_ROOT, "/Users/chrimo/MyiGame3D/")

from now on iGame3D will look for a Data folder inside /Users/chrimo/MyiGame3D


RE: iGame3D Data Directories - iGame3D - 11-29-2007 09:10 AM

These files and directories must be present  in the package bundle to operate.
core.lua should not be edited, but it is useful to read.


At application launch the file iGame3D Player.app/ Data/Scripts/core.lua is run
followed by iGame3D Player.app/ Data/game script.lua

The definition for an external Data folder of scripts and other content
is defined in iGame3D Player.app/Data/game script.lua

The default when using the SVN repository is set to 3 folders out of the application bundle.

Other situations might point inside the bundle for deployment (0) or one level (1) out of the bundle for easy editing.

These changes are easy to make by changing a value in the game script.lua.

The default game script we are using looks like this

Code:
function goDirsUp(path, numLevels)
--takes a path (with trailing /) and moves up numLevels levels and returns it
    local i
    local c=-1
    for i=#path,1,-1 do
        if string.sub(path, i,i)=="/" then
            c=c+1
        end
        if numLevels<=c then return string.sub(path, 1,i); end;    
    end
end


--originating application path
bundleroot = getSceneInfo(IG3D_ROOT)


Set the value here to set the distance from the application bundle to the data folder.

Code:
gameroot=goDirsUp(bundleroot, 3)


Its default is at three to find the file outside of build/Development/iGame3D Player.app/
If you put your levels and content into the Data folder of the package you'd set the value to 0, or simply replace the line with gameroot=bundleroot
If you drop your Data folder in the same folder as the app, set the value to 1

Windows doesn't have packages so we keep the Data folder in the app path

Code:
if murgaLua.getHostOsName()=="macos" then
setSceneInfo(IG3D_ROOT,gameroot) --custom gameroot
end
gameroot=getSceneInfo(IG3D_ROOT)


Now that we can find our Data we branch to customizable scripts.
The default level is a menu and loads functions to activate the console,
inspector, and a missing script editor.

Code:
if game_func==nil then loadLevel("Data/Levels/default") end




RE: iGame3D MurgaLua'd - chrimo - 11-29-2007 09:24 AM

YEP,
these informations, I missed make it more transparently, what happens inside...
Now, I think, I will manage it to create own simple applications.

Thanks for ALL *.*

Greetings from Hamburg/Germany
Bye
Christian


RE: iGame3D MurgaLua'd - chrimo - 12-02-2007 10:56 PM

Hi again :-)

I've copied the DataDirectory from SVN directly into the Player.app container now...

Player.app
Contents
Data

but when trying to execute the player, I get the following error...
Any idea, wht I'm doing wrong ?

Thanks for some more hints
Bye
Christian

/Users/cmock/Desktop/iGame3D\ Player.app/Contents/MacOS/iGame3D\ Player ; exit;
x49ws40cmock:~ cmock$ /Users/cmock/Desktop/iGame3D\ Player.app/Contents/MacOS/iGame3D\ Player ; exit;
----- OpenGL Fullscreen setup -----

CGGetActiveDisplayList() returned: 0
Number of active displays found: 1
Picked display 1

Display 1 Information:
Resolution: 1280x800 pixels
Refresh Rate: 0.000000 Hz
Colors: 32-bit (Millions)
Trying to get a valid fullscreen OpenGL pixel format on device...
DMGetGDeviceByDisplayID() returned 0
aglChoosePixelFormat() returned a valid fullscreen OpenGL pixel format on this device!
aglCreateContext() succeeded.
aglSetCurrentContext() succeeded.
Stencil buffer bits: 8
OpenGL Version: 1.2 APPLE-1.5.18
GLSL is supported.
GL_ARB_fragment is supported.
Number of texture units: 8
[string "line"]:19: attempt to call field 'getHostOsName' (a nil value)


RE: iGame3D MurgaLua'd - iGame3D - 12-03-2007 04:46 AM

Can you post the game script, it looks like the error is there.

GetHostOsName shouldn't be returning a nil value.

It could be that the game script is still looking three folders out of the build folder for something?

Check that the script says murgaLua.getHostOsName()


RE: iGame3D MurgaLua'd - chrimo - 12-03-2007 06:50 AM

Hi all,

with the excellent support of Tobias and Bill, it will compile, link and install now at OSX 10.5 (Leopard) !!!
WOW, magic sceneries controlled by murgaLua-Power...
I have no words for this.

Great job, well done by the iGAME3D crew.

You must give it a try!

Thanks for ALL
Bye
Christian


RE: iGame3D MurgaLua'd - Tobi - 12-03-2007 07:09 AM

Hey folks,

To make life easier and reduce confusion here is the guide on how to check out iGame3D on OS X and on Windows. On both systems you will need Subversion (svn).

Under Mac OS X open up a terminal window and cd (change directory) to the place where you want iGame3D stored. Then enter the following:

Code:
svn co https://igame3dsource.svn.sourceforge.net/svnroot/igame3dsource/ig3d_mac_xcode ig3d_mac_xcode
cd ig3d_mac_xcode
svn co https://igame3dsource.svn.sourceforge.net/svnroot/igame3dsource/Data Data

After that open up the .xcodeproj and build iGame3D. You can run it from there as well. NOTE: the actual player is in build/Development/
Don't try to run the player at the root directory.

Under Windows, open the system console and also cd (change directory) to the place where you want iGame3D stored. Then enter the following:

Code:
svn co https://igame3dsource.svn.sourceforge.net/svnroot/igame3dsource/ig3d_win_mingw ig3d_win_mingw
cd ig3d_win_mingw
svn co https://igame3dsource.svn.sourceforge.net/svnroot/igame3dsource/Data Data


Then you can use MingW/MSYS to build the player.exe or simply use the one that comes with the source.

Good luck


RE: iGame3D MurgaLua'd - chrimo - 12-09-2007 12:18 AM

Hi,

I've started a small iGame3D-FAQ with all my own questions...
Hopefully, I get answers from the world :-)

Is there already another FAQ available ? Else I can try to start this job.
Are there more questions of interest ?

Today I try to start to answer the first questions :-)
Christian

Code:
iGame3D FAQ written by a fan called chrimo :-D
===========-----------------------------------

What is iGame3D ?

Who are the makers of iGame3D ?

What is Lua ?

What is murgaLua ?

What is FLTK ?
    
What is Newton physics ?

What are emitters ?

What are exporters ?

What is Fluid ?

What is PNG ?

What graphic formats are supported ?

What are icons ?

What are images ?

What are FontPngs ?

What is WTF ?

What are shaders ?

What are materials ?

What are meshes ?

What are Levels ?

What are scripts ?

Does iGame3D support sound ?

What is Ogg ?

Does iGame3D support networking ?

Which operating systems are supported ?
    OSX >10.4
    Windows
    Linux

Where can I get iGame3D ?

Where can I get the last developer previews ?

Are there prebuild binary versions for iGame3D available ?
    
How can I start iGame3D applications ?
    iGame3D Player

How should I start with iGame3D ?
    Start iGame3D Player and what the sample applications.

How can I build my own iGame3D applications ?
    Data/Levels/MyApplicationName
    Data/Levels/MyApplicationName/game script.lua

Where can I find the Data directory ?

What is minimal neccessary for an application ?
    HelloWorld

How can I open a window for my own application ?

How can I add a background ?

How can I add an object ?

How can I move the object ?

How can I check collisions with other objects ?

Which iGame3D API calls are available ?
    Data/Help/scripting.html
    Data/Help/reference.html




RE: iGame3D MurgaLua'd - chrimo - 12-09-2007 05:51 AM

iGame3D Wrote:
Great! I'm on this. Will fill in all that I can and post as soon as I get the first draft up.

Have to run out for a bit but I wanted to post this first draft as far as I've gotten.

FAQ Draft 1

Will finish up and replace that link when I get back.


Hi,
WOW, you are too fast !
Before reading your FAQ,
I've sent more by email to help@igame3d.com ...

Thanks for excelent support
Bye
Christian


RE: iGame3D MurgaLua'd - iGame3D - 12-09-2007 02:18 PM

FAQ is about 99% done. New Url for the new draft.
FAQ Draft 3

Updated Sunday Dec. 09 2007


RE: iGame3D MurgaLua'd - chrimo - 12-09-2007 09:32 PM

iGame3D Wrote:

chrimo Wrote:
WOW, you are too fast !

Thats what the ladies used to say. Tongue

FAQ is about 60% done. New Url for the new draft.
FAQ Draft 2


upsssss....I'm not a lady, .... Is "good job, well done" better for you ? ;-)
Christian


RE: iGame3D MurgaLua'd - mikshaw - 12-12-2007 02:47 PM

A couple of anchors in the FAQ don't seem to work:
How can I start iGame3D applications?
Is there a 'Hello World' for iGame3D Player?


RE: iGame3D MurgaLua'd - chrimo - 12-12-2007 08:35 PM

Yes...
Tobi posted a "Hello World" in a previous post in this tread...
But it's an MacOSX binary only.

I think, we need more investigations in Windows and Linux
Bye
Christian


RE: iGame3D MurgaLua'd - mikshaw - 12-13-2007 01:31 AM

Quote:
Yes...
Tobi posted a "Hello World" in a previous post in this tread...

Sorry, maybe I should have quoted or something. I wasn't asking a question =o)


RE: iGame3D MurgaLua'd - iGame3D - 12-13-2007 02:55 AM

FAQ is fixed, and here's the current docs.
How to check out from SVN
iGame3D Lua Reference
iGame3D Scripting Reference
Materials Reference
Particles Reference
Scripting Samples

Feel free to ask questions, even if we already answered them.
We should now have two hello world's in the FAQ one with FLTK and one with OpenGL.

Oh and there is a new pause() function:

If trueOrFalse is set to true, this will pause iGame3D. All sounds are stopped and the time is halted. No game loop will be run. With trueOrFalse set to false, the game is unpaused (resumed).