Halo 2 Font

User avatar
troymac1ure
Keeper of Entity
Posts: 1282
Joined: Sat Aug 09, 2008 4:16 am
Location: British Columbia, Canada, eh
Contact:

Re: Halo 2 Font

Post by troymac1ure »

Found my major roadblock and it consists of rewriting my code. As it stands now it just has pixel bits (on/off), but throwing up Arial-14 in paint and zooming displays opacity bits (which are the codes I'm having issues with). So time to implement opacity pixels...
User avatar
Click16
Posts: 1941
Joined: Mon Dec 31, 2007 4:36 am
Location: United States

Re: Halo 2 Font

Post by Click16 »

This is great work Troy. I can't wait to see what becomes of this. Do you think there is a possibility of adding new objects to the fonts? I always liked the idea of the killjoy medal.
Image
User avatar
troymac1ure
Keeper of Entity
Posts: 1282
Joined: Sat Aug 09, 2008 4:16 am
Location: British Columbia, Canada, eh
Contact:

Re: Halo 2 Font

Post by troymac1ure »

Without a doubt. The file format is simple, just the encoding is complicated. I'm thinking it may be easier to try and pull the decoding routine from the XBE (and more precise as well).
I can already modify characters manually. You could even make your own characters right now, they just would not be memory optimized.

The low down on the format if you wish to make your own characters is:
1) don't set bit 7 (these are special codes)
2) calculate pixel runs up to 0x3F in length (uses wrap around at line ends)
3) For blank runs, keep bit 6 = 0, for solid runs make bit 6 = 1

eg (8x4 character)

Code: Select all

_ _ _ X X _ X X
_ _ X X X _ _ X
_ X X X _ _ _ X
X X X _ _ _ X X
The preceeding can be made like so:
0x03 0x42 0x01 0x42
0x02 0x43 0x02 0x41
0x01 0x43 0x03 0x44
0x03 0x42

Note the 0x44 is due to a run of 4 (1 at line end, 3 at next line start).
Data can be added to the end of the file, which would just require changing a blank listing in the index to point at a new listing at the end of the UTF list table.
User avatar
troymac1ure
Keeper of Entity
Posts: 1282
Joined: Sat Aug 09, 2008 4:16 am
Location: British Columbia, Canada, eh
Contact:

Re: Halo 2 Font

Post by troymac1ure »

Update. Slowly getting there. This may look worse than previous images, but arial-14 uses anti-aliasing whereas arial-13 and fixedsys-9 don't. The white and black are the normal run methods, while the light blue is a coded run, the dark purple is a coded post-skip and the dark green (not shown) is a coded pre-skip. I have coloring disabled ATM as the pre- & post-skips are more inportant for me finding the proper codes.

Image

Also, changed some code so now I can actually load up all the fonts. Before I was having to search through all 65,536 entries for each character and some fonts have +32,000 entries. So doing the math, I was pretty much doing over 2,097,152,000 comparisons. :roll: Let's just say that I never waited long enough for those ones to finish, I just had code to cut it at 1800 entries. Now I can actually see all characters in the fonts (and I must say I think I can just make out the looks of a sniper rifle in one of the entries 8-) )
User avatar
troymac1ure
Keeper of Entity
Posts: 1282
Joined: Sat Aug 09, 2008 4:16 am
Location: British Columbia, Canada, eh
Contact:

Re: Halo 2 Font

Post by troymac1ure »

JacksonCougar wrote:Awesome :D, care to share the source so others can poke around too?
http://www.remnantmods.com/archive/misc ... Viewer.rar

and also if needed:
http://www.remnantmods.com/archive/misc ... 2Fonts.rar

Code has been documented now. Codes are all out of order, but as you will see I have them ordered with the character I was working on at the time. I figure as I add more codes, if I come across some that aren't right, they should show up and I'll adjust them accordinly, but so far I've only found maybe 2 codes that need re-examining. :D

I have 73 / 128 codes done so far.
Last edited by troymac1ure on Tue Feb 19, 2013 8:16 am, edited 1 time in total.
User avatar
troymac1ure
Keeper of Entity
Posts: 1282
Joined: Sat Aug 09, 2008 4:16 am
Location: British Columbia, Canada, eh
Contact:

Re: Halo 2 Font

Post by troymac1ure »

