More streaming…

Edit: I’ll be streaming again tomorrow because I was rather tired today and because I spent a lot of time just being frustrated trying to get the coloring system down correctly. As I write, I still have not solved it.

Also
ACC2_0

example4

example5

Jay Leno:
example

Original Post: I’m going to be streaming again later today probably at around 5/6 PM GMT-7 (PST). It seems like the right time because the Anime Character Creator has been greatly underway. Since the last time I streamed the program has been threadified and now runs super-optimized code throughout usage to cut down on speed problems. I fixed the notorious bug that plagued the old ACC and this one for days. It wasn’t even really a bug that I caused, that’s the worst thing. It was 100% Microsoft’s bug and they know it and have done nothing to fix it. It was a GDI+ bug caused by too many handles that the Garbage Collector was waiting to dispose of, even though I had manually disposed them…yeah, that’s right. Guess what the error read as though? “ArgumentException: Parameter is not valid” – what does that have to do with too many file handles and your lazy garbage collector not dealing with the trash?

Point is, this solved it…

GC.Collect();

I digressed a bit there, back to the topic, streaming! Tonight! Fun?

 

New Anime Character Creator

If you were watching the stream, you might know that I can’t read and don’t wish to attempt to tread through the 5 year old code that is Anime Creator Creator. So I’m just redoing the program entirely. I have no choice because the code is so unmaintainable.

Come to the stream to watch…

Read the rest of this entry »

 

Palette Extractor 1.0b (4/10/2014) Released

New version I just live streamed adding these features.

Download: v1.0b (4/10/2014)

Changelog

  • Added -write_log_file and -sort_colors arguments
  • Added ini file that contains default settings (overwritten by command line arguments)
  • Writing log is now off by default in ini
  • Sorting colors is now on by default in ini
  • Support for BMP and JPG files added

If I’m still live streaming, come in and see me work on Anime Character Creator.

 

Live Dev @ 2~3PM

I’m going to be streaming me live developing Anime Character Creator more. Come in and watch/comment if you want. It’ll be at 2~3PM GMT-7 or PST. What you’ll see if you come in is me getting really frustrated by 5 year old code that I have to fix up to match my skill level 5 years later, which is drastically improved from that time. It’ll be a ‘blast’.

Edit: Okay, before I do that, I’m most likely going to update Palette Extractor to make it faster and to order the colors before writing them to a file.

Edit: The stream began late because it wasn’t going through.

 

Final Fantasy X (10 aka. FFX) Al Bhed to Eng and Eng to Al Bhed converter

So I recently got the FFX HD remaster for the Vita. I haven’t played the game since the original release years ago when I was barely a teenager. While I was playing though I kept collecting the books and whatnot which started to slowly reveal the text, but was still hard to decipher sometimes. Point is, I thought it’d be best to create a way to convert between the Al Bhed language and English even if you already have some books.

Link to converter: Click here

Instructions about usage

The binary mask is used to tell the difference between a book you have and one you don’t. 0 and 1 are used to represent the following.

0 = Purple letters
1 = Blue letters

Spaces are the same as writing zeros (0). If you leave the remaining space in the text box blank, it’s automatically all number ones (1).

You can turn the usage of the binary mask on and off by clicking the checkbox next to ‘Use Mask?’

 

New Favicon

I made a new favicon. I’ve had the previous one up for 5 years. It feels like the right time to change it.

 

More code open sourced

PW Hex Gen Original, Version A, and Version B were released on Bitbucket. You can find the links in the Project page. I am no longer working on these projects so have at them and do whatever you want. I genuinely don’t care anymore. I’m way too busy working on my games.

 

The fastest/quickest hex-to-dec and dec-to-hex

Before reading: The code presented is for the Monkey X multiplatform language. This was the fastest/quickest multiplatform solution I could design.

Okay, so there was a reason that I needed a blazing fast dec-to-hex and vice-versa
conversion. I’m not going to go over it. Anyways, after playing around for several hours I found a method that was fastest overall on all platforms.

