|
|
|
| Thursday, February 18, 2010 |
Cleaning Up Code
Posted: 5:54:00 PM
|
I took some time today to update some libraries in my source code, which is affecting a bunch of my projects. Cent, which runs off of CrystalSpace, is getting a makeover of sorts, as I am switching it over from the traditional CrystalSpace build process of linked libs and using DLLs instead. The process is quite nontrivial, as I am finding that I have to modify the Visual Studio solutions a bit to get things working as I need them to.
The biggest issue I'm coming across is trying to get the plugins into the same directory as Cent.exe so that I don't have to carry around a CSPath environment variable. I thought just adding it as a reference would copy it over, but it's not. I'm sure I can resolve this, but I just ran out of time today.
The other fun makeover I'll need to do involves Constellation, my Planarity clone. It runs off SDL, which, along with a slew of other libraries, are in a bunch of directories outside of my SVN directory. I'm going to try to get those all together and get a functional build of both Cent and Constellation before I continue working on any of the code in there.
Once I'm done, it's back to Six Minutes. I have a LOT of cool stuff planned over there, and a lot of coding to do to get it done. With some extra spare time the last week or so, I'm trying to knock out things that I've been wanting to do for a while but just haven't had the chance. We'll see how far this goes.Labels: Coding, Constellation, Crystal Space, Gaming, Six Minutes To Release, World of Warcraft
|
| Thursday, July 16, 2009 |
Married Life
Posted: 3:01:00 AM
|
Ah, the married life.
Um, it seems to be the same as unmarried life.
Anyway, it's been far too long since I've posted here. First of all, you'll notice a new picture! This is from my wedding, and probably will be the one I use online going forward, as opposed to that silly surprise smile face from 2001. I'll likely still use my side Vegas photo occasionally, but this is going to be my common photo for the time being.
I'm still heavily addicted to World of Warcraft. Six Minutes to Release is still going strong, and I have done a lot with it since my last update. Right now I'm working on updating the broken LibWowArmory to work with all of Blizzard's latest Armory changes. Woo, this post is already linkerific.
Cent has resurfaced as a project when I discovered C++/CLI. Basically, all the calls to Crystal Space are done in C++/CLI while I do the actual game logic in Visual Basic.Net. It's not been without its difficulties, though. For instance, passing a System.String from VB.Net into C++/CLI for use as a char* parameter without causing a memory leak was interesting. I finally came up with this function:
const char* Marshalling::StringToConstCharPointer(String^ strIn) {
marshal_context^ context = gcnew marshal_context();
return context->marshal_as(strIn);
}
So far, I've gotten a blank screen with an FPS counter in the upper right touching 2,400 fps. I'm currently working on the static loader module that loads the images, music, and other various files needed by Crystal Space. Then I get to start working on the menu, which will be designed a heck of a lot smarter than the old one was. That is, no more 10,000 line classes.
The only thing I have yet to figure out is the new event system of Crystal Space, which is probably just for lack of trying. Right now I cannot handle keyboard, mouse, or joystick input without breaking the frame processor. If I try to handle all events, the frame event doesn't fire. If I comment out the part that handles all events, the frame event works fine. I'm sure I'll figure it out with time.
My music has, unfortunately, been put on hold. I just don't have the time nor the proper equipment to do anything with it. I've probably written half a dozen songs in my head in that time, but the overall motivation to actually do something with it is mostly gone. Hopefully next year I can get something from Open Labs and get myself out of this funk.
And finally as a footnote, I am quite into Kado Kado, a competitive mini game website. I am doing really well in Iron Chouquette, Ellon in the Dark, Opalus Factory, and for some reason Cooking Lili. I absolutely hate Cooking Lili. But I'm good at it. Bleh. But seriously, many of the games are fun, and they're coming out with more all the time. You can play five times per day for free, or if you become heavily addicted like me, you can buy the ability to play more.Labels: Cent, Coding, Cooking Lili, Crystal Space, Ellon in the Dark, Gaming, Iron Chouquette, Kado Kado, LibWowArmory, Life, Opalus Factory, Six Minutes To Release, Wedding, World of Warcraft
|
| Thursday, March 01, 2007 |
.Net Fun
Posted: 4:54:00 PM
|
Well, it's been 90 days at the new job, and I must say I've learned a lot about what .Net can do. Now, I've been playing around with .Net for a while, but what they do here at work has me excited about .Net again. The ability to work with a class that is based on a row in a database is something that I just was never able to figure out on my own. I'm so used to datasets and queries, this new way of working with data almost makes coding fun.
I haven't been doing too much coding in my spare time, though, as I really haven't had any motivation to get stuff done. I want to get back into Cent again, as I really think that has some potential, especially with CrystalSpace becoming a fully mature 3D engine. I also have my various web projects that have been on hold for many months, and OSMusic.Net is really something I don't want to end up ignoring.
But the problem for me is that I haven't really seen the proverbial light at the end of the tunnel. A finished product (or in OSMusic.Net's case, vastly improved product) isn't materializing in my head, so I feel no immediate reason to work on it. I haven't really coded much in my free time since the third quarter of last year, it's something that I hope doesn't get away from me for much longer.Labels: Cent, Coding, Crystal Space, Gaming, OSMusic.Net
|
| Friday, July 14, 2006 |
Cent Satisfaction
Posted: 12:47:00 AM
|
I decided over the past weekend that I was getting burnt out, so I decided to push back any work on projects until either Sunday or Monday. That means I get to work on what I want to in the meantime.
So, my project of choice has been Cent. Since it has been so long since I worked in CrystalSpace, I had to redo the event handlers and sound system so that they conformed to the new APIs. After that, I decided to play around a bit and add a preloader, because I absolutely hated the skipping I'd get between game states. The preloader turned out nice, though there was a lot of C++ frustration along the way. I ended up having to completely change the way I handle headers, taking any out of the .h files and putting them all into .cpp files. I also found that because I was referencing enums from one class in another and vice versa, I actually had to move one out so that it would compile right. It seemed really bad at first, as I was getting hundreds of errors, but after a bit of looking around I finally got it working right.
If I decide to continue working on Cent into the weekend, I'll actually be ready to hit new development, which will mean fixing the bits of the control screens I left out, and finishing up the settings editor. Where do I go from there? I'm not sure just yet, and I may have to sit down and actually chart the progress of the application from here on out, which should be interesting.Labels: Cent, Coding, Crystal Space, Gaming
|
| Monday, September 19, 2005 |
Weekend Update
Posted: 1:58:00 AM
|
Not too much going on lately, just been enjoying work and playing games and stuff at home. I did manage to find time to add nearly 3,000 lines of repetative code to Cent, a part of the program I hadn't been looking forward to writing. The good news is that I have most of the logic wrapped up in my head, whereas before I hadn't a clue how to start. This means that it is likely I will be picking up the programming again, and may have more to report soon, and maybe even some new screenshots. Don't get too excited, I'm not ready to start with the 3D portion of the game yet. My goal is to get a solid foundation in the settings screen so that I can concentrate solely on the 3D portion of the game.
Of course, this application may be entirely unnecessary, it looks like Core Decision is starting to kick into high gear. Their goal is for October of 2006... given the amount of time I've worked on Cent, my offering may come much later. They're also quite a bit ahead of me in terms of development, which is no surprise. The advantage I have is that Cent is based off of Crystal Space, so I don't have to worry about coding the engine, I just have to make it work. Having played around with it plenty, I have no doubt I can do that much.
In other news... well, I really can't give away what I'm doing next weekend just yet. With my luck, I'd post it, and then the subject of next weekend's events logs on to read the blog for the first time and... well, that's about all I have to say about that.Labels: Cent, Coding, Core Decision, Crystal Space, Gaming
|
| Wednesday, July 20, 2005 |
Cent Update
Posted: 9:56:00 AM
|
Worked a bit on Cent again today. I got the program to load images used as a player's avatar in the game. That includes building the file search box from scratch, accounting for the scrollbar, directories vs. files, and checking to make sure a file selected was valid.
Something's a bit screwy with it, however. If I load a GIF that's got a transparency, and then save the resulting file as a PNG, it doesn't save the transparency at all. I'm not terribly concerned about this, but it appears CrystalSpace's GIF loader is a bit funny.
Aside from that though, that means one of the 5 pages of settings is complete, and arguably the most difficult of them. It's slow, but it's progress.Labels: Cent, Coding, Crystal Space, Gaming
|
| Saturday, June 04, 2005 |
Back to Cent
Posted: 6:45:00 PM
|
I decided to work a bit on Cent again. It's amazing that with all the time I took off, I was able to look at the code and not go, "Huh?" Perhaps more amazing was the fact that I upgraded to the latest Crystal Space CVS, compiled it, and made it through all the errors in my code that occurred due to the change in the way the event handler works. All without asking for help. There's hope for me yet.
Anyway, did more file I/O stuff, corrected some pretty bad errors, learned the difference between memcpy and strncpy, and actually made pilot functionality working well now. You can add and remove pilots, and the system will save them, knowing which one was your last pilot selected so it'll use it when it's game time. Which is still far off. But I figure if I can put a solid config in first, I'll be able to focus on the details of the game later.Labels: Cent, Coding, Crystal Space, Gaming
|
| Friday, April 01, 2005 |
NWS? XML? NDFD? XPATH?
Posted: 2:38:00 PM
|
Now playing: Atomship - Pencil Fight (3:38)
Seems there's an acronym for everything these days. I guess I'm one of the few that prefer to write out my words. You know, self-documentation and all.
Anyway, I am apparantly on a roll with the NWS stuff I've been working on. I can now read the forecast, current conditions, and severe weather alerts for a particular zip code, reloading as appropriate. All the hard work is done, which means the fun stuff is next, displaying the data. I have a pretty good idea of what I want to do for this, and it'll be quite fun to work on. Having learned a bit about VB.Net's 2D drawing capability and already having played around with Crystal Space's 2D drawing, I have a pretty good idea what I'm in for, so it shouldn't be too difficult to figure out.Labels: Acronyms, Coding, Crystal Space, NWS
|
| Monday, March 28, 2005 |
Sleep is Needed?
Posted: 3:43:00 PM
|
Now playing: dfast - rauhaisa (3:05)
I can code VB in my sleep. C++ is a different story.
After pulling a 30 hour marathon Saturday/Sunday for no reason other than I wasn't tired, I woke up this morning (I think it was around 1:30 AM) and did stuff throughout the day. About 12 hours into being awake, I started playing with the textboxes again. I fixed some annoying bugs I was having with them, and then decided that I would start adding features. One of which is the ability to use the tab key to go between textboxes.
Well, it wasn't working, and I couldn't for the life of me figure out what was wrong. I went into the debugger to see what the key code was. It was coming back as a "9" as expected. Alright, that meant that it was likely the "9" didn't equal CSKEY_TAB. Right? I go and look, and CSKEY_TAB is defined to '\t'.
This is where the lack of sleep comes in. I thought, "Oh wait, \t is 20! It should be \i instead!!"
So I spent an hour trying to figure out 1) Why CSKEY_TAB wasn't '\i', and 2) Why tab worked in OTHER Crystal Space applications. After looking around for some documentation on keyboard events in Crystal Space and finding nothing, I decided to work up the nerve to ask on #crystalspace on IRC. The conversation went something like this.
roncli: Hmm. CSKEY_TAB is defined as '\t' (20), but when I hit tab, it's coming back with '\i' (9)... Is that normal?
res2k: roncli: \t should be 9
res2k: looks to me like you believe '\X' would resolve to the index of X in the alphabet, which is totally wrong
That's when the error in what I was doing sunk in, and when I decided to crawl into a little hole for a while I went back and studied what I apparantly didn't learn reading my C++ materials.Labels: Coding, Crystal Space, Life, Sleep
|
| Sunday, March 27, 2005 |
More on Textboxes
Posted: 11:25:00 AM
|
|
I went ahead and played some more with Textboxes, and they really weren't too hard to figure out. About the toughest time I had is what to do with Backspace & Delete. But it handles most things right now, with the rest of the required features soon on its way. Once I get through making textboxes working right, the rest of the settings page is going to seem like a breeze. Labels: Cent, Coding, Crystal Space, Gaming
|
| Saturday, March 26, 2005 |
Making Textboxes Ain't Easy
Posted: 7:52:00 PM
|
Now playing: Peter Enroth - Tarmdansen (3:00)
In Cent there is going to be several places where you can type in text. Naturally, I want to have a decent GUI and give the user a textbox within which they may place their text. In VB, or anything else that's got a form designer for that matter, this is a snap. Just drag and drop a textbox onto your form and you've got yourself a nice textbox.
However, I'm not using a form designer. Instead, I'm coding every aspect of the display, which means I can't just drag and drop things. For images, buttons, and text this isn't too bad. However, the fun began when I wanted a textbox a user can edit.
Now, Crystal Space has some sort of Windowing System. I didn't look too much into it, but from what I gather it's quite complicated. So I figured I'd do my own controls. How hard can it be anyway?
Textboxes hurt. Think of all the things you take for granted. When you click inside a textbox, what actually happens? You've gotta figure out where in the textbox the user clicked. But that's not enough! You have to calculate what character is at the point the user clicked, find out if it's closer that character's left side or right side, and move the cursor there. To do this, you must know how wide each character is and exactly where on the screen it is positioned.
And what if the text is too wide for the field? AARGH!!! As you can see, this gets really ugly really quick. Thank goodness for reusable code.
In any case, so far I've got my text box properly clickable so that the cursor appears in the right place. I just have to add in the eye candy (I-beam mouse when you're over the textbox, and a flashing cursor), and the ability to actually... you know... type characters into the box.
Moving? Yes. Slowly? Definitely.Labels: Cent, Coding, Crystal Space, Gaming
|
| Friday, March 18, 2005 |
Slow Going
Posted: 2:16:00 AM
|
Now playing: troupe - rfc1459 (3:19)
I've been working on the routines to load, save, and manipulate the pilot and controller profiles in preparation of getting the settings section of Cent fully functional. So far it's been like most programming tasks - long, drawn out, and quite repetative.
So needless to say, it's been slow going, but the good news is that it's at least been going. It's still going to be a while before I have a nice 3D shot up here, but my mantra of "functionality before beauty" and the knowledge that I'm doing things the right way the first time (hopefully!) keeps me motivated.
I've actually thought about taking a break to start designing some maps for the game, but my mild unfamiliarity with Blender combined with the fact that there is no good Crystal Space exporter from within Blender (at least not using the latest buggy Python version anyway, that's another story in and of itself) kinda makes me wanna pass for now and focus on the programming aspect.
Plus there's still OSMusic stuff to work on, which I haven't touched in quite some time. So many projects, so little time. Who's bright idea was it to only put 24 hours in a day anyway? It needs at least 40.Labels: Blender, Cent, Coding, Crystal Space, Gaming, OSMusic.Net
|
| Saturday, March 05, 2005 |
Crystal Space
Posted: 10:47:00 AM
|
What have I been working on?

