Saturday, May 31, 2008

XeO3: Scripting....

Not doing much but cleanign up the script for the demo. I manged to 148 bytes by swapping from

    PFor  10
Move -2,10
PNext


to...

    MoveLoop  10, -2,10


And the code looks much nicer too. Of course I added around 100 bytes of code for the new function, but theres more space there as the script only has 3k to play with!

XeO3: Move commands...

I've just finished adding the MoveLoop command, so I hope this helps to make script writing simpler. Now I need to go through and change all the demo levels scripts to use this new command.

I've also started to fill in the code documentation on the grounds that if I leave it to last, then even when I finish I'll not be able to release the source for months after - until the documentation is complete. So if I start now, it shouldn't be long after the game comes out that the source code is released too! It should be fine though as the code isn't going to change hugely at this stage, so documenting it now I suspect is fine.

Thursday, May 29, 2008

XeO3: Script Docs complete!!!

Well, I've finished the 1st pass of the scripting docs!! Didn't take too long at all, I'm quite pleased about that. I do still have a couple of examples to do, but they can be added anytime really....

I also just realised I should really add a MoveLoop command since 90% of move commands are surrounded by For/Next loops!

       PFor   50
Move -2,0
pNext


This takes 6 bytes. But if I were to do this....

       MoveLoop  50, -2,0


It would only take 4. Now, 2 bytes doesn't seem like much, but I have 91 loops in level 1 at 2 bytes per loop which makes 182 bytes saved. Not only that but you'd have less typing, and the code would just look nicer!

;-----------------------------------------------------------------------------
; tear drops...
;-----------------------------------------------------------------------------
Drop_1:
DRIFT -1
Move 0,1
Move 0,1
Move 0,2
Move 0,2
Move 0,2
PFOR 4
Move 0,3
PNEXT
PFOR 5
Move 0,4
PNEXT
PFOR 6
Move 0,5
PNEXT
PFOR 200
Move 0,6
PNEXT
KILLSPRITE


becomes....

;-----------------------------------------------------------------------------
; tear drops...
;-----------------------------------------------------------------------------
Drop_1:
DRIFT -1
Move 0,1
Move 0,1
Move 0,2
Move 0,2
Move 0,2

MoveLoop 4, 0,3
MoveLoop 5, 0,4
MoveLoop 6, 0,5
MoveLoop 200, 0,6
KILLSPRITE


Which is much nicer!! Not only that.... But that would give you VERY simple loops in loops.... So a Square path that would look like this...

  PFOR 90
Move -4,0
Move -4,0
Move -4,0
Move -4,0
Move 0,4
Move 0,4
Move 0,4
Move 0,4
Move -4,0
Move -4,0
Move -4,0
Move -4,0
Move 0,-4
Move 0,-4
Move 0,-4
Move 0,-4
PNEXT
KILLSPRITE


becomes - THIS! (which obviously saves even MORE memory!)


  PFOR 90
MoveLoop 4, -4,0
MoveLoop 4, 0,4
MoveLoop 4, -4,0
MoveLoop 4, 0,-4
PNEXT
KILLSPRITE

Wednesday, May 28, 2008

XeO3: Wiki

I'm slowly updating the wiki just now, and documenting the scriping system as best I can. I was going to keep the wiki quiet for now, but Luca's let the cat out the bag so what the hell!

You can get to the wiki either via the main XeO3 web site, or directly at wiki.xeo3.org. All I'm doing there just now is script documentation, but feel free to go and have a read and give me some feedback. Remember the whole reason for doing this was to get a modern game engine out there for people to be able to MOD and release more games! So for that there needs to be some good documentation, and that means people have to understand when the hell I'm talking about!

Still we're on target and things are progressing well (for a change).

I also finished updating my DMADESIGN.ORG site to use my new CGI script, and I did my first perl script as well...very odd - oh well.

Monday, May 26, 2008

Bandwidth Leachers!

I've just spent an hour getting an image script working so that I can stop people leaching bandwidth. Now, dont get me wrong, I actually have stacks of bandwidth left, and I don't even mind them using the images! But what really gets me is when they point directly to one of my images for use as an avatar! If they're a moderator or something, then this image could get pulled down thousands of times! More to the point, if they're a moderator, then they should have the good manners to copy the image onto their own bloody servers! It's not like I'm going around demanding they take down stuff thats on my site, I'm pretty open about people using stuff.. *sigh*

Actually... I downloaded a nice little script, then spent an hour debugging it and making it work! It had several errors in it - typical. :)

(Fek... Now I have to update all my sites so that they can't just pinch another one!)

XeO3: Polls!

I've added a couple of poll's on the right, please take a moment and fill them out. I'm also interested in what other platforms people are interested in seeing XeO3 ported too... I'd like a SNES version myself, and Amiga... aside from that I know there was interest in the Atari 400/800.

I'm busy writing scripting documentation, and will open it up to public viewing soon enough. Once this is done, I just need to clean up some internal code and then we can release it!

XeO3: Wiki!!!

I'm busy setting up an XeO3 wiki (with restricted user access) so that Luca and I can document everything in XeO3 properly. Previously Luca started out doing it on the main site, but that's hard to maintain. I use MediaWiki at work for blogs and its pretty flexible, not to mention that people can edit live and simoltaneously. So no longer will Luca or I (or Russell eventually) spot an error and have to wait for the correct person to edit it, we can do it directly outselves. Which is nice...

Aside from the fake BOSS at the end of the level, the scripting documentation is the only thing now holding up the release (I think). So I hope to push on and get it at least in a semi-usable state so we can finally get a working demo out there for you to play and play with!

Sunday, May 25, 2008

XeO3: Mmmmm.....

I've been making more minor fixes in the game code as I come across them so the C64 port is almost complete. In fact all thats really left is the player Death sequence and the front end. Now, the death sequence will be the same but I'd like to do a new front end - mainly because I was so pushed on the Plus4's, so I hope to do something nicer.

I was doing some calculations to see how many sprites I'd have space for on the C64, particually since they take dounle the space (64 bytes over 32). I thought I was going to have to drop some, I dont want to get into doing a sprite cache on here and have to start copying data around - I did that in Blood Money and I dont think it really helped all that much. Sure I got a few extra sprites, but I lost a lot of RAM because of it. So the idea is to use ALL the 16K VIC space for graphics, then use the rest for other things.

Now the Plus4 has 167 sprites - quite a lot! So heres how the C64 stacks up...

Screens x2 = $400*2 = $800
CharacterSets x2 = $800*2 = $1000
Panel Characters = 96*8 = $300
Total space left ($4000- $800+$1000+$300) = $2500
Total sprites left = $2500/64 = 148.

Thats almost 20 less.... Oh well... I will probably push that a little when I move the panel into another VIC bank and swap banks as well as the character set. That gives me another 12 taking the total to 160. Still, these will be bigger, but thats still 7 less. Oh well....

I've also tried the C64 version on NTSC emulation, and the lack of vertical blank raster time really hurts! So I may have to try and come up with another solution... I guess... if I can setup the first 8 sprites quickly, I can overrun with the rest.. still its far from ideal. I wonder if its worth supporting NTSC... Always hated it...

XeO3: Another day... another bug fixed!

So I started to look into adding the panel functionality, and what do you know - its working already; its simply drawing to the wrong screen! The plus4 version sits the panel on screen 2, but on the C64 one I'd used screen 1...simple. However while fixing this, I happened to spot another bug and one thats again in the Plus/4 version.

The panel is only supposed to get updated when it needs to, in fact theres a set of flags set aside to enable updates of certain components of the panel. This means that when nothings happening, its all very quick. However, the flags don't appear to be getting set and the only reason it was working, is because they weren't getting cleared either! So, I've now got to go and set the flags whenever the panel needs changing (like adding to the score, losing a life etc...). Pretty simple fixes, but one that means Im not spending time doing stuff I simply dont have to do!

On the plus side, the panel code is unchanged from the Plus4 to the C64, which means I can fix it on the Plus/4, then simply copy it over and have a working C4 one too... cool :)

Saturday, May 24, 2008

XeO3: Almost there!

I've made pretty good progress this evening and have managed to get all the player controls in and working; along with the player ship of course! This means you can now play the C64 version almost fully, shooting things and picking up coins etc. This now also now includes the shooting of turrets and mines, and they even explode correctly. I took a little while to get the player ship on as I had a bug in the Plus4 to C64 sprite conversion routine (all graphics are converted at startup so I can use the same data files), but once that was solved, I was able to move the ship around and start blasting away!

This leaves a few things left before its on par with the Plus4 version; Panel - power bar (shield and weapons), score, lives and coins, and testing ship to background collision. Once thats all done, it'll be at the same level as the Plus4 version. Its a pitty I dont have the old demo level still as I could make a video of it playing. Oh well...

I'd set myself 4 days to update and complete the port, and still expect to finish on time (for a change!) - although its probably because I've got a couple of days off which is making it easier...

However... don't get too excited, the Plus4 version will still be the only one released for now, but I might release the C64 version a few weeks after if theres enough demand.