Add alot more codes in. Arial-14 is all readable now, with only minor glitches to be fixed.
Also, with the additions, here is a show of conduit-16:
Image

Take notice of the second to last row, where you can clearly see (very left) the starting formation of the skull, followed by a few almost recognizable guns.
Also, right near the end, clear as day, is an apple.. :|
User avatar
JacksonCougar
Huurcat
Posts: 2460
Joined: Thu Dec 06, 2007 11:30 pm
Location: Somewhere in Canada

Re: Halo 2 Font

Post by JacksonCougar »

Halo 2 was originally planned as a mac release... or Halo 1.. idrn
User avatar
troymac1ure
Keeper of Entity
Posts: 1282
Joined: Sat Aug 09, 2008 4:16 am
Location: British Columbia, Canada, eh
Contact:

Re: Halo 2 Font

Post by troymac1ure »

Managed to get pretty much all the characters in all the fonts working. Just need to work on special symbols (guns, kill streaks, etc). Also I arranged all the codes in order now and added color. The white boxes in the post above are actually all different colors with a seperate colored strip running across the top of them. Added a few other codes as well based apon how the preceding/following codes were set.

There's still something weird with code 00 (Color) though as some of the characters change colors multiple times without drawing anything, so I assume that two colors in a row must draw a set pixel run or something.

So does anyone know how to create a windows usable bitmap font? If so I could easily export these into a windows usable font :wink:
User avatar
Click16
Posts: 1941
Joined: Mon Dec 31, 2007 4:36 am
Location: United States

Re: Halo 2 Font

Post by Click16 »

troymac1ure wrote:So does anyone know how to create a windows usable bitmap font? If so I could easily export these into a windows usable font :wink:
Pretty sure a Windows Font type can't contain colors, but I'm certain that fonts can be produced. I'll look into it for you. Just focus on getting the characters perfect :D
Image
User avatar
Grimdoomer
Admin
Posts: 1835
Joined: Sun Dec 09, 2007 9:09 pm

Re: Halo 2 Font

Post by Grimdoomer »

Create a bitmap font and make a custom control/class to render it.
Don't snort the magic, we need it for the network.
User avatar
troymac1ure
Keeper of Entity
Posts: 1282
Joined: Sat Aug 09, 2008 4:16 am
Location: British Columbia, Canada, eh
Contact:

Re: Halo 2 Font

Post by troymac1ure »

Click16 wrote:
troymac1ure wrote:So does anyone know how to create a windows usable bitmap font? If so I could easily export these into a windows usable font :wink:
Pretty sure a Windows Font type can't contain colors, but I'm certain that fonts can be produced. I'll look into it for you. Just focus on getting the characters perfect :D
They look pretty darn good, but the only way I could get it perfect is to use disassembled code. Right now it's all by eye.
User avatar
Click16
Posts: 1941
Joined: Mon Dec 31, 2007 4:36 am
Location: United States

Re: Halo 2 Font

Post by Click16 »

troymac1ure wrote:They look pretty darn good, but the only way I could get it perfect is to use disassembled code. Right now it's all by eye.
Pics?
Image
User avatar
troymac1ure
Keeper of Entity
Posts: 1282
Joined: Sat Aug 09, 2008 4:16 am
Location: British Columbia, Canada, eh
Contact:

Re: Halo 2 Font

Post by troymac1ure »

Image
Image

and here's how the extras are coming along:
Image
User avatar
Click16
Posts: 1941
Joined: Mon Dec 31, 2007 4:36 am
Location: United States

Re: Halo 2 Font

Post by Click16 »

This is great work Troy! I see more and more progress each day. Keep it up!
Image
User avatar
troymac1ure
Keeper of Entity
Posts: 1282
Joined: Sat Aug 09, 2008 4:16 am
Location: British Columbia, Canada, eh
Contact:

Re: Halo 2 Font

Post by troymac1ure »

Thanks. I'm gone for a couple days, so I should have lots of time to work on it tomorrow night, but no XBOX. Can anyone u/l a clear (BMP, not jpg) screen shot of as many medals as possible (post-game should be fine). This would give me something to look at for comparisons.
User avatar
CaptainPoopface
Posts: 714
Joined: Sat Feb 16, 2008 5:47 am

Re: Halo 2 Font

