|
Post by nra on May 16, 2013 22:00:16 GMT
Hello Jonathan)
I understand that you would prefer not to mess with float/real, but how could one realize Move_To(x';y') then?
Also still feel a little dazzled having so many new features, but limited to a single course... Perhaps, a menu of features would do nicely? Or what shuld one do to have TRAIL and mouse together in the AGD?
BTW, having only unsigned bytes I don't know how to implement the Bresenham Line algorithm properly, which could be very useful.
Ok, cheers).
|
|
|
Post by Jonathan Cauldwell on May 17, 2013 17:03:35 GMT
You'll have to work out how to move to another position in a certain number of steps using DIVIDE.
It's not practical to allow the user to pick and choose which elements to include in his engine as the routines are not relocatable. The routines are separated into 3 groups as a compromise and I didn't really expect too many people to be interested in the mouse routine as very few Spectrum games require the use of a mouse. It's there for completeness after it was requested on these forums.
Sorry, but I've never (knowingly) used the Bresenham line algorithm.
|
|
|
Post by nra on May 17, 2013 21:45:31 GMT
Jonathan, I see your point. Yet DIViding deltaX and deltaY won't make the sprite move smoothly, which was the goal. As for relocation, it wasn't about mouse only, but, for example, FADE and Trail used together. Perhaps, it would be possible to re-use your templates ASM 205, ASM 85, and ASM 5? Unfortunately, there're only a few integer line algorithms, and Bresenham's is considered as one of the most efficient (wiki), but it uses signed integers, which makes it harder for me. Ok, will be thinking for awhile
|
|
|
Post by Jonathan Cauldwell on May 18, 2013 9:15:16 GMT
There's a limited amount of room reserved for the specialist routines such as FADE, BIGMESSAGE, TRAIL etc. When you select your engine modification you put one of three sets of routines in there, the other two are not included in the engine. When you choose what to include and what to exclude you are going to have to make the same hard choices that Spectrum developers have been making for decades. On the other hand, you could just decide to create a three-part game which uses all of AGD's features. ASM can be useful for calling external routines in the ROM or third-party effects. If you've seen a nice little sound effect routine in an old magazine listing you could use ASM to incorporate that too. However, it isn't an instruction I recommend you use unless you know what you are doing. Basically, ASM 205 inserts a machine code CALL instruction straight into the code, and the two ASM numbers which follow specify the address.
|
|
|
Post by nra on May 22, 2013 21:57:10 GMT
Ok, Jonathan, say, I've got an emulator and would like to 'extract' required features (routines), how easy, if possible, it could be to embed them properly?
Also once you mentioned about increasing 12 sprites cap, yet still they are limited. unless I'm doing something wrong.
|
|