This is my pet project lately, working with Crystal Space to make an application. What sort of application? Well, it's not very far along yet, so giving out any details would be unfair.
But the interesting thing about this is that I understand the engine, and even with my limited knowledge of C++, I can do some pretty neat things. How far will this go? Only time will tell.Labels: Cent, Coding, Crystal Space, Gaming, Screenshot
|
| Thursday, March 03, 2005 |
Crystal Space
Posted: 8:44:00 PM
|
Now playing: Karmann - Number 27 (5:30)
I've spent the last couple of days - in between tweaking video settings - playing with the Crystal Space engine. For the first time, I am beginning to really understand C++ classes, and the result is the language getting easier for me to learn. I still get occasional oddities that I'm not immediately sure how to resolve, but they are becoming more and more trivial.
That said, the Crystal Space engine is really nice. Not only does it have a full 3D renderer, but it takes care of a lot of common problems associated with coding a 3D app. If this takes off, I'll be able to do some seriously cool things with it.Labels: Coding, Crystal Space
|
| Monday, February 28, 2005 |
I Am Such a C++ N00b
Posted: 4:59:00 PM
|
Now playing: RedHeat Sonic Soundscapes - Outer Circle (Vocal, Dance) (4:50)
It is true. I know little to nothing about C++. Visual Basic just works. C++ on the other hand requires all sorts of knowledge.
Granted, I could code a nice for loop in a matter of... well, however long it takes for me to look at the documentation. No, I don't know any syntax off the top of my head. God I suck!
Anyway, I'm playing with Crystal Space. For some reason I've been fascinated by the programming aspect of 3D engines. It's like the final frontier for me, 3D programming is one of the last aspects of programming I've yet to really get into. It's the closest thing I have to a hobby.
I've tried Irrlicht because it's got a .NET interface. Unfortunately, that interface is sadly lacking, simply because it gives the author double work. I can understand that, so I tried to fudge around with it in C++.
When I realized it didn't have the six degrees of freedom I'm looking for, I ditched it for Crystal Space instead, which has the 6DoF as one of its features. I've downloaded the package, got it all compiled (using VC++ 2005 Beta, you can't beat free dev tools) after a LOT of effort. Yah, I didn't have to use beta software to compile it, but I figured why not go with the latest and greatest.
Well, this all came to a head after I got it all working and started reading the tutorials. I tried to throw one together, and it didn't work. iEngine plug-in not found it would scream at me. Very well, did a Google search on it, and the common mistake is that a system environment variable's not set. No problem, set the variable, run it again.
No soup for me.
I probably spent an hour and a half researching the problem. The solutions were all the same, set your environment variable. I did. Eventually, I started zoning out, and recalled some of my recent Linux shell programming material, and how you had to export environment variables in Linux. I was thinking to myself how glad I was that I didn't have to do that.
Then I recalled a scene from Process Explorer by Sysinternals (yes, more great free software!), where a program that I launched off of the Microsoft Office Shortcut Bar (not free, but it beats the pants off of the Start Menu IMHO) would appear underneith the Shortcut Bar.
I thought about this for a second, and then realized that the Microsoft Office Shortcut Bar had absolutely no knowledge of my change to the environment variables, and thus any programs launched from it would exhibit the same problem. Including Visual C++ 2005 Beta.
Well dammit, sure enough, I close and reopen the Shortcut Bar, run VC++ again, and everything works 100%. I absolutely HATE when problems are so obscure, yet stupidly easy to fix.
And, yes, I'm listening to "Outer Circle" again. Redheat makes some fine music, and this one is no exception. It happens, I get stuck on a song, and have to listen to it for a week. Be glad my blog wasn't up when I was hooked on Dragostea Din Tei...Labels: Coding, Crystal Space, Irrlicht
|
|