what are you using to edit? e2 editor? if yes, have you added syntax highlighting?
Had to post something... Parser works! I can display arbitrary lines on screen! yay ^.^
Oh god... I just jubilated over a damn line... ergh.
Yeah, I saw that... Although, after I have HML working properly for HUD2, I can fairly quickly build a cut down version for the panels, a-la in-game script-able panels (again!)
Advanced HUD Indicator Conway's Game of Life using LOTS of E2's
Adv. HUD 2 Code - 95% Everything HUD2
what are you using to edit? e2 editor? if yes, have you added syntax highlighting?
"It's easy to win forgiveness for being wrong; being right is what gets you into real trouble." - Bjarne Stroustrup
Lífið læðist lúmskt áfram
Indeed, I am using the E2 editor, and no, syntax highlighting isn't currently on - I deemed it far less important than getting it to work :P
I'll put in a proper syntax table later.
-=Progress Update=-
Nested tags now know what context they're in, so rendering outside a parent tag's area wont be drawn!
Output from a simulated run:
From this HML:Code:Would have drawn: <startdraw> Renderable Area: 0x0 to 1024x768 <RECT> (10x10) -> (200x200) Renderable Area: 10x10 to 200x200 <LINE> (20x20) -> (40x40) <enddraw>
Code:<hml> <rect start={10,10} end={200,200}> <line start={10,10} end={30,30} /> </rect> </hml>
Last edited by moggie100; 06-20-2009 at 11:51 AM.
Advanced HUD Indicator Conway's Game of Life using LOTS of E2's
Adv. HUD 2 Code - 95% Everything HUD2
Double post, but hey, the last one was 4 days ago, and this is kinda important!
WIP SCREENSHOT!
The square on the left, with the diagonal cross in it is being drawn from the HML code on the right - updating realtime as I edited. As the editor is entirely clientside, it affects no-one but you with lag (if any actually occurred)
The code uses both constants (Uppercase named values "WHITE" for example) and vectors (curly-braced couplets, triplets and quadruplets, ie. {10,10} )
Anyhow - Taa-daa!
Advanced HUD Indicator Conway's Game of Life using LOTS of E2's
Adv. HUD 2 Code - 95% Everything HUD2
Can it have inputs on certain things?
(i.e. color of the lines)
If not, can you set it up like that?
Anything that you can set as a value in the script can also be set as an input on the SENT
Eg. "color=WHITE" can be written as "color=#Color" and the SENT will have a vector3 input named 'Color' on it.
Additionally, for vectors (or any compound type) you can specify one or more components, ie. "color={255,255,255,#Alpha}" would produce an 'NORMAL' type input named 'Alpha' which only controlled the alpha component of that color.
Advanced HUD Indicator Conway's Game of Life using LOTS of E2's
Adv. HUD 2 Code - 95% Everything HUD2
Ok, so I see how drawing shapes with the indicator works. How about using those fun crosshairs you made?
You know what I hate? Sentences with ridiculous and very purposefully implanted subliminal messages.
Chinoto: I just explained an idea that requires no parenting or bacon sensor.
MOOCOW Admin Mod Beta Tester
Same syntax - different tag types
The general tag syntax is a follows:
<[type] [parameter]=[value] [/]>
and tag pairs are defined as: <tag>[enclosed child tags]</tag>
(This is subject to change as I work on this, but the general principle will be the same)
Say we wanted a target marker, and the tag type for a marker was 'marker', and we wanted no other tags to be *inside* the rendered area of the marker...
<marker />
to set a position we'd used the "position" (long form) or "pos" (short form - same meaning) variables;
<marker pos={#TargetX, #TargetY, #TargetZ} />
Giving us 3 normal-type inputs for X,Y and Z world positions, or alternatively, we can do this:
<marker pos=w#Target />
Which would give the SENT 1 vector3 input (the w# defines the input type as world-vector)
Now markers can have several forms (crosshair, etc.) so we choose which we want with the "type" parameter:
<marker type="boxed" pos=w#Target />
The types themselves are just strings, I'll document what does what once I get the code more finalized.
Hope that clears things up a bit!
(Aside: I'm away for the rest of the week, so no updates 'till the weekend I'm afraid!)
Advanced HUD Indicator Conway's Game of Life using LOTS of E2's
Adv. HUD 2 Code - 95% Everything HUD2
Double post... again (ergh!) but again, this is worth an update.
Updated stuff:
- Tags are now defined by entires in a tags tables, allowing for E2-like extensibility!
- The return of an 'old favourite'
- 3D positions are now resolved on the fly to screenspace coordinates
- Inputs should now evaluate to actual values, but untested
Stuff still to do:
- Actually have the SENT be created (currently all code is clientside for speedy testing)
- Build lookup tables on both clientside and serverside to hold variable values at runtime
- Build a "HUD Loading" screen (probably just a progress bar) for when people hook the indicator, but haven't got a HML table sent to them yet...
- Add more support for building your own tags and including them with the core set.
- Formalize HML 1.0 spec. (largely for me, so I'm forced to follow my own guidelines)
- And quite a few more things
Despite the above list, this is coming along nicely - the code's a bit messy at the moment while I dev and bughunt at the same time, but it'll get cleaner the more I work on it.
And finally, for those interested, the code to draw the 'old favourite' above is:
Note the 3d position vector, and the new constant syntax ($ prefix'd, for faster/neater parsing)Code:<marker type="boxed" size=40 position={0,0,0} color=$WHITE background=$BLACK50 />
Advanced HUD Indicator Conway's Game of Life using LOTS of E2's
Adv. HUD 2 Code - 95% Everything HUD2
Bookmarks