Post by CaptainPoopface »

That should be straightforward for Sav3r (a program I never have used). Also, I remember an animated bitmap of the thumb stick being pressed. Because it happens in a single space, I wonder if the font includes animation data. I think it was a two state animation, so maybe two bitmaps have pointers to each other and something else controls the timing.
User avatar
troymac1ure
Keeper of Entity
Posts: 1282
Joined: Sat Aug 09, 2008 4:16 am
Location: British Columbia, Canada, eh
Contact:

Re: Halo 2 Font

Post by troymac1ure »

CaptainPoopface wrote:That should be straightforward for Sav3r (a program I never have used). Also, I remember an animated bitmap of the thumb stick being pressed. Because it happens in a single space, I wonder if the font includes animation data. I think it was a two state animation, so maybe two bitmaps have pointers to each other and something else controls the timing.
That'll be easier to determine once all the characters are decoded properly and can be seen. Also, I've just used Yelo Neighbourhood for the pics in the past. It works well.
User avatar
CaptainPoopface
Posts: 714
Joined: Sat Feb 16, 2008 5:47 am

Re: Halo 2 Font

Post by CaptainPoopface »

Just out of curiosity, what plans do people have if fonts can be decoded entirely? There isn't much I would do... It would be cool to make my own weap icons, but maybe more trouble than it's worth.
User avatar
troymac1ure
Keeper of Entity
Posts: 1282
Joined: Sat Aug 09, 2008 4:16 am
Location: British Columbia, Canada, eh
Contact:

Re: Halo 2 Font

Post by troymac1ure »

CaptainPoopface wrote:Just out of curiosity, what plans do people have if fonts can be decoded entirely? There isn't much I would do... It would be cool to make my own weap icons, but maybe more trouble than it's worth.
Originally I wanted to have the proper font for my visual menu editor and since it's something that hasn't been accomplished before, the idea interested me. Now that I'm this far along, I may as well finish it off. It's just one more thing to be unlocked for the H2 archives. Every time I add a new code I see more characters appearing and it makes me giggle a little inside :XD:
User avatar
JacksonCougar
Huurcat
Posts: 2460
Joined: Thu Dec 06, 2007 11:30 pm
Location: Somewhere in Canada

Re: Halo 2 Font

Post by JacksonCougar »

Besides, wouldn't you like to create a custom font package for you mod? You might be able to add new weapon icons or change the colours around to match a custom hud.
User avatar
troymac1ure
Keeper of Entity
Posts: 1282
Joined: Sat Aug 09, 2008 4:16 am
Location: British Columbia, Canada, eh
Contact:

Re: Halo 2 Font

Post by troymac1ure »

A major breakthough! Need to sleep, but have a few hours at the airport waiting for my plane tomorrow, so I'll see how far I can get and post an updated pic!
Let's just say I was right in assuming that every color change auto-places a pixel as well :D
User avatar
XZodia
Staff
Posts: 2208
Joined: Sun Dec 09, 2007 2:09 pm
Location: UK
Contact:

Re: Halo 2 Font

Post by XZodia »

XZodia Likes This.
Image
JacksonCougar wrote:I find you usually have great ideas.
JacksonCougar wrote:Ah fuck. Why must you always be right? Why.
User avatar
neodos
Posts: 1493
Joined: Sun Dec 09, 2007 8:58 pm

Re: Halo 2 Font

Post by neodos »

Awesome progress!
User avatar
troymac1ure
Keeper of Entity
Posts: 1282
Joined: Sat Aug 09, 2008 4:16 am
Location: British Columbia, Canada, eh
Contact:

Re: Halo 2 Font

Post by troymac1ure »

Image

:shock:
115/128 codes complete. I'm not bothering with the others as all english fonts load with no unknown codes now. :XP:

Now to figure out what's going on with the color scheme, then I'll repost the source.
Last edited by troymac1ure on Sat Feb 23, 2013 8:42 pm, edited 1 time in total.
User avatar
Click16
Posts: 1941
Joined: Mon Dec 31, 2007 4:36 am
Location: United States

Re: Halo 2 Font

Post by Click16 »

Oh man when I saw those images, I literally had chills going down my back. This is fantastic troy. I can't believe you're doing this. I... I don't even know what to say.
Image
Post Reply