Saturday, October 07, 2006

XeO3: A job well done....

Okay, I spent a little bit of time optimising the IRQ side of the multiplexor, and I can now get a sprite within 10-11 lines of the other set. Thats not bad, not bad at all (I seem to remember Blood Money being almost 20). This should be more than enough for a game. I more or less copied Dan's IRQ model for this (although I did a macro with some paramaters rather than having to maintain a whole chunk of code) and I've gotten it down to the barest minimum I can get away with. Heres the macro I used, which if you compare with Dan's, you'll find it quite close with only minor changes. If I had a couple of these, I could save an extra 4 per sprite - but thats excessive :)

;
; \0 = sprite number ( 1,2,3,4,5,6,7 )
; \1 = x+y offset ( 2,4,6,8,10,12,14 )
; \2 = NEXT sprite ( 2,3,4,5,6,7,1 )
; \3 = "b" for bcc or "j" for jcc
;
sub_amount equ 10 ; number of lines before a sprite needs to be setup


SetUpSprite macro
DoSprite\0:
cpy #\0 ; is this the Hardware sprite we're after?
bne NextHWSprite\0 ; not THIS sprite ->jump to next


SkipCPY\0:
lda XTable,x ; Store the sprites "X" coordinate in the
sta $d000+\1 ; VIC hardware sprite register


lda $d010 ; get all sprite significant bits
and #~(1<<\0) ; mask OFF this one
ora XSig,x ; already set for the correct bit!
sta $d010 ; so we OR in this sprite and store it!


lda YTable,x ; Get sprite Y coordinate
sta $d001+\1 ; store in VIC hardware register


lda XShape,x ; get the sprite graphic
sta HWShape1+\0 ; Since we have a double buffered screen,
sta HWShape2+\0 ; we store it in BOTH locations.


lda SprCol,x ; Get sprite colour
sta $d027+\0 ; store in VIC hardware


inx ; next sprite in list
ldy #\2 ; next hardware sprite


lda YTable,x ; Get sprite Y
jeq EndOfSpriteList2 ; 0? If so all finished
sbc $d012
cmp #4 ; do we HAVE enough time for another IRQ? (magic number)
\3cc SkipCPY\2 ; if not do it now!


;
; If we've lots of raster time until the next sprite
; but the sprite we will be copying over was already drawn
; by the VIC, then just copy it over NOW!
;
;sec ; Carry is ALREADY set
lda $d012 ; Get the current raster
sbc #22 ; -22 gets us the last "safe" sprite
sbc $d001+(\2*2) ; location. Now subtract the next sprite Y
\3cs SkipCPY\2 ; is > last sprite, then setup NOW!



;
; If its further down the screen, and the current sprite
; is still being drawn, then setup a new IRQ just above the
; sprite to handle it
;
;sec ; dont set carry, we'll offset this in the SBC
lda YTable,x ; if we can't copy now, then we set up
sbc #sub_amount-1 ; a new RASTER IRQ based on the next sprite (-1 for SEC)
sta $D012 ; and its Y coord.
jmp EndMultiIRQ ; and then this starts all over again!


NextHWSprite\0:
endm


I may not have mentioned this to the C64 guys, but once the game is finished, I plan on giving the source out, along with some documentaion that should allow others to either skin it quickly into another shooter, or to hack it into something completely different. I've always thought that the main problem with the scene was that good games take time, so no one can usually be bothered to make one - and when they do, they feel completely attached to the source and want to keep their master-peice. So I decieded from Day 1 of the Plus4 version that it was all going to get released. There no money in it, so why hold on to it when it could do so much good the scene.

That supercpu shoot-em-up is a good example - I wonder how much they actually made from it.... whats the point? I'm even trying to keep the comments up to date!! So don't say I'm not good to you all!!

Also, if theres anything I've touched on that anyone would liked explained, then just drop a comment letting me know, and I'll try to post something more about it.

8 comments:

Anonymous said...

I don't know if that SuperCPU game ("Metal Dust" or something like that) is so much about making money. The authors always knew that the target group is tiny. (Same on plus/4, maybe it's even "worse"... there are not so many active users around.) I think it's more about creating a "complete product" (and giving people the chance to buy a "real" game).
That may sound odd but I remember that I bought several mediocre (at best ;) ) games because they were for plus/4. That alone was reason enough :)
Back then, many ppl had a "Why should I pay if I can get it for free?" attitude but I think that shifted quite a bit. On commercially abondoned platforms new games are rare and those who stick to that platform for whatever reason usually know how much work creating a game involves. Plus, most of these users have grown up (or old ;) ) and likely have more money than they used to have back then.
Sure, you can't possibly charge what you would deserve. However, it could be a small reward. I know, you are truely idealistic (and so are most retro coders solely coding for the fun of it) and I appreciate that very much. And I guess seeing your game be well received or even "used" to create more games probably makes you happier than a small amount of money.
Still, I don't think making a "commercial" release is a stupid idea in general. I have seen some very nice retro releases. They came with manuals, covers and some even boxed. Definitely not all ppl are like me (I usually get strange looks when I buy CDs or even Vinyls instead of downloading music) but I'm sure some ppl would like to see a boxed disk release and are willing to pay for it. A download just doesn't feel as good... know what I mean? ;)
Some retro coders make the mistake of charging unreasonably high prices and wonder why nobody buys their game. But that's a minority, usually they charge just about what they spent (not time, just money) to create the packaging etc. If there's a little extra for the coders and ppl involved, that's just fair, isn't it?

Anyway, if you (I always mean Luca, too, when talking about the game in general) add the "option" of buying the game (maybe as a limited edition), I'm the first on the list :)

Cheers,
Chicken

luca said...

Chicken your reasons are so close to Cronosoft's philosophy, and I like that view. But I also waited for Cosine's C16 and Plus/4 releases, to have them boxed, wowo fantastic!
Well, no releases at all :(
It would be a boring experience for TMR/Cosine, because the releases had been locked in a cage of problems and mistakes. Nonetheless, me and Mike have been free to decide when to work on it or not, and only nowadays the project finds so much space/time in our day by day life.
A Cronosoft-like release would be cool to me: who don't wanna pay, will download the game, and who wanna have the kewl boxed version will pay. But as now, it's our veeery laaaast thought, and probably we'll do it only if we could be in bussiness with someone who doesn't cage us in delays or forced times.

Mike said...

I have nothing against people that charge for software - hell, I'm a games programmer so I expect it. But to make such a big game and then charge so few people for it seems nuts. If they'd done a "normal" high end C64 game, then fine... there may actually be a market for that, but its like spending a year making a game, and then telling the 4 people that could play it, they have to pay to do so - whats the point? Games is a creative art, and as a creative type, I'd much rather see the game enjoyed by many as get a couple of and get seen by 2.

The only way I'd charge for retro games is if the funds were then given away to charity - THAT I could understand... charge £3 for a download, and give all profits (shopping basket, PAYPAL fees etc.) to a good charity that can use all the penies it can get.

And in the past yes, you got any +4 game you could, not because you didnt want to copy, but because there was no other way. I don't know about your end, but no one had a +4 up here.......

Anonymous said...

Hi Luca,
what's the story behind that? What happened to TMR's releases?

I talked to him a couple of weeks ago on IRC and he said that he hasn't mastered the C16 releases, yet. I asked him about those after I had seen them advertised on Cronosoft's site.

Yes, I understand that a boxed version has no priority and actually, I'm happy about that because it means that you are concentrating on the game itself ;)

My comment was not aimed at XEO3 but at retro (well, I don't really like that term, it's been overused but I guess you know what I mean) games in general. About two and a half years ago I've been to some event where Simon Quernhorst gave a talk on his "A-VCS-TEC CHALLENGE", an "Aztec Challenge" port to the Atari VCS 2600.

Check out his site...
http://www.quernhorst.de/atari/

... and especially the A-VCS-TEC CHALLENGE...
http://www.quernhorst.de/atari/ac.html

I like the spirit behind this and obviously others do, too.

Well, this is something you can think about when game is done :)
So probably next week! Just kidding ;)