The fastest method involved completely procedural type code. No looping for these conversions (it slowed it down in tests). I also tried to avoid any unnecessary string concatenation or calls that require looping through a string e.g. ToUpper and ToLower type functions.

Dec To Hex. I attempted to apply more “optimizations” to this one, but to no avail. This was the fastest way I could come up with. It can solve 10 million decimal to hex strings in 1 second on my machine. This was heavily optimized to take advantage of the Rope data structure that most web browsers and Flash use.

Function DecToHexBE:String( decimal:Int )
	Local a1:Int = decimal & 15
	Local a2:Int = (decimal Shr 4) & 15
	Local b1:Int = (decimal Shr 8) & 15
	Local b2:Int = (decimal Shr 12) & 15
	Local c1:Int = (decimal Shr 16) & 15
	Local c2:Int = (decimal Shr 20) & 15
	Local d1:Int = (decimal Shr 24) & 15
	Local d2:Int = (decimal Shr 28) & 15
 
	#If TARGET = "html5" Or TARGET = "flash"
	If a1 < 10 Then a1 = a1 + 48 Else a1 = a1 + 55
	If a2 < 10 Then a2 = a2 + 48 Else a2 = a2 + 55
	If b1 < 10 Then b1 = b1 + 48 Else b1 = b1 + 55
	If b2 < 10 Then b2 = b2 + 48 Else b2 = b2 + 55
	If c1 < 10 Then c1 = c1 + 48 Else c1 = c1 + 55
	If c2 < 10 Then c2 = c2 + 48 Else c2 = c2 + 55
	If d1 < 10 Then d1 = d1 + 48 Else d1 = d1 + 55
	If d2 < 10 Then d2 = d2 + 48 Else d2 = d2 + 55
 
	Return String.FromChar(d2) + String.FromChar(d1) + String.FromChar(c2) + String.FromChar(c1) +
		String.FromChar(b2) + String.FromChar(b1) + String.FromChar(a2) + String.FromChar(a1)
	#Else
	If a1 < 10 Then quickHex[7] = a1 + 48 Else quickHex[7] = a1 + 55
	If a2 < 10 Then quickHex[6] = a2 + 48 Else quickHex[6] = a2 + 55
	If b1 < 10 Then quickHex[5] = b1 + 48 Else quickHex[5] = b1 + 55
	If b2 < 10 Then quickHex[4] = b2 + 48 Else quickHex[4] = b2 + 55
	If c1 < 10 Then quickHex[3] = c1 + 48 Else quickHex[3] = c1 + 55
	If c2 < 10 Then quickHex[2] = c2 + 48 Else quickHex[2] = c2 + 55
	If d1 < 10 Then quickHex[1] = d1 + 48 Else quickHex[1] = d1 + 55
	If d2 < 10 Then quickHex[0] = d2 + 48 Else quickHex[0] = d2 + 55
 
	Return String.FromChars(quickHex)
	#EndIf
End
 
