Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
i have some questions about this form of integers: 'a000' (its not hexadecimal)
so far i know that each of the 4 positions has 2^8 = 256 different characters
but what are these characters? does anyone have a list of the 0-255 value of each character?
(e.g. '0' = (2^0)*48, => '0000' = (2^0)*48 + (2^8)*48 + (2^16)*48 + 2^24*48)
It's the default ASCII character table, here it is:
You have to look at the decimal value that represents your character.
Though your formula is correct, I would rather prefer this:
(256³ * N1) + (256² * N2) + (256 * N3) + (N4)
N1-4 are the decimal ASCII codes for that character as seen in the table above.
The reason is simple: it's pretty much the inverse of what you do. You start with 2^0, which is the last character in the 4-digit code. That's counter-intuitive.
In my formula, N1 is the first digit, N2 the second and so on.
Making it 256 to the power of the digit also simplifies it a great deal.
first of all big thx
but the ascii table goes only from 0-127
does that mean that there are no characters that are turned to the numbers 128-255?
EDIT: just found the expanded ascii table http://www.stefan-lenz.ch/_pics/1285/ascii.png
Yeah, the site where I got the image from (aptly named asciitable.com) also includes the extended ASCII-codes,
but you never see those in the regular editor and hardly ever (if at all) in maps made with JNGP.
RAW codes for Lua
Creating own RAW patterns through ASCII is very useful for whenever you are working with several coders that have their own map for one project to work on simultaniously.
For example, I document my RAW codes with my Initials 'HH01', 'HH02' etc. While the other coders of my project do the same thing with their initials,
we can create systems (if they ever do need custom objects) that make use of Lua object generation.
This way no one will interfer with their code and everything can in the end be imported into 1 map. Where the Lua scripts and the systems get put together with the terrain.
If everything went well, you don't have the problem anymore of having to send each other the "right version" of the project's map.
And this will increase the speed of your project by an immense amount since no one has to wait for others.
Everyone can just work on their own thing whenever they please.
Just my 2 cents for today for anyone planning to start a new project...
Documentation is key to a fast workflow, keep that in mind
Documenting naming conventions and coding standards are also really nice when working in a group.
They give more structure and readability as a whole in your project.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.