Page 16 of 16

Re: Fast scrolling game howto, anyone?

Posted: Thu Jul 31, 2014 10:58 pm
by Symoon
I'm sending you the Oric-1 compatible version ;) Done with a hex editor.

Beware though, just like for Hnefatafl, your TAP file has a problem: your first part has a header made of:
1616161624
and the next ones made of
16161624

This will fail loading on recent versions of Euphoric (for both ROMs).
You either need to have 1616161624 everywhere, or 16161624 everywhere.
This is a bt complicated to explain, it's too late for me ;)

Re: Fast scrolling game howto, anyone?

Posted: Fri Aug 01, 2014 4:43 am
by Chema
Please send it to Dbug so he updates the website... Thanks!!

Re: Fast scrolling game howto, anyone?

Posted: Fri Aug 01, 2014 7:39 pm
by Dbug
I added the 11.tap version to the archive.
I will let Chema do the final updated version :)

Re: Fast scrolling game howto, anyone?

Posted: Tue Oct 25, 2016 7:18 pm
by ThomH
I'm late to everything, but following on from the way the Spectrum's Cobra works, wouldn't it be possible to keep the Oric in text mode, then for each 8x8 tile define 16 possibilities:

0–5 = the tile internally rotated by 0–5 pixels;
6–11 = partial parts of the tile creeping in from the right hand side, at one pixel in, two pixels in, three pixels in, etc;
12–15 = as before, but creeping out to the left, at one pixel out, two pixels out, three pixels out, etc.

Then to paint an n-tile row starting at x:
  • let column = x / 6, offset = x % 6
  • if offset = 0 then paint n instances of character 0 from column to column + n;
  • otherwise: paint character (6 + offset) at column, increment column, paint n-2 instances of character (offset) at column+1 to column+n-1, then paint character (12 + offset) at column+n.
Runs of tiles are assumed to have at least a block's gap before the next run of tiles, but Cobra looks even more restrictive than that, mostly limiting to a single type of tile per line.

With sprites as well the simplest algorithm to me feels like: allow four tiles per character set, occupying characters 32–96. Use 97 as the empty square in all cases. To plot a sprite, for each character square it touches:
  • check the character value. If it's greater than 97 then just composite that portion of the sprite into that character in the character definition table;
  • otherwise find the first tile of value 97 or greater that hasn't yet been used this frame in this character set, set it to the screen, copy into it the original contents of whatever was in the character you're replacing, then composite that portion of the sprite on top.
By my arithmetic, you've always at least 31 of these floating character definitions. If your sprites are, say, 6x16 (the Manic Miner size), then they cover at most 6 character squares. So you can definitely add five sprites without exhausting the space available. If your game doesn't allow them to move up and down, only left and right, you can probably do more if you're careful about which rows use which character set.

EDIT: or, I suppose, you could just compose the left edge + repeated middle + right edge for each span of tiles on the fly, giving each tile only a per-frame three-character footprint. Probably wouldn't cost too much? Foolishness felt.

Re: Fast scrolling game howto, anyone?

Posted: Wed Oct 26, 2016 9:01 am
by Chema
Although the game is already completed :) this looks indeed interesting.

I guess we would exhaust the available tiles quickly, but with some restrictions as you mention it could be doable. Nice idea! :)

And Cobra proved that with simple tiles, one can get a nice-looking game indeed, so maybe this could be the roots of the next modern-and-impressive new platformer game for the Oric?