Function DecToHexLE:String( decimal:Int )
	Local a1:Int = decimal & 15
	Local a2:Int = (decimal Shr 4) & 15
	Local b1:Int = (decimal Shr 8) & 15
	Local b2:Int = (decimal Shr 12) & 15
	Local c1:Int = (decimal Shr 16) & 15
	Local c2:Int = (decimal Shr 20) & 15
	Local d1:Int = (decimal Shr 24) & 15
	Local d2:Int = (decimal Shr 28) & 15
 
	#If TARGET = "html5" Or TARGET = "flash"
	If a1 < 10 Then a1 = a1 + 48 Else a1 = a1 + 55
	If a2 < 10 Then a2 = a2 + 48 Else a2 = a2 + 55
	If b1 < 10 Then b1 = b1 + 48 Else b1 = b1 + 55
	If b2 < 10 Then b2 = b2 + 48 Else b2 = b2 + 55
	If c1 < 10 Then c1 = c1 + 48 Else c1 = c1 + 55
	If c2 < 10 Then c2 = c2 + 48 Else c2 = c2 + 55
	If d1 < 10 Then d1 = d1 + 48 Else d1 = d1 + 55
	If d2 < 10 Then d2 = d2 + 48 Else d2 = d2 + 55
 
	Return String.FromChar(a2) + String.FromChar(a1) + String.FromChar(b2) + String.FromChar(b1) +
		String.FromChar(c2) + String.FromChar(c1) + String.FromChar(d2) + String.FromChar(d1)
	#Else
	If a1 < 10 Then quickHex[1] = a1 + 48 Else quickHex[1] = a1 + 55
	If a2 < 10 Then quickHex[0] = a2 + 48 Else quickHex[0] = a2 + 55
	If b1 < 10 Then quickHex[3] = b1 + 48 Else quickHex[3] = b1 + 55
	If b2 < 10 Then quickHex[2] = b2 + 48 Else quickHex[2] = b2 + 55
	If c1 < 10 Then quickHex[5] = c1 + 48 Else quickHex[5] = c1 + 55
	If c2 < 10 Then quickHex[4] = c2 + 48 Else quickHex[4] = c2 + 55
	If d1 < 10 Then quickHex[7] = d1 + 48 Else quickHex[7] = d1 + 55
	If d2 < 10 Then quickHex[6] = d2 + 48 Else quickHex[6] = d2 + 55
 
	Return String.FromChars(quickHex)
	#EndIf
End
 
#If TARGET <> "html5" And TARGET <> "flash"
Global quickHex:Int[8]
#EndIf

Hex to Dec. This can solve 10 million hex to decimal conversions in about 1 second as well. This was surprising to me because hex to decimal has in the past always been slower for me. However, by avoiding any string manipulation I cut a lot of the workload down.

Function HexBEToDec:Int( hex:String )
	Local a1, a2, b1, b2, c1, c2, d1, d2, len, off
	len = hex.Length ' assuming 8 is the max without having to clamp
	off = 8 - len
 
	If len < 1 Then a1 = 0 Else a1 = hex[7 - off] - 48
	If len < 2 Then a2 = 0 Else a2 = hex[6 - off] - 48
	If len < 3 Then b1 = 0 Else b1 = hex[5 - off] - 48
	If len < 4 Then b2 = 0 Else b2 = hex[4 - off] - 48
	If len < 5 Then c1 = 0 Else c1 = hex[3 - off] - 48
	If len < 6 Then c2 = 0 Else c2 = hex[2 - off] - 48
	If len < 7 Then d1 = 0 Else d1 = hex[1 - off] - 48
	If len < 8 Then d2 = 0 Else d2 = hex[0] - 48
 
	If a1 > 9 Then a1 = a1 - 7 - (a1 / 48 * 32)
	If a2 > 9 Then a2 = a2 - 7 - (a2 / 48 * 32)
	If b1 > 9 Then b1 = b1 - 7 - (b1 / 48 * 32)
	If b2 > 9 Then b2 = b2 - 7 - (b2 / 48 * 32)
	If c1 > 9 Then c1 = c1 - 7 - (c1 / 48 * 32)
	If c2 > 9 Then c2 = c2 - 7 - (c2 / 48 * 32)
	If d1 > 9 Then d1 = d1 - 7 - (d1 / 48 * 32)
	If d2 > 9 Then d2 = d2 - 7 - (d2 / 48 * 32)
 
	Return a1 | (a2 Shl 4) | (b1 Shl 8) | (b2 Shl 12) | (c1 Shl 16) | (c2 Shl 20) | (d1 Shl 24) | (d2 Shl 28)
End
 
