Since my last update on the progress of developing my game, I flushed out the game mechanics details I needed to get further coding unblocked and took care of the remaining low hanging fruit in regards to refactoring the code implementing M1 hacked up game mechanics into code implementing the newly revamped game mechanics for the remaining milestones. The refactoring work that remains requires a fair bit of new code before the refactoring can occur, so now its time get on with the coding.
Last night I re-planned milestones 2 through 4. Milestones 5-13 were unaffected by the game mechanics changes. M4 was comprised of only one major feature but its equivalent in the new game mechanics is not as large and is necessary immediately, so it was pulled into to M2 and M4 now sits empty. M4 may just get dropped completely, but I’ll put that decision off after M2 is complete. M2 originally had 6 features of which 2 remained in M2, 3 were moved to M3, and one was dropped. The features that remained are now more costly to implement and two new ones were added as well. M3 was light to begin with and what it had was scaled back a bit, so even after moving the 3 features from M2 to M3, M3 still looks like less work then M2, which is why M4 remains empty.
The result of M2 will be playable for myself, so M3 is as well. If I determine the game play is fun after either M2 or M3 is complete then the work for M4 will likely be to develop the unit designer UI (currently I’m just hard coding unit designs, which is why its playable only for myself).
Permalink
No Comments
From Nvidia PhysX features page “Available soom for PhysX-Ready GeForce Processors*” (yes their site had ’soon’ spelled incorrectly). On that same page that star at the end is specified as “* Note: NVIDIA will deploy PhysX on CUDA-enabled GPUs” and a google on “CUDA-enabled GPUs” reveals that these are the GeForce 8000 series cards (for gamer cards, some of the expensive workstation cards are supported as well), which happens to be what I’ve got in my box at the moment.
PhysX does provide support for some physics that my current game mechanics could take advantage of. Problem is that hardware acceleration only comes into play if the user has a GeForce 8000 series card (with new drivers supporting CUDA) or an Ageia PhysX Accelerator. Now this may change as some more googling found an article stating:
Nvidia’s director of product PR for EMEA and India, Luciano Alibrandi, told Custom PC that ‘We are committed to an open PhysX platform that encourages innovation and participation,’ and added that Nvidia would be ‘open to talking with any GPU vendor about support for their architecture.’
…
Either way, it looks as though there’s hope for AMD / ATI getting a bite of the GPU PhysX pie after all; the guys at AMD just need to decide whether they want it.
That article was dated two months ago, and I can not currently locate any kind of announcement that AMD/ATI is planning to actually support PhysX.
The folks working on OpenGL 3.0 suddenly went dark after some months back after indicating they were getting pretty close to being done. There is speculation that this is because is somehow related to the trend towards doing more generalized processing on GPUs and putting GPU and CPU on the same chip. Definitely something for me to keep any eye on, but not something I need to jump on soon.
Update: Also I don’t think off-loading physics processing onto the GPU is necessarily going to result in better performance either. If your game is already fully utilizing either (or several of) the PCIe interface to the GPU, the GPU’s cycles, or the memory the video card just with rendering the graphics and your aren’t pegging the CPU at the same time then its pretty much a no brainer that physics processing should stay on the CPU. Now sure you could use still use the PhysX library on the CPU as well (assuming it doesn’t automatically start using GPU acceleration if available with now way to disable it), but one of the other physics libraries may be a better solution, or a custom solution may better if your game mechanics don’t line up well with any of the existing physics model.
Permalink
No Comments
As stated here I’ve been working on refactoring my game code to bring it line with my newly revamped game mechanics. The interface between the simulation and the results viewer has been refactored and a decent chunk of simulator code has also been refactored, but further progress there is dependent one aspect of the game mechanics I forgot to detail out, so its back to working on game mechanics tomorrow.
Permalink
1 Comment
Just had a major mental block on the word delegation. While in software design and implementation the three (along with association) are very similar they aren’t precisely the same. More importantly searching on aggregation and composition wasn’t getting me the info I needed for what I was trying to do in Python, so I ended up writing a 25 line function where a 1 line function would have done. The one line implementation is simply:
def __getattr__(self, attrib):
return getattr(self.delegate, attrib)
and if I had been more knowledgeable of all of Python’s magic methods I wouldn’t not have needed to search at all. That said the longer function I wrote, although not needed at present, isn’t necessarily wasted as it allows for easy delegation to more then one delegate instance. This also tells me that I need to spend more time on my “Concise Effective Python” document as one of the things Effective C++ did was call out and discuss the intricacies of C++’s magic methods of which there are quite a few less then there are for Python.
Permalink
No Comments
PyScripter
I had used PyScripter last year in the development of a Pylons web app and generally seemed to be up to the task; however, for my current work I’m running into to some issues I had not noticed previously:
- Internal interpreter (bad) state - I can find no way to clear the state of the IDE’s internal Python interpreter (the clear command just appear to clear the interpreter window only) so if it gets variables into a bad state you have to clear them with code or more simply just close and restart the IDE.
- External run output window - one way around #1 is to use the “External Run” command rather then “Run” command, however this window does not allow cutting of anything other then the entire output and it lists file paths in the obfuscated short name form rather then the long name form. Due to the in ability to copy specified output I find myself ATL+TABing to a command prompt to do runs.
- Find & Replace - if you select the block of text you want to limit a find and replace to and initiate F&R when you start typing in the find box the selection is moved to the first occurance of the text to find, so its necessary to put the word in first (it’s a toolbar not a dialog) and then select the text block and then got back up and high the replace button.
- Non-standard key bindings - while this is a Win32 only app it does not use standard Win32 key bindings. For example undo is CTRL+SHFT+Z not CTRL+Y. Goto line is ALT+G not CTRL+G. Save all isn’t bound to anything and CTRL+SHFT+S was bound to some command I wasn’t clear on the function of. These are hardly deal killers as key bindings can be manually rebound and exported (and then imported into a different install), but its an annoyance none the less.
- Hangs - when ALT+TABing between a command prompt (due to combination of annoyance #s 1 and 2) PyScripter sometimes hangs. This possibly only happens when Media Player is running (or just running in the foreground) and “Show code hints” is enabled as it is by default (see #6). This also compounded #4 as the key bindings apparently don’t get persisted until the IDE is closed so at one point I got a nasty surprise when I hit CTRL+Y as it deleted lines rather then redoing and then of course that part of the redo buffer was gone.
- Reference definition custom tooltip - when ATL+TABing between PyScripter and any other app PyScripter will sometime jump back to foreground. This seems to be caused by the reference definition custom tooltip being displayed and sometimes this tooltip window will stay on top over the app that was ATL+TABed to (I’ve got one sitting over FireFox right now as I type this). Also this custom tooltip has no time out and it blocks the view of the two lines of code after the reference, so I find my self frequently moving the mouse pointer to get rid of it so I can actually read my code. I did locate a toggle in the options for “Show code hints” that disabled this custom tooltip. This in turn required binding a key (F12 as in VC6) to “Find Definition” as while that tooltip has a link to the definition on it and there is no Find Definition option on the right click menu.
Duplicating Code
Of the 6, #3 is looking like the one that will make Wingware’s Python IDE (aka Wing IDE) worth the purchase. I tend to duplicate and tweak code frequently as I’m coding. While I don’t generally retain the duplicated code (with the notable exception being unit tests for which I don’t always bother to pull it out in to functions) it’s a great way to discover the exact patterns in code rather then trying to anticipate the pattern and get it wrong enough to have to refactor more then once. Sure if you can anticipate the pattern exactly correctly no refactoring is required but at other times it takes multiple passes and it would have been quicker to duplicate code, find the exact pattern, and then refactor once.
Find & Replace
Anyway, I find any annoyances in Find & Replace to hamper my productivity enough to make it worth spending some cash to get rid of them. I think it was during the development of Whidbey (VS8.0; Visual Studio 2005; although it could have been the previous version) that the editor team decided to party on the Find & Replace dialog in VS and in the process numerous regressions were introduced impairing it’s efficient use. At that time people working on VS generally did not use VS to write code (lots used Source Insight) for a number of very valid reasons, so these issues were not getting raised. I don’t recall what I was doing that I noticed the issues since I was using Source Insight as a code editor myself, but I ran into them, opened bugs, and then had to push back after a number of them were closed as being by (bad) design. There really aren’t that many good models for how Find & Replace should work, so I don’t really understand why folks see the need to try to reinvent the wheel here rather just fully implementing a well established F&R model.
Commercial Python IDEs
It’s to bad that ActiveState decided to discontinue their Visual Python plug-in for VS. That would have been a no-brainer for which IDE to use for Python development. ActiveState’s Komodo IDE is not a no brainer as it costs $295 for a license vs $179 for single platform license for Wing IDE. A two platform Wing license is $295 and a three platform is $395, so Komodo IDE is the same or cheaper if one needs to develop on more then one platform, and if one needs to develop Perl, PHP, Tcl, or Ruby as well as Python Komodo supports all of those were as Wing IDE is just Python. At present all I’m interested in Python on Win32, and Wing IDE’s Python support is better then Komodo’s from what I could gather from using both evaluation versions. I didn’t use Komodo very long though. I just tried a few things to see how it compared to the broad field of Python IDEs and editors I started out comparing. Guess I better take a second look at Komodo before shelling out for an IDE though.
Permalink
No Comments
Maybe I just haven’t found the correct place to look, but I couldn’t find all of the info I was looking for on Python metaclasses all in one place. I ended up referencing:
Unfortunately there doesn’t appear to be anything as comprehensive and as easily referenced the Effective C++ and More Effective C++ books, so I think I decided to start putting together a document called “Concise Effective Python”.
As soon as I tried cutting and pasting from PyScripter into Word I found that I had a new task: find a Python editor that can copy python code as Rich Text (or HTML, just something will retain the formating the editor displays). Visual Studio can do this but I’d need to get and install the IronPython package for VS to get Python colorization there and I’m not sure if that’s still only available as part of the VS SDK, and although I worked on that for a year and half I just don’t it on my machine at present. I’ve been evaluating Wingware’s Python IDE to see what features it had over the free PyScripter Python IDE that were worth paying for and although my evaluation license was expired it allows for a 10 minute emergency session so I gave it ago and found its just copies plain text as well. A quick search revealed that a Python editor named SciTE has a “Copy as RTF” feature and it turns out to be to xcopy deployable so a few seconds after download my task was complete.
Eventually I’ll post a copy of the doc as a page on this blog in case others may find it useful. I was going to put up adhoc posts of information as I added it to the doc, but getting the formatting correct for this blog software is taking longer then I want it to right at this moment.
Permalink
No Comments
At this point I’ve flushed out most of the core details of my idea for deepening the game mechanics and its looking good. On Monday it seemed like I had solved the last tough problem without creating any new problems, but it took a couple more days to detail out that solution sufficiently for confirmation.
The new game mechanics require a complete refactoring of the interface between the simulator and the simulation results viewer, so I’m going to get started on coding that up to scratch my increasingly irritating coding itch. I also need to code up some of the newly solidified game mechanics in order to finish detailing out the remaining details of the core game mechanics, as I’ve reached the point where writing up the code will likely be faster then trying to work it out via a combination of paper and spreadsheet.
Once the design of the core game mechanics are solidified I’ll go through and update my planning milestones to account for the changes.
Permalink
1 Comment
Yesterday I had some unplanned time to kill Best Buy, so I had a look at their current stock of PC games and walked out with a list of 6 strategy titles that looked interesting but which I knew nothing about. The games were Seven Kingdoms: Conquest, The Settlers: Rise of an Empire, Heroes of Might and Magic V, Maelstrom: The Battle for Earth Begins, Lost Empire: Immortals, and Sins of a Solar Empire. Of those the first four were quickly ruled out based on reviews for the following reasons:
- Seven Kingdoms: Conquest - buggy and nothing new in terms of game play.
- Settlers: Rise of an Empire - easy and repetitive game play; copy protection that is incompatible with many CD/DVD players and the publisher recommending user’s replace their drive.
- Heroes of Might and Magic V - buggy; cumbersome interface; most creature special abilities and items lack any description regarding what they actually do and as someone who likes to optimize I know his would bug me to no end.
- Maelstrom: The Battle for Earth Begins - awful path finding, which for an RTS is enough reason for me to stop reading right there, but I read a little more it’s a got a cumbersome interface that makes group units difficult and then when a group is told to move somewhere some units may take different routes and told to attack a few do it while the other mill about. Enough about that.
From the reviews alone I had difficulty determining if Lost Empire: Immortals was worthwhile or not and since it had a downloadable demo I gave that a go. Selecting fleets and systems was frustratingly difficult to do, and while what you had to micro-manage in the 4X game was different then others the micro-management was still there, so its below par compared to other 4X games where selecting fleets is easily done.
So that leaves Sins of a Solar Empire, which is an RTS/4X hybrid, that has gotten pretty rave reviews and definitely looks interesting, so that will be my next competitive evaluation.
Permalink
1 Comment
Just ran across Tilera Corp’s PCIe cards ( TILExpress-64 and TILExpress-20G ) sporting a 64 core processor. Assuming my back-end game simulator can be sliced enough that the processing of one instance can be scaled to hundreds of separate processes, this could be a pretty cost effective way to get that many cores to run it on. Definitive pricing info doesn’t appear to be available yet. The best I could find is a reference to $435 in lots of 10000. Something to keep an eye on.
Permalink
No Comments
In this post I mentioned that I had “forgot[ten] about one aspect of the implementation, which was how much the options will actually cost to build into a unit.” I had the seed of an idea for how I might be able to do this without needing to do it arbitrarily for each and every unit option. Basically the idea was to deepen the game mechanics so that each unit option can be composed from basic components according to some rules. Then the cost could be algorithmically determined from the composition.
I decided to run with it and see where it went. I figured I’d wait and do an update after I either fully flushed out the idea or rejected it, but after spending the last three weeks on working on it without having flushing it out to the point or rejection or completion I thought it was time put a post. I’m starting to get a coding itch that will need to scratched soon, so I may end up doing some core technology coding, which shouldn’t need to be changed as a result of changing game mechanics, before I finish flushing out this idea.
Permalink
No Comments