Later,
Chicken

Mike said...

I really have no problem with people making a product and selling it, as long as theres a reasonable market out there. otherwise its just greedy and silly. On certain machines (like a cartridge base one) you may have no option BUT to sell it since no one can just make thier own carts - this is fine, if its the ONLY way to get a new game then great.
Old home computers aren't like that, most folk will either play it on an emulator, or if they still use the original machine, then chances are they know how to get it on there. After all this.... IF there are a few folk asking for disks, then sure... sell those. But I think thats such a small number, and there are people willing to do it for free, thats its not worth it.

Of course... what I consider a waste of time, many others wouldn't.

Anonymous said...

I have no idea how many SuperCPUs are around but there are probably more of them in use than plus/4s. Though, I get your point... it's even worse because they coded 6 years or so on that game. I think it was more of trying to push C64 (even if superCPUed) to its limits. And they got "Welle:Erdball" involved and so on. So it's quite a big production. Well, selling the game might be nuts but so is coding on 8bit computers, too, isn't it? ;)

The C16 and plus/4 were not that rare in my area. Thanks to ALDI, the discounter, who sold it in bundles. Still, no comparison to the availability of C64 Software.
I knew five guys who owned a plus/4 but dropped it later on for a C64 or Amiga. Two of those plus/4s ended up at my place :)

Things really got better when the first Hungarian programs came to Germany. At first, I "bought" them from various "Public Domain software sellers" (I just didn't knwo better) but then I contacted some Hungarian coders directly. Though, I've always been fair trader, e.g. I got PIGMY some VIAs. And CROWN still has that IRON MAIDEN postcard I sent him once because I liked his IRON MAIDEN DEMO so much :D

Later on, I met DAN who could code as well. That was better than having games :D Actually, that's when the whole "scene" thing (though very small) started to be fun.

Anyway, donating (or paying) for a download is nice but it doesn't work well. Usually, when I donate some money for a tool that I really like and use I get back an email "Thanks... Now all donations sum up to $11.99 ;)" and sometimes it's "Thanks, that's the first donation I ever got!"

It's different with boxed items. Some people are willing to pay (more) for something they can touch. Even if the game is exactly the same :)

One good thing about downloads is, that you don't have to worry about distribution. My best (hardest work) releases where never really were spread (and some crappy releases showed up at plus/4 world :D).

Later,
Chicken

Anonymous said...

Well, I think it's not only about the disk. Also about the packaging, cover (artwork)... a nice concept, maybe some gimmicks. Things like that do matter. "Collector's Editions" etc usually sell better than the "normal" edition.

If you get a game on a plain disk or a nice boxed one, with a manual and a map etc, that's quite a difference. But creating all that takes some effort, too.

And I think those who produce for a tiny market should be supported by those who make up that market. It can work ("individual computers" comes to my mind). How many small companies went belly up and later on ppl regret not having supporting them.

Though, you are the code slave... go back to work and let the marketing department handle the rest ;)

Hm... bed time... G'nite,
Chicken

Mike said...

I've been thinking about this, and while I don't really want to make a full "package" since I would never recoupe the costs of even the initial run, I suspect a service of selling disks with the game on it might be a good idea. The number of people that may want to switch on their machine and just have it "there" and ready to play is probably worth duplicating a few at least.

I suspect everyone would have to accept that they'd be duplicated on old disks (5 1/4 at least), but aside from that, selling it for a couple of quid to cover costs is worth it to the end user, but I dont think you'd make anything fomr it as I suspect most would still just download it themselves, or play it via emulation.