is it possible to convert Knight Lore to Oric ?

Want to talks about games you like, would like to see developed on the Oric, it's here.
Post Reply
User avatar
goyo
Officer Cadet
Posts: 39
Joined: Sat Jan 12, 2019 10:16 am

is it possible to convert Knight Lore to Oric ?

Post by goyo »

I explored the graphics of Knight Lore game a bit. and I think that
could be possible to reproduce them on Oric because the character's sprite is 3x32 bytes or 4x32 bytes (18x32 or 24x32 pixels ) !


The problem would probably be with the speed of 1mhz against 3.5mhz for the ZX Spectrum

also we will lose the visibility of 1 byte on each side of the screen

What do you think ?

Image 1.png
Image 4.png
Image 2.png
Image 2.png (6.73 KiB) Viewed 591 times
Last edited by goyo on Sat Nov 21, 2020 8:41 pm, edited 3 times in total.

User avatar
coco.oric
Squad Leader
Posts: 612
Joined: Tue Aug 11, 2009 9:50 am
Location: North of France
Contact:

Re: is it possible to convert Knight Lore to Oric ?

Post by coco.oric »

Yes ... Knight Lore should be adapted on oric. However, it's a big project, you've to look at the best solution :
- graph ratio similar
- using macro to copy paste z80 routines
..

Didier
coco.oric as DidierV, CEO Member
Historic owner of Oric, Apple II, Atari ST, Amiga

User avatar
Dbug
Site Admin
Posts: 3506
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: is it possible to convert Knight Lore to Oric ?

Post by Dbug »

Imo, you should start by looking at the closest thing on the Oric: Space 1999.

The source code is available, Chema even documented the principles behind what he did, and he probably some good ideas about how feasible that is :)

User avatar
ibisum
Wing Commander
Posts: 1373
Joined: Fri Apr 03, 2009 8:56 am
Location: Vienna, Austria
Contact:

Re: is it possible to convert Knight Lore to Oric ?

Post by ibisum »

I second a look at the SPACE:1999 code, it is pretty much as good an approach into isometric games as you can find for the Oric so far ..

This thread has the good links:

https://forum.defence-force.org/viewtop ... space+1999

User avatar
Chema
Game master
Posts: 2733
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Re: is it possible to convert Knight Lore to Oric ?

Post by Chema »

A port of Knight Lore should be possible indeed. I still don't know how the programmers approached some of the problems I faced, but I am quite sure they simply ignored some inconsistencies to keep it running as fast as possible.

The biggest problem in my opinion, is the graphics. I am quite sure I had all the sprite sheet (it is available out there) and most of them were 32 pixels wide, which is 4 bytes (8-bit scans in a speccy - and in any other sane video system). We would need either to shrink the graphics to 24 pixels wide to keep it 4 scans wide, or go for 5, so 30 pixels wide, or 6 and have 36.

Of course, more scans means more memory to move, more operations to perform, more space needed for the graphics and masks and buffers, etc.

And, yes, the z80 with its 16-bit registers is much better for all these operations than the humble 6502. And you have other tricks to speed up rendering, so we would need very clever tricks if we want it to move as fast as the spectrum version (which was not particularly fast anyway, IIRC). We also can access the overlay if needed, so we can store more data, unroll loops and use bigger code (6502 code tends to be larger in my experience).

Also, IIRC, these games in the spectrum used to rotate the sprites (and mirror them) on the fly. Mirroring can be done with a table quite fast (I did that!) but rotating is painfully slow in our case, so we would need to have pre-rotated sprites & masks for all the animation frames. Luckily not all the horizontal positions are used, as movements in the x direction are twice those on the y direction, so we would place the sprite only at coordinates 0,2, and 4 horizontally. In any case our memory needs will grow a lot.

All that being said, it should be doable. I learnt a lot since I developed Space:1999 and I am sure it could be enhanced a lot!

User avatar
goyo
Officer Cadet
Posts: 39
Joined: Sat Jan 12, 2019 10:16 am

Re: is it possible to convert Knight Lore to Oric ?

Post by goyo »

Thank you Chema for all of this detailed informations on this fascinating subject.

I think the difficulties are also:
the loss of 8 pixels on each side of the screen. Which would imply too heavy clipping of the sprites.

Among other things, it would not be impossible to dynamically generate the sprite masks by algorithm (using the lost 2bits). which would save half the sprites memory.

Also it is possible to do a dynamic horizontal mirroring of sprites. I have already done it works well.

I think we should not reduce the size of the sprites, I think that would lose all the interest of the project.

Finally,
there is a full Knight Lore convertion to 6502 (for C64)


It could be an easy starting point for such a project...
Last edited by goyo on Mon Nov 23, 2020 11:50 am, edited 1 time in total.

User avatar
ibisum
Wing Commander
Posts: 1373
Joined: Fri Apr 03, 2009 8:56 am
Location: Vienna, Austria
Contact:

Re: is it possible to convert Knight Lore to Oric ?

Post by ibisum »

Port the existing Knights Lore artwork for C64 to a new "8Bit Unity" project for C64, then get Oric version also, maybe?

User avatar
kenneth
Flight Lieutenant
Posts: 355
Joined: Fri Nov 26, 2010 9:11 pm
Location: France PdD
Contact:

Re: is it possible to convert Knight Lore to Oric ?

Post by kenneth »

Goyo's graphic result is very well drawn ! :D

User avatar
Dbug
Site Admin
Posts: 3506
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: is it possible to convert Knight Lore to Oric ?

Post by Dbug »

Using the two bits for mask handling is something Twilighte used on a number of projects.
Regarding the memory usage, the Oric should probably not be any worse than the Spectrum, because if you are not using the system and target disk drive, you can freely use:
- The page 2
- The entire memory area from $400 to the charsets (where there's a lot of wasted room, so you can use one of the charsets for yourself)
- The entire area from after the screen to the end of memory
in total you have about 55000 bytes, and you can dynamically load whatever you need

User avatar
polluks
Pilot Officer
Posts: 67
Joined: Tue Jun 05, 2012 10:09 pm
Location: Germany
Contact:

Re: is it possible to convert Knight Lore to Oric ?

Post by polluks »

If you are looking for 6502 source code of Pentagram
https://csdb.dk/release/download.php?id=194746
cc65 development
Oric Atmos + Cumulus
Acorn Electron

Post Reply