Posted By
indi on 2006-09-26 15:47:05
| XeO3...
I've decided to start adding XeO3 programming stuff to my blog, so while Luca does all the really interesting visual and gameplay stuff, I'm going to write about the code a bit more in the vain hope that it keeps me coding. You read it here: http://dailly.blogspot.com
Don't expect to read anything ground-breaking..... it's an old machine, and its all been done before....almost.
|
|
Posted By
Luca on 2006-09-27 10:05:43
| Re: XeO3...
Nice to know about this via forum instead of having a direct contact about! Then, I'll copy some texts from you to keep the WIP weblog synchronized on the stuff, and ppl will read every text twice...keeewl!
|
|
Posted By
indi on 2006-09-27 10:52:52
| Re: XeO3...
Well, I didn't want to mess up your nice blog with my ravings and dribble.
My blogs usually just about what programming rubbish Im doing at the moment, and it just so happens that Im doing more of this so.
I quite liked the fact yours was a "visual" one and concentrated more on graphcis and game design rather than yucky code internals.
|
|
Posted By
Chicken on 2006-09-29 10:24:46
| Re: XeO3...
I think I read this in your blog. I'm not really familiar with the Spectrum... so why is it so much easier to implement software sprites on the Spectrum? Is everything in bitmap mode and the bitmap is structured differently? I'm just curious and a short short short description will do Back then I always wondered why so many C64 titles got published for Spectrum, too but not for plus/4. I knew that the Spectrum was popular in the UK (and in other countries as well) and there was a market but I always thought that that alone can't be the reason. Though, maybe it was But what made it so easy to port games to the Spectrum? Sure, some Spectrum ports were just mediocre but some got rather good reviews.
|
|
Posted By
indi on 2006-09-29 10:38:03
| Re: XeO3...
Its really quite simple.... Its all to do with the character map the Plus/4 has. For example, to draw a sprite on a spectrum (aside from the redrawing of the screen etc.) this is all you do....
Work out screen address Rotate sprite (or use pre-rotated image) Load screen byte and with sprite mask or with sprite store new data.
And repeat for the whole sprite. The plus 4 needs to do this...
Rotate sprite - much more complex than the speccy version as well. (or use pre-rotated one) Work out character address. (the ones we're about to overwrite) Work out NEW character address (the ones we're overwriting WITH) Read characters from screen For each character in screen, work out its bitmap address For each character in screen Copy charaacter address Get sprite data for THIS character load Data from Character AND with sprite MASK OR with sprite data STORE into NEW character Next Char Store all NEW characters into character map
Simply put... less registers on the 6502, and more work to do, means you have lots of code to do it. Lots of loading/storing of addresses and data, and thats BEFORE you've even started to draw the sprite - its a pain.
C64 just multiplexes its hardware sprites - and its done!!
|
|
Posted By
Chicken on 2006-09-29 10:58:03
| Re: XeO3...
Thanks, that was really quick
I already knew how "complicated" plus/4 is but I didn't know that the Spectrum made it that easy.
So how about breaking up the plus/4 screen in several "pseudo bitmaps" (e.g. 6 lines of 40 chars charset1, 6 lines of 40 chars charset2 and so on)
@... charset1 A B C D E @... charset1 A B V D E
Wouldn't that make some things easier? Or does that add to many other "complications"?
I think somewhere in Luca's blog I read that you even considered real bitmap mode once? Are there any games on plus/4 that run in bitmap mode and scroll?
|
|
Posted By
Chicken on 2006-09-29 11:00:07
| Re: XeO3...
I should preview (and learn to type)... I meant "charset2" for the second "pseudo bitmap" of course and not "V" but "C"
|
|
Posted By
indi on 2006-09-29 11:53:13
| Re: XeO3...
Not really. The problem is that you now have to render into several character sets, and you still have to do all the work mentioned previously...
|
|
Posted By
Degauss on 2006-09-29 14:51:28
| Re: XeO3...
I thought about a screenmode like the one chicken proposed. My conclusion was it is only suitable for demo-effects where you can spend most of your memory only for the screen-mode and define the memory-layout in a way that "address-generation" is easy
I've set up a screenmode that consists of 25 charsets and gives you the possibility to have something like a charset-based bitmap with two buffers and the option to do a quick-erase. (40 chars frontbuffer, 40 chars backbuffer, 48 chars "free patterns"). The "Do-I-Need-To-Mix-Graphics"-Test works the same way, Mike does it:
LDA screen BNE i_need_to_mix
Anyway: For a game i think you need more flexibility and Mikes approach suits better.
|
|
Posted By
indi on 2006-09-29 15:02:47
| Re: XeO3...
Yeah, exactly... I said it before - theres a massive difference between demos and games. Demos lay out huge amounts of code for very small gains, while games have to make everything very general since they need the space!!!
|
|
Posted By
Degauss on 2006-09-29 20:07:17
| Re: XeO3...
Nonetheless: The "character-based-bitmap" screenmodes are very funny and almost not at all exploited.
|
|
Posted By
indi on 2006-09-30 03:46:24
| Re: XeO3...
Not at all!! Used this very style of "bitmap" on the SNES when doing Lemmings 2 back in 93-94
They have their place, but you use whats best for your game at the time.
|
|