LUA huds are coming along

Discuss anything EDGE-related that doesn't fall into the categories.

Moderators: andrewj, Corbin, Lobo

User avatar
andrewj
Posts: 698
Joined: Sat 05 May 2007 11:22 am
Location: Tasmania

LUA huds are coming along

Postby andrewj » Sun 30 Mar 2008 9:27 am


User avatar
Lobo
Posts: 347
Joined: Wed 09 May 2007 8:04 pm
Location: Spain
Contact:

Postby Lobo » Sun 30 Mar 2008 9:42 am

Looks like powerful stuff Andrew!

Quick question: from what I can see the main function is hud.draw_all. I assume it must be looped somehow otherwise the HUD won't be updated after the initial call. Is that looping hardcoded? If it is hardcoded: are there other hardcoded functions?

I guess what I'm getting at is: how does LUA work? Is it line by line execution or is it event driven?




Also, will it be possible to call an RTS script from a LUA function? That would be an extremely interesting possibility for many I'm sure.
, Lonely Meadows TC,
, DoomP.A.L.

User avatar
Liberation
Posts: 338
Joined: Mon 14 May 2007 4:36 pm
Location: England

Postby Liberation » Sun 30 Mar 2008 10:23 am

a mini map function would be very useful.

User avatar
andrewj
Posts: 698
Joined: Sat 05 May 2007 11:22 am
Location: Tasmania

Postby andrewj » Sun 30 Mar 2008 11:03 am

You could think of it as line-by-line execution, though you can have more than one statement on a line (separated by ';'), but I personally rarely need that.

hud.draw_all is a lua function which the engine calls to draw everything for the current frame, including the player view (hud.render_world), and/or the automap (hud.render_automap), and the HUD/status bar elements.

You could draw a mini-map with the current code (just use hud.render_automap). If fact you could ignore the normal automap and display something else entirely on the second screen (like progress information). Mods have a lot of control.

User avatar
andrewj
Posts: 698
Joined: Sat 05 May 2007 11:22 am
Location: Tasmania

Postby andrewj » Sat 12 Apr 2008 4:24 am

Bump.

Ok I just finished the coding for Lua huds. Now I'm going to write a bare-bones manual for it (it will end up on the website eventually). Tonight or tomorrow I'll tackle a few things (fake slopes in particular) and get a binary package ready for everyone here to play with.

:D

User avatar
Corbin
Posts: 657
Joined: Mon 09 Jul 2007 6:10 am
Location: vice city, california
Contact:

Postby Corbin » Sat 12 Apr 2008 8:01 am

Cool. Speaking of --

Is this the same thing that HUD.ddf in the source code is? I've been digging at the thing in its entirety and was just curious about it. I'm assuming in the source that's it's incomplete. Looks fun though. I can't wait, as usual.

I had a couple more source code questions, though, that I noticed while digging through everything...

User avatar
andrewj
Posts: 698
Joined: Sat 05 May 2007 11:22 am
Location: Tasmania

Postby andrewj » Sat 12 Apr 2008 11:09 am


User avatar
Joppu
Posts: 174
Joined: Tue 15 May 2007 5:37 am
Location: Finland
Contact:

Postby Joppu » Sat 12 Apr 2008 5:44 pm


User avatar
Corbin
Posts: 657
Joined: Mon 09 Jul 2007 6:10 am
Location: vice city, california
Contact:

Postby Corbin » Sun 13 Apr 2008 11:30 am


User avatar
Lobo
Posts: 347
Joined: Wed 09 May 2007 8:04 pm
Location: Spain
Contact:

Postby Lobo » Sun 13 Apr 2008 10:22 pm

, Lonely Meadows TC,

, DoomP.A.L.

User avatar
andrewj
Posts: 698
Joined: Sat 05 May 2007 11:22 am
Location: Tasmania

Postby andrewj » Mon 14 Apr 2008 2:54 am


sierraoscar19
Posts: 36
Joined: Fri 21 Dec 2007 5:42 am

LUA Huds - sharing

Postby sierraoscar19 » Mon 05 May 2008 6:52 am


User avatar
Lobo
Posts: 347
Joined: Wed 09 May 2007 8:04 pm
Location: Spain
Contact:

Postby Lobo » Mon 05 May 2008 7:34 pm

, Lonely Meadows TC,

, DoomP.A.L.

User avatar
Dartmerc
Posts: 570
Joined: Tue 21 Aug 2007 3:25 am
Location: Sydney
Contact:

Postby Dartmerc » Mon 05 May 2008 10:38 pm



Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 10 guests