Function HexLEToDec:Int( hex:String )
	Local a1, a2, b1, b2, c1, c2, d1, d2, len
	len = hex.Length
 
	If len < 8 Then d1 = 0 Else d1 = hex[7] - 48
	If len < 7 Then d2 = 0 Else d2 = hex[6] - 48
	If len < 6 Then c1 = 0 Else c1 = hex[5] - 48
	If len < 5 Then c2 = 0 Else c2 = hex[4] - 48
	If len < 4 Then b1 = 0 Else b1 = hex[3] - 48
	If len < 3 Then b2 = 0 Else b2 = hex[2] - 48
	If len < 2 Then a1 = 0 Else a1 = hex[1] - 48
	If len < 1 Then a2 = 0 Else a2 = hex[0] - 48
 
	If a1 > 9 Then a1 = a1 - 7 - (a1 / 48 * 32)
	If a2 > 9 Then a2 = a2 - 7 - (a2 / 48 * 32)
	If b1 > 9 Then b1 = b1 - 7 - (b1 / 48 * 32)
	If b2 > 9 Then b2 = b2 - 7 - (b2 / 48 * 32)
	If c1 > 9 Then c1 = c1 - 7 - (c1 / 48 * 32)
	If c2 > 9 Then c2 = c2 - 7 - (c2 / 48 * 32)
	If d1 > 9 Then d1 = d1 - 7 - (d1 / 48 * 32)
	If d2 > 9 Then d2 = d2 - 7 - (d2 / 48 * 32)
 
	Return a1 | (a2 Shl 4) | (b1 Shl 8) | (b2 Shl 12) | (c1 Shl 16) | (c2 Shl 20) | (d1 Shl 24) | (d2 Shl 28)
End

With that last one you may be wondering, what is the (x / 48 * 32) calculation for. That calculation is to deal with lower case variables. It avoids the need to use ToUpper. See, because an integer calculation of anything below 48 will result in 0, which will subtract nothing. And any hex above that will result in 1. It’s actually possible to do the whole calculation in one swoop. However, because you would have to access the string it slows down the calculation quite a bit. So I just decided it would be better to solve it in two different groups.

 

Hack n’ Slash

I just heard about this game called Hack n’ Slash from Double Fine yesterday because of Kotaku. I thought it was a really neat concept. I then proceeded to go to the homepage of it where I found a jpg embedded with a zip. Which is this really old trick that used to be entertaining some years ago. So I unzipped it to find 3 files. One was text that when crossing your eyes or taking screenshots and overlapping, didn’t overlap. The second was the theme music to the game under the genre “aes-256-cbc”. This is a form of the Advanced Encryption System. In a comment it read that basically the secret key would be all caps. The third file was an mp4 video of the game. This one was very odd to start with. If you proceeded into the file in 010 editor or your hex viewer of choice, near the top you could find the ASCII text for “crackme.enc”. Looking at the bottom of the file you see that the file was created with “GPAC”.

The next step was to use MP4Box (from GPAC) which I’d used before when I used to do a lot of video encoding stuff. The command to dump the item “crackme.enc” out of the box was pretty simple. Figuring out how to crack crackme.enc without bruteforce was not. Let’s just say a bit down the road I realized that everything given was meant to be used to solve the puzzle, including the jpg. Point is, nailed it.

After that I proceeded to run the program which stopped and told me I failed the incantation. Now, the weird part was that the application just seemed to hang. So I terminated it and then ran it with Olly and sure enough when I failed, the message was given. I then proceeded to re-run and it said I won magic points or something. I don’t know what the point of me solving it was, but clearly my younger self came back; In the days when I used to be able to crack software.

Here’s a picture and I may have left a little secret of my own in this post.
HackNSlashCensored

 

Win 7 Shortcuts List

I found this old photoshop file, which had Windows 7 shortcuts, I had put together and never released from 2009/2010. I took this official Japanese image released by Microsoft and slapped text on top of it in English. Aside from the top, which I actually translated. That is to say, “Windowsキーショートカットー覧” says “Windows Key Shortcuts List”.

My thought was, I might as well release it now. It’s always fun to have things like this as a background when you forget Windows shortcuts. Although I don’t know how many of these apply to Windows 8, not that I care. Windows 8 is dead in the water as far as I’m concerned.

1273758097028

This is the original image I slapped text on top of. It was a JPG for some awful reason.
1273758097028

 
 
 
© 2014 NRGsoft