Saturday, July 18, 2009

Delphi conversion

So, I'm doing a little Delphi conversion just now and while looking through the code I came over a little bit which didn't quite make sense. Rounding floating point numbers into integers. Now my default has always been to truncate for rounding. Not only is it faster (by far!) but it's easy to predict, and everyone understands it. Now, Delphi's rounding...wow... it's nuts!

Dephi seem to have gone out of their way to complicate things, and I can't figure out why. Anyway, after doing a quick search heres the Delphi rules...

The Round function rounds a floating point Number to an Integer value.
The rounding uses Bankers rules, where an exact half value causes a rounding to an even number:

12.4 rounds to 12
12.5 rounds to 12 // Round down to even
12.6 rounds to 13

13.4 rounds to 13
13.5 rounds to 14 // Round up to even
13.6 rounds to 14

Now...why o WHY would you do that.... Round .5 to EVEN! What! Nuts I tellz ya...

Saturday, June 27, 2009

Editor woes

You know its amazing how fast you can do an editor if your not trying to be fancy. Take RetroEdit. It's actually trying too hard to be the jack of all trades, and as a result, its currently the jack of none. This isn't to say it won't eventually work and do its job, but currently because its trying to hard, its progressing slowly.

Now, take a look at a little map editor I'm currently knocking up for my little iPhone Golf game. I'm not trying to make it a generic editor, and I dont want to reuse it later (not that I couldn't hack it into something else later mind). But this means Im free to throw code in at a great rate of knots and as a result, within a day (almost) I've just about finished the basic editor. It's got a tile window, brush support (grabing multiple tiles at once), and I'll add a quick UNDO function in there for when Im being stupid.

It's amazing how quick you can do these things when your being specific, and I do wonder sometimes if the tools I try and do at home are being too ambitious and as a result might never get finished... hay-ho...

Friday, June 26, 2009

iPhone fun...

Yeah, I know... long time again. I've started doing some iPhone coding to see if I can actually finish a (proper) game at home. Doing games programming at work, then games programming at home is hard going. Doing the same thing all day, then coming back home and doing it all again is a little soul destroying. However, I'd like to try and give it another go, and who knows.... perhaps make a little cash on the side.

So, XeO3 will (yet again) take a back seat for a while so I can see if I can make a real go of this stuff.

On the plus side, I've been doing some OpenGL at work, and it's putting me in good stead for doing some at home! I now know a reasonable amount about it so should be able to use the iPhone's OpenGL ES reasonably easily..

Well, here goes nothing....

Sunday, May 24, 2009

Reporting In...

Nothing much to report. I've just had a nice relaxing birthday weekend and done nothing but cut the grass and watch the Monaco GP. Great fun. However, I have gotten my subversion server up and running again, so that at least should be backup for everyone using it.

No idea when I'll get back to doing stuff, just not in the mood just now - not to mention still installing stuff for windows 7.

Still, had a great weekend so what the hell :)

Monday, May 11, 2009

Subversion

I've now reinstalled sub-version. As I'd hoped, it was pretty painless since I already had all the config files setup and simply had to point at them. Windows 7 is pretty nice and I'm trying really hard to keep features like the user account control, but I'd also love to be able to switch it off for specific programs - like the command prompt (when run as administrator). Still, I'll keep plodding on and see if I can get used to it.

I'll need to test the remote access tomorrow, but since the firewall hasn't changed, it should all be fine; fingers crossed!

I've only a couple more programs to install and I should be back to normal. I have lost my 3rd monitor as it the display seemed to be locking up a lot, but since I've just installed some new drivers, I'll try switching it back on and seeing if its all working again. I like having 3 monitors, it'd be a shame to lose it.

Russell reminded me that I actually have a proper MAC that I could be testing with MONO (my dual core G5), and although I'll need to get more RAM it would be a good testing ground for retro edit (which Russ tells me runs pretty slowly on it) and mu debugger - once I get TCP/IP support in. I could probably knock up a GL version of Minus 4, this should be easy as Russ has ported my speccy emulator over I suspect I could pinch the source to that and get Minus4 working pretty quickly. This would then let me use the OgreDebug and the TCP link to the emultor.. I think.

Friday, May 08, 2009

Windows 7!

I've just installed the windows 7 release candidate and it's all very nice. It has some issues with my 2nd graphics card (I use a small PCI card so I get a 3rd monitor), but aside from that many of the annoying vista-isms are now gone.
However... Because it's a clean install I now need to reinstall everything, including the sub-version server but I hope that since I'm just pointing at a depo it won't take too long this time. If I get a chance tonight I'll try and finish installing everything, then I can (I hope) plod on with more interesting things.

