My cell phone contract finally ended which means I can get a new phone. I've been considering a new phone for a while now, so I knew what I wanted. I've been wanting to do more drawing on the bus, but my current tablet just isn't up to the task. Even with a good stylus there's no way to create nice lines. Pencil and paper works, kind of. The bus is rather bouncy and unstable which makes it hard to make nice lines.
This brought me to the Samsung Galaxy Note series of devices, they use a Wacom digitizer which promises much better precision. Since it's digital drawing this means an undo button as well, which I so desperately need when drawing.
So for the new phone I went and got a Samsung Galaxy Note 3, and have been doodling on it for a while now.
Friday, April 4, 2014
Monday, March 31, 2014
C# MS SQL Connection
For a project I was working on I needed to connect to a MS SQL database. I didn't need to do anything fancy, just connect and submit a bunch of queries. Still though, this is the sort of thing I felt I should write down as I'm sure I'll need to do this again.
Friday, March 28, 2014
Ton's Adventure (Part 3)
Now the final part to that story. It's not a very good ending, it lacks any real climax. Then again, it was meant to just be prologue to what the players did during the D&D sessions; and I think it worked pretty well for that.
Monday, March 24, 2014
Ton's Adventure (Part 2)
Continuing that story from before. Oddly enough this was the first part I had written, and the part I think turned out the best.
Friday, March 21, 2014
Ton's Adventure (Part 1)
A while back I was working on a adventure for a D&D game which revolved around something that one of the PC's father's had done. He become mixed up in some nefarious cult's business and his child, the PC gets called in to sort out the mess.
For whatever reason I sat down and wrote out a chunk of the father's adventure. This part, the beginning of it, was what I wrote last. I was looking for some way to tie the story together into a more complete story.
For whatever reason I sat down and wrote out a chunk of the father's adventure. This part, the beginning of it, was what I wrote last. I was looking for some way to tie the story together into a more complete story.
Monday, March 17, 2014
Spaghetti Carbonara
Last weekend I tried making spaghetti carbonara, it did not turn out so well. I'm pretty sure the recipe was good I just didn't follow it very well. The trouble comes from having two 3-year old sous chefs, they are pretty distracting and make it difficult to keep tabs of everything on the stove. Particularly when you're trying a new recipe.
Friday, March 14, 2014
Dakkon Ryedius
Our gaming group is starting up an adventure using the Stars Without Number rules. It's been a long time since I've gotten to play a space opera RPG, the last one I played was the West End Star Wars RPG. Normally I'd spend some time thinking about the character and coming up with a story; however we were rolling for stats so the dice were going to be a big influence on what each of us plays.
Well we've rolled the dice and I get to play a space marine.
Well we've rolled the dice and I get to play a space marine.
Monday, March 10, 2014
Marinades
I find myself doing less cooking at home since I don't get home from work much before dinner time. Though my wife has been going to night classes so she's not home to make dinner, which means I get to cook those nights. Unfortunately I don't have a lot of time to put dinner together so I have to do quick things. I've found a couple of marinades that that set in quickly and taste pretty good.
Friday, March 7, 2014
Google API
Some time ago I was building a spreadsheet in Google Drive to handle the math when creating characters for Savage Worlds. I got really annoyed with how much of the math needed to be repeated and really made me wish I knew how to create functions in a spreadsheet.
It occurred to me that building it in a application would make the calculations much cleaner. I'd just need a way to have it save the data somewhere online, since I'll need to access the character sheet at places other than my home computer. Wouldn't you know it, Google has a .Net library to access it's spreadsheets!
It occurred to me that building it in a application would make the calculations much cleaner. I'd just need a way to have it save the data somewhere online, since I'll need to access the character sheet at places other than my home computer. Wouldn't you know it, Google has a .Net library to access it's spreadsheets!
Monday, March 3, 2014
3D Model Files
I started planning out the classes and objects I'll need to make for that 2D platformer I planned to make. I quickly ran into a problem with image files.
You see I'll be doing all the artwork for this, and I'm not terribly quick about making new images. This shouldn't be a big deal since there won't be much to see in this. However, I'd like to animate the character when he moves which means I'll need to draw each frame of him running and jumping. I'm not sure I want to draw all that, mostly because I have a hard to reproducing the same figure. It would look really strange if every frame appeared to have a different character in it.
I hit upon the idea of breaking my 2D character into a bunch of polygons and by moving the polygons around the character would move. This lets me take one image and cut it up into the animate-able parts, so it will always look the same.
Simple enough, this sort of thing has been done for years now. Where I got completely stuck was in trying to figure out how to store all the data needed to accomplish this.
You see I'll be doing all the artwork for this, and I'm not terribly quick about making new images. This shouldn't be a big deal since there won't be much to see in this. However, I'd like to animate the character when he moves which means I'll need to draw each frame of him running and jumping. I'm not sure I want to draw all that, mostly because I have a hard to reproducing the same figure. It would look really strange if every frame appeared to have a different character in it.
I hit upon the idea of breaking my 2D character into a bunch of polygons and by moving the polygons around the character would move. This lets me take one image and cut it up into the animate-able parts, so it will always look the same.
Simple enough, this sort of thing has been done for years now. Where I got completely stuck was in trying to figure out how to store all the data needed to accomplish this.
Friday, February 28, 2014
Wilderness Tour
Irregularly I'll pass some time by writing. Not just the dull explanations I offer up on this blog, but creative stuff. Short stories or story fragments for the most part, and typically connected with some tabletop game I'm involved in. Though from time to time it's just a story that I just felt like writing down, this is one of those.
Monday, February 24, 2014
Bouncing Polygons!
Finally! I've got stuff moving on the screen. It seems that I was over-thinking things with my previous attempts at getting the cube to move around. All I really needed to do was pass the data into the vertex shader and let it handle the rest. Whatever, It's all working now.
With this we wrap up two topics. Textures will be done; well more done, my texture code was done after the UV coordinates. As well as transformations and animation. Or at least the basics of animation are done, this just shows how to move and distort meshes, actually making it look like real movement takes a bit more planning and effort.
With this we wrap up two topics. Textures will be done; well more done, my texture code was done after the UV coordinates. As well as transformations and animation. Or at least the basics of animation are done, this just shows how to move and distort meshes, actually making it look like real movement takes a bit more planning and effort.
Friday, February 21, 2014
Matrix math and OpenGL
I'm still working out how to apply these transforms in my model class. I think it'd be best if I found a way to pack the necessary information into a uniform buffer when rendering an object, this would allow the shaders to perform the necessary transformations. The trick of course is to pack the data in such a way that everyone can make sense of it, and that's where I'm stuck at the moment.
Regardless, of my inability to copy data legibly I can still explain the core of what needs done. OpenGL uses matrix math to perform transformations on your models. These transformations are what allows in to move around on the screen. So let's talk about matrix math.
Regardless, of my inability to copy data legibly I can still explain the core of what needs done. OpenGL uses matrix math to perform transformations on your models. These transformations are what allows in to move around on the screen. So let's talk about matrix math.
Monday, February 17, 2014
Texture UV Coordinates
Last time I threw a texture onto a cube and was very unhappy with the results. Since the point of the post was to load a texture let's start by fixing that. In doing so we'll discover two details. First with all the data being loaded from the OBJ file we can fix the texture without touching a single line of code. Secondly when I slapped together that texture I did a bunch of things wrong.
Friday, February 14, 2014
Loading Textures in GL
I've got colored polygons on the screen. Flat colors like that really aren't all that visually appealing. I'm sure you could arrange enough of them to make an interesting picture, but it seems like a lot of work. What would be a lot easier is if we could just take some image data and stretch that across the polygons.
Monday, February 10, 2014
My Model Class
Next thing to clean up is the code for managing models. What it needs to accomplish:
- Load all necessary information from OBJ files
- Remember the buffer objects to store the data needed for rendering
- Track the changes to the model data and only update buffers when changes happen
- Perform all the work needed to render the model
Once again this class will likely be kept in a large array, one element for each model I have a need of drawing. Eventually this class will need extended to be able to manipulate the object, or at least track transformations that it'll need when rendered. I haven't dealt much with movements yet, but that's going to have to happen soon.
Friday, February 7, 2014
My Shader Class
In an effort to start organizing the code needed in an OpenGL program I began building a few classes to manage some of the work. The first one I put together was the GLShader class. It's job is the following:
- Remember which files hold the source code for a particular shader
- Be able to load the source code from file then compile and link the program
- Remember a list of all Uniform and Attribute variables that this shader will use
- Assign specific ID's for those variables when the shader is compiled
Monday, February 3, 2014
Loading Models
I've gotten really annoyed with the large blocks in my OpenGL programs that fill arrays with vertex information. What I need is a way to load this sort of data from a file, then I'll be free to use more interesting models without gumming up my code with hundreds of lines of vertex coordinates. Perhaps a file that's easy to read, like say plain text. It ought to provide all the details I want too; vertex coordinates, UV mapping for when I get around to textures, and maybe normals should I ever play with lighting. Fortunately just such a thing exists.
Friday, January 31, 2014
Something to code...
I had said that I wanted to steer my programming efforts toward creating some piece of software. It's the end of January and I still don't know to do yet. The trick to this is to pick something you're excited about and build from that. I'd do well to create a program with the most recent stuff I've been working on. That would be OpenGL. Boy that really narrows down the possibilities.
Monday, January 27, 2014
C# and XML
I really didn't expect this one to be much of a challenge. I've dealt with parsing XML in PHP, Javascript, and VBScript already and they weren't too bad to do. I suppose it doesn't help that C# has like five different methods for parsing XML, so when you do any sort of search you get results for all the different methods that you need to sort through.
This is the method that I picked out to use. Mostly because it's the one I figured out the quickest, but partly because it also works in Mono. The XDocument class looked like the easiest one to use, but it's not normally available outside of the Microsoft .Net framework. The XmlDocument class is available everywhere, and isn't too hard to work with, so that's the one I'm supplying these notes for.
This is the method that I picked out to use. Mostly because it's the one I figured out the quickest, but partly because it also works in Mono. The XDocument class looked like the easiest one to use, but it's not normally available outside of the Microsoft .Net framework. The XmlDocument class is available everywhere, and isn't too hard to work with, so that's the one I'm supplying these notes for.
Friday, January 24, 2014
Versioning Assemblies in C#
While working on an ASPX page there was some process that was supposed to copy over new DLL's for the page. It was handy since it did all the registration and whatnot needed to make them work. Until the page stopped working correctly, inexplicably new code wasn't being pushed to the site.
The errors make sense looking back at it, but when the pages are being updated but not the libraries the run time exceptions can seem pretty vague. It didn't help that my compiler and debugger were on my laptop while the server hosting the page was in another building. I could tell that the pages were updated since any old text editor would show it, but the libraries didn't have any useful markers beyond file size.
To finally prove that the libraries were being dropped somewhere I needed to give them version numbers so there was something more concrete to test with.
Monday, January 20, 2014
Colored Face
I'm getting better with the colored pencils. Not great, but I'm starting to feel that my color work adds depth to the pictures rather than makes them look goofy. I still haven't quite gotten my shading too good yet, but it's improving.
I felt like doing a quick write-up of how I approach doing a colored face.
I felt like doing a quick write-up of how I approach doing a colored face.
Friday, January 17, 2014
Hypoallergenic Sugar Cookies
My niece is something of a challenge to cook for. She's allergic to dairy, eggs, nuts, fish, and a few other things so the available menu is pretty small. When you can't eat butter and eggs most desserts aren't an option. For the past several years I've baked her cookies for Christmas. As you might guess the challenge is in finding a recipe that won't send her into anaphylactic shock.
Monday, January 13, 2014
Shader Attributes
We've passed data to our shaders, but it's one size fits all data. There's going to be situations where we need different information for each vertex, and pushing all this in uniform blocks just isn't going to work. It's time to try shader attributes.
These are arrays of data, each element of the array should correspond to one of the vertexes. When the shader executes it will only read the element that corresponds to the current vertex. This is handy for things like locations, colors, normals and so forth which need applied individually to each vertex.
These are arrays of data, each element of the array should correspond to one of the vertexes. When the shader executes it will only read the element that corresponds to the current vertex. This is handy for things like locations, colors, normals and so forth which need applied individually to each vertex.
Friday, January 10, 2014
Talking to shaders
I've finished create the most basic of shaders, and they work in the sense that they get polygons onto the screen. Let's step them up a bit. To do that we'll need to pass data to the shaders, perhaps a color and maybe the model projection matrix to start moving away from those deprecated attributes.
I'd like to move up to a newer version of OpenGL, but I'm limited to version 3.0 (GLSL 1.3) since that's the highest version I can reach with all the machines I work on. I'll make an effort not to use any features that are removed in later versions, I can't make any promises since it's not always easy to know what features those are.
I'd like to move up to a newer version of OpenGL, but I'm limited to version 3.0 (GLSL 1.3) since that's the highest version I can reach with all the machines I work on. I'll make an effort not to use any features that are removed in later versions, I can't make any promises since it's not always easy to know what features those are.
Monday, January 6, 2014
The most basic shaders
So our program doesn't draw always draw triangles because we're missing shaders. The code was updated so that it can load and use shaders, there just aren't any for it to load. Let's fix that.
I'm not going to create anything fancy, just the most simple shaders to demonstrate the absolute basics. I should mention that I just started learning about shaders a week and a half ago, so you can't really expect digital magic quite yet.
I'm not going to create anything fancy, just the most simple shaders to demonstrate the absolute basics. I should mention that I just started learning about shaders a week and a half ago, so you can't really expect digital magic quite yet.
Friday, January 3, 2014
To Do list for 2014
I don't normally make new years resolutions, I never stick to them. Maybe through the first few months I'll be good, but after that my attention drifts to something else and the old plan is soon forgotten. I liked Alison's few simple goals for the coming year, and thought perhaps it might be time to try again. Also since I'll have the promises documented it'll be a bit more motivation to actually stick to them.
So with that in mind, just what should I try to do this year?
So with that in mind, just what should I try to do this year?
Subscribe to:
Posts (Atom)