Glyph cache

I needed a fast way to render unicode text, and so EoM is using a glyph cache.

The glyph cache stores a subset of unicode character glyphs, and attempts to minimize changes to the set.

ASCII text is not “cached,” and so normal english text will use cache very rarely.

The cache uses 4 hash tables, which use a double-doubly-linked-list to hold data in bins, which the second list nodes are used to find the LRU glyph.

I tested the cache on a korean wikipedia page. Small caches (capable of holding 256 unicode characters) had cache misses on about 50% of the characters, while large caches(1024 characters) got 15% cache misses.

I have yet to test it with very large cache sizes, as I can’t find extremely long korean text that is easy to test.

This entry was posted in Programming and tagged , , , . Bookmark the permalink.

One Response to Glyph cache

  1. H800 says:

    Dude! I just found out about you making AOM2!

    PLEASE dont die on us! finish what you are doing!

    I’ve tried every single RTS, from Supreme Commander to Rome Total war, they all suck!
    I need either Age of Empires 4 or AOM2!!

    Everyone needs it!

    3 Questions:

    1- How are the graphics and effects?
    2- Do you have some screenshots or something?
    3- I know you get asked this alot, but how far along are you with it (in percentages)

    Thanks dude for what you are doing!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s