News : The level of daily SPAM has reached insane proportions, all registrations are now manual. I ask you to send me an e-mail (john (at) murga (dot) org), to confirm that you want me to create an account for you.


Post Reply  Post Thread 
iGame3D MurgaLua'd
Author Message
iGame3D
Moderator
***


Posts: 231
Group: Moderators
Joined: Apr 2007
Status: Offline
Reputation: 0
Post: #1
iGame3D Hello World

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..?

This post was last modified: 11-26-2007 05:57 AM by iGame3D.

11-25-2007 09:20 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

Messages In This Thread
iGame3D MurgaLua'd - iGame3D - 11-24-2007, 06:54 PM
RE: iGame3D MurgaLua'd - chrimo - 11-24-2007, 09:36 PM
RE: iGame3D MurgaLua'd - chrimo - 11-24-2007, 09:53 PM
RE: iGame3D MurgaLua'd - chrimo - 11-24-2007, 10:13 PM
RE: iGame3D MurgaLua'd - chrimo - 11-24-2007, 10:50 PM
RE: iGame3D MurgaLua'd - chrimo - 11-24-2007, 11:21 PM
RE: iGame3D MurgaLua'd - Tobi - 11-25-2007, 04:36 AM
RE: iGame3D MurgaLua'd - iGame3D - 11-25-2007, 05:14 AM
RE: iGame3D MurgaLua'd - Tobi - 11-25-2007, 05:37 AM
RE: iGame3D MurgaLua'd - chrimo - 11-25-2007, 06:16 AM
RE: iGame3D MurgaLua'd - chrimo - 11-25-2007, 06:38 AM
iGame3D Hello World - iGame3D - 11-25-2007 09:20 AM
RE: iGame3D MurgaLua'd - chrimo - 11-27-2007, 06:01 AM
RE: iGame3D MurgaLua'd - chrimo - 11-28-2007, 12:26 AM
RE: iGame3D MurgaLua'd - Tobi - 11-28-2007, 06:04 AM
RE: iGame3D MurgaLua'd - chrimo - 11-28-2007, 06:32 AM
RE: iGame3D MurgaLua'd - chrimo - 11-28-2007, 06:36 AM
RE: iGame3D MurgaLua'd - Tobi - 11-28-2007, 07:11 AM
RE: iGame3D MurgaLua'd - chrimo - 11-28-2007, 07:29 AM
RE: iGame3D MurgaLua'd - Tobi - 11-28-2007, 07:43 AM
RE: iGame3D MurgaLua'd - chrimo - 11-29-2007, 02:58 AM
RE: iGame3D MurgaLua'd - iGame3D - 11-29-2007, 03:25 AM
RE: iGame3D MurgaLua'd - chrimo - 11-29-2007, 03:50 AM
RE: iGame3D MurgaLua'd - iGame3D - 11-29-2007, 04:02 AM
RE: iGame3D MurgaLua'd - chrimo - 11-29-2007, 06:25 AM
RE: iGame3D MurgaLua'd - Tobi - 11-29-2007, 07:07 AM
RE: iGame3D MurgaLua'd - chrimo - 11-29-2007, 07:29 AM
RE: iGame3D MurgaLua'd - Tobi - 11-29-2007, 07:45 AM
RE: iGame3D MurgaLua'd - Tobi - 11-29-2007, 07:52 AM
RE: iGame3D MurgaLua'd - chrimo - 11-29-2007, 07:42 AM
RE: iGame3D Data Directories - iGame3D - 11-29-2007, 09:10 AM
RE: iGame3D MurgaLua'd - chrimo - 11-29-2007, 09:24 AM
RE: iGame3D MurgaLua'd - chrimo - 12-02-2007, 10:56 PM
RE: iGame3D MurgaLua'd - iGame3D - 12-03-2007, 04:46 AM
RE: iGame3D MurgaLua'd - chrimo - 12-03-2007, 06:50 AM
RE: iGame3D MurgaLua'd - Tobi - 12-03-2007, 07:09 AM
RE: iGame3D MurgaLua'd - chrimo - 12-09-2007, 12:18 AM
RE: iGame3D MurgaLua'd - chrimo - 12-09-2007, 09:32 PM
RE: iGame3D MurgaLua'd - mikshaw - 12-12-2007, 02:47 PM
RE: iGame3D MurgaLua'd - chrimo - 12-12-2007, 08:35 PM
RE: iGame3D MurgaLua'd - mikshaw - 12-13-2007, 01:31 AM
RE: iGame3D MurgaLua'd - iGame3D - 12-13-2007, 02:55 AM

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

Forum Jump: