Jump to content
  • Advertisement
  • entries
  • comments
  • views

About this blog

Current topic is the development of a toy language to test a few syntax ideas.

Entries in this blog


Zzz... Zzz... Zzz...

Been poking around with some reflection and attribute stuff with C#. I am pondering rewriting a good deal of the moe GameObject code to cut down on some of the heavy copy/paste involved with some of the event triggering, discovery, and serialization. I'm not sure it'll be much better. There's no easy way to generate the event fields/code at runtime, and it'll be a pain to do some pre-build process for it. It'd be better if you could somehow wrap/inherit Properties, or if C# supported overloading operator=...

Otherwise, not much progress on moe or the music player. I've an interview tomarrow which seems fairly ideal; entry level application development. Normally I'm not nervous about interviews, but I am for this one. AppDev positions are pretty scarce with all the ASP nuts up here and I need to get something soon or this quit/move/buy house gambit will blow up in my face, despite taking all precautions...




Zzz Zzz

Not much progress really as of late. Work is progressing well, social stuffs progressing well, financial stuffs progressing well. I have a quiet weekend this week since my social cohort is out o town. I've no real excuse not to work on moe though I suspect I won't... I would like to though, and as such am setting myself the goal of creating a nice menu widget and half-creating a mouseover highlight decorator.

I don't imagine either will take too long if I would but start on them.




Zzz Zzz Zzz

No word yet for job. Not much work done either. I wrote up a class for handling resource piles, but I don't care for it. I'm also pondering how to implement paths, specifically wether or not to make explicit objects for every path [~tiles*6] or merely for rivers/roads/teleporters [far less]. In my previous implementation I used explicit paths, which made pathfinding easy, but put a fairly large burden on serialization as well as making map communication awkward.

I'm leaning towards explicit paths, but perhaps modifying them a bit to group similar endpoints [before there was multiple paths between endpoints with different modes of transport]. This combined with a more generic 'movement' descriptor class should make handling movement more natural, while still providing the map genericity I'd like. Still might be far too 'heavy' for practical use. Assuming I get off my lazy ass and get stuff to the point where it's actually practical use...




Zzz Zzz

Moe work this evening. Mocked up the UnitSummary UI bits, added some functionality, moved the game ui setup into its own thread and present a nice Loading screen.

Unfortunately, some of the UI bits are... lost somehow when I do things that way. Dunno how to explain it. It's not all of them, just the stuff from the chat box and the map rendering. Two completely separate beasties, one loaded in the thread, one not... Other stuff moves over nicely. I suspected some sort of loading exception, but the logs show nothing and I double checked that the logging wasn't broken... (it was but I fixed it and still no messages). I'll deal with that tomorrow, or after tomorrow. Now, sleep.





Home chaos is resolved. I've just a bit to clean up, but then more time at the expense of less motivation and less happiness. More Moe hopefully forthcoming as boredom returns.

In other thoughts, what ever happened to the fine art of punting out of bounds? Every week it seems like half a dozen punts are pooched near the 10, only to have them invariably bounce into the end zone. Even when the cover guys do get there in time, they never get the thing... Kick the damned thing out of bounds already.





Back is still nice and tight, but at least I can walk. In other news, I did 2 of my 3 tax returns today.

Also, a recent post on the importance of experience.




You're kidding, right?

I picked up Shin Megami Tensei: Persona 3 (the 'shoot yourself in the head game') the other day. High School/Dating sim - RPG hybrids aren't exactly on my radar, but after some good word of mouth and some critical praise I penciled it in after I had a good desire for a game where I could build up a character/army.

I am not one for praise, but the game is exceptional. The design is great, the style is cool, the UI is slick, the sound is fantastic, the music is modern, varied, and consistently appealing, the content is full while not being overwhelming or useless, the story is intriguing (if perhaps very Evangelion-esque)...

And right after getting TF2! (exceptional balance, great style; the best FPS since Tribes 2) I'm not sure what to think, usually it's 2-3 years between games of such quality...




You'll rue the day Trebek!

Ahem. I found one of the major slowdowns I think. The UI layer was rendered as many transparent tiles which acted as mouse targets for recentering the map. Rather than rendering to texture, I just removed the layer's rendertree() call. The input handler uses visibility, and will nicely ignore the lack of actual rendering invisible tiles...

Release mode back up to ~360fps, with all the timer/counter profiling still enabled.

[edit: Current state, for screenshot monkeys.]




Yet more trudging advancement.

I don't think I'm going to get to my goal by the end of business today. Looking at it again, the client code is a mess. A number of the orginizational changes are going to make the (little) gameplay code I do have difficult to port. That and I should stop and re-document much of the stuff I did in the past two days.

Still, I am pleased with the progress so far. Things are cleaner, and I've not yet run into any major stumbling blocks or even non-trivial bugs. Granted, I've done almost nothing in the grand scheme of things. I wonder sometimes how better programmers prototype things so quickly. I've got a fairly established code support base, I'm doing something I've coded before, and I'm not fumbling around with language issues (that means you C++!).

Still, the process is pretty slow. Looking through, I've about 300 new lines added (so maybe 100-200 lines of actual debugged code) in about 5 hours, despite some lower than average slacking off. Meh.

Anyways, here's the current status of things. Spawning a server in a thread and connecting to it works. The opening sequence + main menu work. Until I get some actual artwork for my main menu background, I'm using this as a placeholder. Quite effective for testing background loading stuffs too.

[edit: no screenie on second thought... copyright problems]




Yay. Minor goal reached.

Basic Design Doc complete! I posted it here to get feedback from random strangers. Being nearly hermitlike does have the remarkable downside of not having a few good friends to bounce ideas off of...





So I awake this morning and head on down to the computer as usual. Hrm. Sitting at a login prompt. No problem, power outage or the dog/cats hit the switch. Boot up, and re-establish connections. Hrm. SSH timeout to the linux box. Find a spare monitor and drag it downstairs to the linux box. [when I say box, I mean motherboard and harddrive sitting in a drawer] "No Operating System Found."

Hurrah! Guess it's good SysAdmin practice...


20 mins finding my Debian cds. 5 mins finding an IDE cable. 5 minutes wrangling the dog out of the way, 25 mins futzing with the machine. Not even the CD installer will boot properly on it now.

Next step, hard drive extraction and try to diagnose from my BSD machine.


moved the drive over and re-built the MBR. Moved the drive back, and I couldn't even get the machine to make the monitor or keyboard active.

Swapped components. vid card, keyboard, power supply, monitors, power cable, processors, motherboards, ram... tried without the suspect drive... nothing.

Either some short somewhere [and the exact wrong order] just fried 2 sets of components, and/or someone upstairs hates me.

Going to try to move the drive back to the BSD machine and at least get my homedir off of it. At least then I can pack everything up and just use my windows machine for stuff [until God kills that too of course].


No ext3 support on that BSD machine. More fiddling yields identical results. Non-responsive keyboard, non-responsive monitor. The machine doesn't seem to be booting fully anyways, as the network isn't brought up.

Whatever. I am no longer in any mood to even throw things.


My paladin character retrieved Septim's Armor.

Afterwhich I set back to work on the Linux box. The floppy drive was somehow preventing video display. Remove the floppy data cable, and it booted properly. Or at least it tried to boot properly, and ran into MBR issues. MBR issues were resolved via hacks to get grub mounted and to recognize necissary libraries.

Unfortunately the Debian install/recovery CD reset a few things on the system. I think it was just the network and startup scripts which are now fixed. Anyways, the machine is back to enough of a state for me to scp the source and various other homedir data to my windows machine for backups; which is all I really cared about. Most of the source was already backed up, but it's always nice to get a complete set.





Minnesota is peculiar in one way I've found. I've gone on about 12 interviews now, and had numerous other applicatons... and I've not yet done a technical phone screen. Even the actual interviews are almost wholy untechnical. I've gotten maybe 1 question that my wife [professional secretary] couldn't answer! (netmask/subnetting calculation if you're curious)

Do these people just assume that the resume is accurate?
How do they differentiate between experience [say... admining a machine via trivial infrequent tasks] and experience [say... admining a dozen wholy different machines in a high use environment]?

At least in California, every company I was with did phone screens. You wouldn't believe the number of people who had "years" of Unix admin experience who couldn't describe what ps does [and analagous situations with other skills].

Quite odd.




Workshop Update once more.

No moe work it looks like, but the workshop project is chugging along. Poor beginners. Another 400 lines or so. Feats now mostly work. The fighter bonus feats don't work, but the human ones do. So far only Alertness and the armor proficiencies are actually inputted.

Character[4] - FoobieMonkey
Fighter 1

Unknown / Unknown
Age: 524 Height: 63 in. Weight: 87 lbs.
Speed 30 = 30 (Racial[2])
Max HP 7 = 7 (None[5])
Attack Bonus 1 = 1 (Base[4])
Unspent Skill Pts: 4

Strength 8 = 8 (Base[4])
Intelligence 8 = 8 (Base[4])
Wisdom 13 = 13 (Base[4])
Dexterity 15 = 13 (Base[4]) + 2 (Racial[2])
Constitution 4 = 6 (Base[4]) + -2 (Racial[2])
Charisma 10 = 10 (Base[4])

Fortitude -1 = -3 (Constitution[4]) + 2 (None[5])
Reflex 2 = 2 (Dexterity[4]) + 0 (None[5])
Will 1 = 1 (Wisdom[4]) + 0 (None[5])

Appraise -1 = 0 (Base[4]) + -1 (Intelligence[4])
Balance 2 = 0 (Base[4]) + 2 (Dexterity[4])
Bluff 0 = 0 (Base[4]) + 0 (Charisma[4])
Climb -1 = 0 (Base[4]) + -1 (Strength[4])
Concentration -3 = 0 (Base[4]) + -3 (Constitution[4])
Craft -1 = 0 (Base[4]) + -1 (Intelligence[4])
Diplomacy -1 = 0 (Base[4]) + -1 (Intelligence[4])
Disguise 0 = 0 (Base[4]) + 0 (Charisma[4])
Escape Artist 2 = 0 (Base[4]) + 2 (Dexterity[4])
Forgery -1 = 0 (Base[4]) + -1 (Intelligence[4])
Gather Information 0 = 0 (Base[4]) + 0 (Charisma[4])
Heal 1 = 0 (Base[4]) + 1 (Wisdom[4])
Hide 2 = 0 (Base[4]) + 2 (Dexterity[4])
Intimidate 0 = 0 (Base[4]) + 0 (Charisma[4])
Jump -1 = 0 (Base[4]) + -1 (Strength[4])
Listen 3 = 0 (Base[4]) + 1 (Wisdom[4]) + 2 (Racial[2])
Move Silently 2 = 0 (Base[4]) + 2 (Dexterity[4])
Perform 0 = 0 (Base[4]) + 0 (Charisma[4])
Ride 2 = 0 (Base[4]) + 2 (Dexterity[4])
Scry -1 = 0 (Base[4]) + -1 (Intelligence[4])
Search 1 = 0 (Base[4]) + -1 (Intelligence[4]) + 2 (Racial[2])
Sense Motive 1 = 0 (Base[4]) + 1 (Wisdom[4])
Spot 3 = 0 (Base[4]) + 1 (Wisdom[4]) + 2 (Racial[2])
Swim -1 = 0 (Base[4]) + -1 (Strength[4])
Use Rope 2 = 0 (Base[4]) + 2 (Dexterity[4])
Wilderness Lore 1 = 0 (Base[4]) + 1 (Wisdom[4])





Workshop Update

400 more lines. Added class/cross-class tags to profession. Added Barbarian 1 and Fighter upto level 10. Handled a bug in multi-class HP gain. Example of multiclass handling (The halfling barbarian/rogue is one of my favorites to play in 3rd ed.):

[barb speed bonus not implemented until armor is, rage not implemented until I figure out how I want to do the 'per day' abilities]

Character[9] - FoobieMonkey
Barbarian 1 / Fighter 1

Unknown / Unknown
Age: 138 Height: 42 in. Weight: 33 lbs.
Speed 20 = 20 (Racial[8])
Max HP 18 = 11 (None[20]) + 7 (None[10])
Attack Bonus 3 = 2 (Base[9]) + 1 (Size[8])
Unspent Skill Pts: 8

Strength 9 = 11 (Base[9]) + -2 (Racial[8])
Intelligence 5 = 5 (Base[9])
Wisdom 15 = 15 (Base[9])
Dexterity 14 = 12 (Base[9]) + 2 (Racial[8])
Constitution 9 = 9 (Base[9])
Charisma 8 = 8 (Base[9])

Fortitude 4 = -1 (Constitution[9]) + 1 (Racial[8]) + 2 (None[20]) + 2 (None[10])
Reflex 3 = 2 (Dexterity[9]) + 1 (Racial[8]) + 0 (None[20]) + 0 (None[10])
Will 3 = 2 (Wisdom[9]) + 1 (Racial[8]) + 0 (None[20]) + 0 (None[10])

Appraise -3 = 0 (Base[9]) + -3 (Intelligence[9])
Balance 2 = 0 (Base[9]) + 2 (Dexterity[9])
Bluff -1 = 0 (Base[9]) + -1 (Charisma[9])
Climb 1 = 0 (Base[9]) + -1 (Strength[9]) + 2 (Racial[8])
Concentration -1 = 0 (Base[9]) + -1 (Constitution[9])
Craft -3 = 0 (Base[9]) + -3 (Intelligence[9])
Diplomacy -3 = 0 (Base[9]) + -3 (Intelligence[9])
Disguise -1 = 0 (Base[9]) + -1 (Charisma[9])
Escape Artist 2 = 0 (Base[9]) + 2 (Dexterity[9])
Forgery -3 = 0 (Base[9]) + -3 (Intelligence[9])
Gather Information -1 = 0 (Base[9]) + -1 (Charisma[9])
Heal 2 = 0 (Base[9]) + 2 (Wisdom[9])
Hide 6 = 0 (Base[9]) + 2 (Dexterity[9]) + 4 (Size[8])
Intimidate -1 = 0 (Base[9]) + -1 (Charisma[9])
Jump 1 = 0 (Base[9]) + -1 (Strength[9]) + 2 (Racial[8])
Listen 4 = 0 (Base[9]) + 2 (Wisdom[9]) + 2 (Racial[8])
Move Silently 4 = 0 (Base[9]) + 2 (Dexterity[9]) + 2 (Racial[8])
Perform -1 = 0 (Base[9]) + -1 (Charisma[9])
Ride 2 = 0 (Base[9]) + 2 (Dexterity[9])
Scry -3 = 0 (Base[9]) + -3 (Intelligence[9])
Search -3 = 0 (Base[9]) + -3 (Intelligence[9])
Sense Motive 2 = 0 (Base[9]) + 2 (Wisdom[9])
Spot 2 = 0 (Base[9]) + 2 (Wisdom[9])
Swim -1 = 0 (Base[9]) + -1 (Strength[9])
Use Rope 2 = 0 (Base[9]) + 2 (Dexterity[9])
Wilderness Lore 2 = 0 (Base[9]) + 2 (Wisdom[9])

Armor Proficiency(None) [23]
Armor Proficiency(Light) [24]
Armor Proficiency(Medium) [25]
Armor Proficiency(Shield) [27]
Armor Proficiency(None) [23]
Armor Proficiency(Light) [24]
Armor Proficiency(Medium) [25]
Armor Proficiency(Heavy) [26]
Armor Proficiency(Shield) [27]




Workshop Project #2 progress.

500 more lines. Spell infrastructure implemented.

Cure Light Wounds is the only spell there, though the actual effect and the range limitation aren't yet implemented since HP and location doesn't exist yet. Still, it'll be enough to create the spellcasting professions.

[edit: Oops, not without spell slots... 350 more lines. Wizard 1 done:

Character[9] - FoobieMonkey
Wizard 1

Unknown / Unknown
Age: 139 Height: 61 in. Weight: 85 lbs.
Speed 30 = 30 (Racial[2])
Max HP 3 = 3 (None[21])
Attack Bonus 0 = 0 (Base[9])
Unspent Skill Pts: 8

Strength 12 = 12 (Base[9])
Intelligence 11 = 11 (Base[9])
Wisdom 9 = 9 (Base[9])
Dexterity 18 = 16 (Base[9]) + 2 (Racial[2])
Constitution 9 = 11 (Base[9]) + -2 (Racial[2])
Charisma 7 = 7 (Base[9])

Fortitude -1 = -1 (Constitution[9]) + 0 (None[21])
Reflex 4 = 4 (Dexterity[9]) + 0 (None[21])
Will 1 = -1 (Wisdom[9]) + 2 (None[21])

Appraise 0 = 0 (Base[9]) + 0 (Intelligence[9])
Balance 4 = 0 (Base[9]) + 4 (Dexterity[9])
Bluff -2 = 0 (Base[9]) + -2 (Charisma[9])
Climb 1 = 0 (Base[9]) + 1 (Strength[9])
Concentration -1 = 0 (Base[9]) + -1 (Constitution[9])
Craft 0 = 0 (Base[9]) + 0 (Intelligence[9])
Diplomacy 0 = 0 (Base[9]) + 0 (Intelligence[9])
Disguise -2 = 0 (Base[9]) + -2 (Charisma[9])
Escape Artist 4 = 0 (Base[9]) + 4 (Dexterity[9])
Forgery 0 = 0 (Base[9]) + 0 (Intelligence[9])
Gather Information -2 = 0 (Base[9]) + -2 (Charisma[9])
Heal -1 = 0 (Base[9]) + -1 (Wisdom[9])
Hide 4 = 0 (Base[9]) + 4 (Dexterity[9])
Intimidate -2 = 0 (Base[9]) + -2 (Charisma[9])
Jump 1 = 0 (Base[9]) + 1 (Strength[9])
Listen 1 = 0 (Base[9]) + -1 (Wisdom[9]) + 2 (Racial[2])
Move Silently 4 = 0 (Base[9]) + 4 (Dexterity[9])
Perform -2 = 0 (Base[9]) + -2 (Charisma[9])
Ride 4 = 0 (Base[9]) + 4 (Dexterity[9])
Scry 0 = 0 (Base[9]) + 0 (Intelligence[9])
Search 2 = 0 (Base[9]) + 0 (Intelligence[9]) + 2 (Racial[2])
Sense Motive -1 = 0 (Base[9]) + -1 (Wisdom[9])
Spot 1 = 0 (Base[9]) + -1 (Wisdom[9]) + 2 (Racial[2])
Swim 1 = 0 (Base[9]) + 1 (Strength[9])
Use Rope 4 = 0 (Base[9]) + 4 (Dexterity[9])
Wilderness Lore -1 = 0 (Base[9]) + -1 (Wisdom[9])


Available Spells:
Wizard 0 []
Wizard 0 []
Wizard 0 []
Wizard 1 []




Workshop progress, workplace notes.

About 700 more lines. All races now input fairly completely. Some little things are left out awaiting implementation bits. Almost all feats implemented.

I've also been at my work now for a year. They do their reviews oddly so I won't catch one until January, but things are going well afaict. I wish I could say my first year in a dev position yielded a lot of surprises or monumental accomplishments, but neither are really true.

I didn't check in very much code over the year. A few maintenance things here and there, a few modifications/enhancements, two fairly minor extensions, a few utilities... I've probably written more code for the C# workshop in the past week.

The main surprise was the difficulty in learning the vagaries of the financial/health care/insurance industry. The terms are many, vague, and seemingly meaningless. I suspect my company was worse than most in this regard, though I also suspect that my initial judgment of difficulty was wrong.

The technical and 'business world' things were all as expected. Having estimations met is quite satisfying. SQL was easy to pickup (from scratch) and the daily use a welcome benefit from the experience. It's probably the most valuable part of the year. Java/Netbeans was fairly easy to pickup enough to work with. And of course there's the year of real work experience for the resume. It won't be enough to put off the doubts I got searching for this job, but it's a start.

For the coming year, I need to work on my business ambition. I'm lazy by nature; really lazy, so doing the little things above and beyond solid consistent work is not in my nature. I do though know that such things will benefit me greatly at this point in my career. Financially, expanding my technical challenges, and responsibility.

Just a simple matter of identifying what to work on and the difficult matter of harnessing the motivation to do so.




Working Weekend

My social life is on hiatus until Sunday evening since my partner in crime is busy doing a play. Bad for me, good for Tangent. The plan for this weekend is to get inheritance working fully. Properly resolved name collisions, fix the bug in op constraints, and get a few nice test cases for the various combinations of collision resolution. Oh, and a release for people to inevitably break it.

I kinda only expect to get 1/3 of that actually done, but whatever. That should leave me the rest of the month for the other 2/3, bug-fixes from it, and one or two other features. Probably absolute path notation or signature type expressions or non-trivial type expressions or perhaps half-assed .NET import support. We'll see what the demand is, and where whimsy goes. Generics in source is the next big thing in the queue. I'd kinda like to get a few little polish-y things done first.

Which is maybe funny since the hard part of generics is already there for types (though might need some tweaking), I just need to implement the syntax and compilation bits into it.




Workday: Victory (mostly)

(see below for the problem in detail)

The bug has been squashed. The problem was in the loop element; during the upgrade of them to properly deal with yield-blocks I made a mistake in how the predicate is processed. It was doing:

while( predicate && I'm not supposed to yield control ){
do stuff();

The problem was with the foreach loop, which reduces to while( itr.MoveNext()){...}. So when the loop element checked, it ran MoveNext before doing the yield check, causing the duplication behavior. A simple reversal of the conditions and the code below gives 01234 as it should.

I also fixed a bug where a yield at the end of a block caused the block to return rather than yield. Ended up being a problem during the restart; the 'end of statements' condition wasn't distinguishing between a restart there and reaching there due to simply running out of statements.

Tomorrow should be the matter of turning take(int, collection) into take int from collection




Work Progresses.

Job hunting proceeds fruitlessly, but Moe work continues at a moderate clip. No shiny or impressive advances, but stuff that needs done.

- Changed the Race class stub into a minimal structure able to be constructed and trigger events.
- Added Server serialization and events for Race stuff.
- Added Client de-serialization and events for Race stuff.
- Added movement mode initialization.
- Added a simple (ignores enemies, or other impediments that might effect movement rate) unit speed function based on racial movement modes.
- Modified UI controls to use the proper movement speed rather than fixed test commands.
- Modified server to take movement modes as commands rather than just 'move'





I got reminded that FFXII is coming out soon over here. I'd been skeptical after seeing a few things about the demo, but a search today of import reviews allayed my fears. Indeed, they made me pretty excited to get the thing. Sure, the pausable real-time of Bioware style combat sucks compared to proper turn based like previous FF and Gold Box style games, but it's still good enough. That and a good RPG only comes about once every two years, so I'll take what I can get!

In other news, phase two of my diabolic plan to learn how to cook is complete. Scrambled eggs eaten without salmonella poisoning. Next: Edible spaghetti!




Woof! Again.

The offer is in. I don't have the formal paper version, but an electronic version along with a tracking number. Offered pay is a little less than expected, and title is a little more than expected. Oh, and they're requiring a drug test; which is completely assinine, but I've little leverage. I'll gladly take a little less pay to get the opportunity to actually do coding work for a living (and to get something into my bank account). All in all, better than expected even before I spent months out of work. Now to go get a SQL book, and starting working on the big list of stuff we put off buying due to income shortages :D

In other news, the event tossing containers still seem like a good idea. There's some design quirks I'd not anticipated when dealing with non-root contexts, but once circumvented can be effectively ignored. And it's not as though what they're replacing wasn't more quirky, fragile, and annoying...





First things first. An interview last week went well, and the folks seemed pretty eager to get me in there. Actual dev job (well, not in the software industry), decent pay, free soda. It's not .NET, and the commute is a little far, but that's just nitpicking. Oh, and the actual offer isn't in my hands signed in blood, so there's still an uncomfortably high chance of crap to still hit the fans of death.

Now, for better things! I threw together a wrapped, attributed container class for Moe use. "Argh you fool!" I hear, "don't wrap containers, and don't use your own!" Eh, you might be proven right in the long run. In the short run, this seems pretty bad ass.

What you ask? Auto-discovery. The containers now will toss events (actually aggregated events, so there's only one to many containers) on addition or removal of an object. They will also auto-grant fog of war information based on info generated from attributes during game initialization. So, what does that get me?

Say a unit moves from one tile to another. What fog of war events need to be learned? Unit loses sight in old tile. Unit gains sight in new tile. Everything that sees the old tile loses the unit. Everything in the new tile sees the unit. The unit discovers everything in the new tile... and so on. Quite tedious, and quite annoying when the general behavior differs only slightly.

So with the new setup, remove unit from old tile, add unit to new tile, and the container events handle all the side effects. Further, if a different empire's unit discovers the new tile, the fog of war changes will propogate to the original unit, allowing the new empire to find the info about it without me explicitly coding that discovery vector. Just set up a few rules, and let the code extrapolate what it's supposed to do.

It's very interesting to do things this way. I can only imagine the sort of stuff that someone that actually knows what they're doing can do with this sort of rules based approach. I'll see if I can't get a test map done up tomarrow, so I can effectively show how the container benefits actually effect the code involved.





I use win2k here at home. Until my last computer's untimely hard drive demise in July-ish, I'd been running the same install (migrated from one machine to the next) since late 1999 (beta 2). Winxp offered nothing for me to upgrade so I didn't. Win2k though is now long in the tooth, so I'm looking to pickup Vista for this mostly new machine come next week. Let's hope it will be just as solid and reliable as I'm used to (seriously).

One problem cropped up today which rather reminded me to upgrade. I'd a borrowed hard drive with some data I was looking to integrate into a project. Alas, it was not recognized. I eventually turned to (trial) partition magic, which nicely identified it as having NTFS 3.1 (read: formatted for winXP)

Odd that win2k can't read it. NT4 even has a patch to access it. After about an hour's worth of searching I gave up, moved it over to my linux machine. One command later and I was SCPing the data off of the drive.

It amused me that debian stable had better support (in this case) for NTFS than win2k.





I found out the other day that there's an actual real-life roller derby league right near my new home. I cannot help but think that this is bad ass.




While I think...

Plenty of time tonight to work on implementing generics for methods. I managed to get type parameters working earlier in the week. Again, that is this sort of construct:

public static bool foo {
// ...

if( foo string ){
// ...

A declaration that says 'this argument must be a type, and is referenced by identifier T'. Right now only single argument methods work, but eventually you'll be able to use type parameters as elements of a phrase declaration. I anticipate key uses being type operations like is/as, factory interfaces, and serialization sort of things.

Generic parameters to methods unfortunately has run into a snag. A snag I've run into 1-2 times before, so it's noteworthy enough to post as a warning to others. Plus, it helps me to think by writing about the problem.

Currently, generics are being implemented via a generic parameter which lives on a type, and a generic reference which lives... where-ever a type can go. When a type parameter is bound to a generic type, the generic parameter moves from the unbound list to a bound list (along side the type that is bound there) and a new type is returned with all the references replaced with the concrete type.

For generic methods where the type is inferred, the references serve as 'holes' for the inference to take place. The generic method (or type in certain cases) is overlaid on the concrete type. What you see through the holes is what is used for the generic parameters. To do that programmatically, the inference method starts at a point and walks along each method looking for the generic references. If there's a reference for the method it's inferring for, it looks at the concrete type and adds that to what it sees for that reference.

Once it's done, it binds what it finds to the parameters referenced. So:

foo( arg);
foo(new string); // T = string;

generic(T) foo(List arg);
foo(new List); // T = int;

foo( arg1, arg2);
foo(new string, new int); // T = intersect(string,int)
// (since it sees multiple sources, it generates
// the greatest common base class for them)

And all that works nicely when I hardcode stuff with the infrastructure. I'm just adding syntax at this point.

The problem that has come up more than once now is in 'If there's a reference for the method it's inferring for'. Mechanically, that means if the generic parameter in the reference is in a list of targets passed through the inference method. The list is made from the generic parameters on the method, and the references exist in the method definitions for the signature. What happens is that they don't quite match. All of the data is the same; the name, the type-class, the generic type that owns the parameter... but not the references themselves.

So the inference fails, and the cause is somewhere I didn't reuse the generic parameter when making references. And of course they're all over the place since most everything uses generics for something. I could make the parameters into value types, but I did that with the types themselves and that turned out to be less useful than I anticipated (with its own set of problems). Mostly it's a matter of me doing debugging around this fragile construct. Bleh.

[edit: and not 15 minutes later I find the problem. I was being lazy and calling a factory twice rather than once and assigning the result in two places. So generics now work in declarations for 'normal' void foo( a, b, c){} sorta things. You can't actually use them yet since the name resolution ignores them... baby steps.]



  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!