Wednesday, April 22, 2009

InpOut32.dll

Yes!!! Not only have I got it working again, but they have managed to get SIGNED drivers! This means I no longer have to boot up pressing F8 and booting into unsafe driver mode. This is awesome! It also means I can carry on with my debugger and try to get it to a point that I can add the TCP/IP (or UDP) mode.

For those that are interested, full signed drivers (for my upload program for example) can be found HERE

I'm very happy!

Wednesday, April 15, 2009

Source control...

I've finally (FINALLY!) gotten my subversion server up and running and even managed to open up access to other members of the team. This means Russell can now help out on the editor and debugger (if he gets bored), and once Luca gets used to it, he could actually build levels directly into the source without me having to make special versions for him.

I'm currently adding all my relivent projects into the depo and assigning various access rights but it all appears to be going well. Russell has been busy moving house so we're hoping that he'll actually start doing things again soon! (*gasp*)
(perhaps he'll even update his blog!)

I've been trying to get my debugger up and running againas it's quite close to a first version (I think), but there seems to be an issue with downloading to my plus4 - no idea why. I just hope my parallel port isn't fried again! I weas toying with doing an RR-Net for the plus4, and if my parallel port is dead, I may have no choice. I guess I could always do a C64 version in the meantime, and I still have the emulator plug-in to write as well.

I really need to get back up and running as I'm currently not getting anything done at home just now. Fingers crossed this will change soon!

Tuesday, April 14, 2009

New video...

I've uploaded a small video showing the current state of the C64 version. I suddenly realised I'd been sitting on it for ages and no one had really seen it.

You'll notice its not quite right, as background stuff isn't animating, and bullets aren't quite right. Still, it looks pretty, and the multiplexor holds up pretty well too!

Friday, March 20, 2009

To API or not to API... THAT is the question....

I was reading an old post on a form from Tim Sweeney about how all graphics cards will go the way of the dodo, and how no one will be able to write an engine and they'll all have to buy his. He was claiming (back in 2007) that the GPU will become extict abd we'll just be left with massively parallel CPU's that do everything, and that API's like DirectX or OpenGL won't be needed because everyone will simply code their own engine.....

wow.... while a pile of crap. While things are heading towards being able to do more and more with a GPU - or many CPU's like intel's larrabee, the API won't ever become extinct and theres a damn fine reason for that. Developers simply dont have the time to make the huge number of features that directX (or openGL) already has. Who really wants to write full perspective correct, tri-linear, multi-texture stage texture mappers? Not to mention that it'll probably only work on a single platform and you'll have to do it all again. Nope, its total rubbish. Whith will probably happen, is that DX/OGL will continue to deal with new graphics cards and tech and allow game developers to carry on writing games without having to worry about all the low level crap, while a (very) few middleware folk decide to implement their own custom code. It may well even be that normal developers use DX23 for most of the normal stuff, but then implement a really cool voxel rendering system to do some special features.

This makes sense, of course it does. DirectX/OpenGL aren't just about drawing triangle, they're about taking some of the development cost away from developers and allowing their code to run on almost any hardware without any real code change. For those that remember the good-old-days where you had to write versions for every card out there, you'll shudder at the thought that it'll return. I did my fair share of software/DirectX/Glide/PowerVR/S3 ports and it was horrible. True I prefered Glide as it was about 3 times the speed of DirectX, but graphics cards are fast today, and it doesn't take a coding god to make a pretty looking game. In fact most games these days are written by what I'd call normal programmers. Folk that don't really know what the hardwares doing, but its going fast enough so why should I care - that time. And thats fine, it means the games industry grows, you can let normal coders in, its easier to find people and the world is a happier place.

I also find it ammusing that Tim seems to thing API's like DX will go away. The only platform in the world without an API are old systems like the SNES/Megadrive etc. (and older). Everything else you have an underlying OS with...wait for it... an API!!

Theres always gonna be an API, and interfaces like DX and open GL will simply evolve to meet the demands of the programmer - whatever that is. It'll implement common features so we don't have to, and only if your really interested (and think you can do better) will you have to write you own VERY low level bit of code.

I can't wait for larrabee, not from a graphics point of view, but for the ability to run normal code on it. I really don't want to have to write another 100 triangle rasterisers for a single game because I can make each a cycle per pixel faster.... machines are fast enough to not worry too much about that, and if the Wii has proved anything, its pretty graphics isn't what makes a great game - Mr Sweeney should really buy one have have a look.