Art, Programming

More native plugins

The Scintilla plugin I created is starting to work. I needed to convert the parent window into a tool window and basically hide it off screen so that it would render into my bitmap.

I have used Scintilla a lot before, so being able to utilize that for Code editing means that I can simplify the current editor implementation and speed up the rendering. I use built in GDI stuff to grab the back buffer and turn it into a bitmap that I then copy whole sale to begin with over to unity to blit into the texture, but after that, I can use the internal win32 stuff to get just the updated areas of that particular window, so that I am in most cases just moving 32×32 images into the main back buffer as people are entering text. Moving the whole back buffer wholesale each time should actually be quite efficient since it is mostly just copying blocks of memory between regions. If that is efficient enough, I will not even bother with the minimal invalidated updates.

Doing this is actually less troublesome and less complicated than implementing my own little text editor with the Unity GUI. It also means that I can completely remove the ugly editor mix. Not that it was visually ugly, but it was a mix of two systems within Unity that were being stretched for features.

I love these little challenges and seeing my crazy ideas actually work.

These little tangents are unavoidable with the complexity of my game and its mechanics. But I run my own show, and I say that it is all worth it and fits well within my time frame and will add a great deal to the quality of my end product.

I will keep attacking this in the morning and will come back with screenshots to share.

2 thoughts on “More native plugins”

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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