XRacing (MSXDev 2018 entry)

Страница 6/13
1 | 2 | 3 | 4 | 5 | | 7 | 8 | 9 | 10 | 11

By ARTRAG

Enlighted (6980)

Аватар пользователя ARTRAG

11-02-2019, 09:26

Do you have implemented 8 directions of free scrolling at 2 pixels steps in both directions?
Do you? I ask because I want to see if I can get something similar using the same strategy used in Uridium

By santiontanon

Paragon (1833)

Аватар пользователя santiontanon

11-02-2019, 17:26

ah, no, no, I only have 4 directions! I initially wanted to do 8 directions, but the number of tiles needed was insane! So, the way it works is like this:
- Every track has defined a set of "rails" along which the camera can move.
- The camera can ONLY move along those rails
- In this way, I can limit the number of tiles needed, since I know in which parts of the track I need tiles for horizontal scroll and in which parts I only need tiles for vertical scroll
- I considered having diagonal "rails", but that bumped my tile count too high. It is doable in principle, but I just ran out of RAM, since I am keeping the whole map in RAM (about 8KB) and a few other things, so, I had no space for all the additional sets of extra tiles I needed.

Looking forward to what you are planning to do!! Big smile

That's how I managed to have the tile count so low. And also, there was a lot of tweaking to make the base tiles more or less align to a 2-pixel grid, so that the number of tiles is minimized as well (e.g. the number of empty space above/below/left/right of the decoration element tiles is always a multiple of two).

By CASDuino

Champion (361)

Аватар пользователя CASDuino

11-02-2019, 19:31

CAS version of v1.0.2 can be downloaded from here.

By santiontanon

Paragon (1833)

Аватар пользователя santiontanon

12-02-2019, 08:25

And... a new version 1.0.3: https://github.com/santiontanon/xracing/releases/tag/1.0.3

There was a MAJOR bug (basically a wrong jump) that made the game go to the GAME OVER screen if you complete it, rather than showing the ending sequence! (after I bothered to even compose a dedicated song for it! hahaha). I also adjusted the difficulty a bit, so, it should be a bit easier now (not too much hopefully :))

By ARTRAG

Enlighted (6980)

Аватар пользователя ARTRAG

12-02-2019, 08:40

Doing some tests, and you are totally right, diagonal directions make the tile count (and, for some items, the color clash) explode... I had to drastically cut down details and variations to have something that can fit in VRAM.

By gdx

Enlighted (6449)

Аватар пользователя gdx

12-02-2019, 12:56

The joystick still does not work on real MSX1. I looked at the source code. I think it's not good to read the PSG registers one by one via the BIOS because an interruption may occur in the meantime. It's better to use the BIOS routine for joysticks or do direct accesses with the interrupts disabled during the read routine.

By santiontanon

Paragon (1833)

Аватар пользователя santiontanon

12-02-2019, 17:34

Hi gdx!! which MSX did you try it on? I have reports of people having it work fine on an VG8020.

And thanks for the suggestion!! I take note! But I am not sure that is the problem, since I have been careful to place the call to the read joystick routine in a place where the interrupt just happened (very close to a "halt"), so that the interrupt will never occur in between. But you are right in any case, and I might protect the routine with di/ei! Smile

By NYYRIKKI

Enlighted (6097)

Аватар пользователя NYYRIKKI

12-02-2019, 18:13

santiontanon wrote:

But you are right in any case, and I might protect the routine with di/ei! Smile

Unfortunately you can't do that since the routine is:

	DI
	OUT (#A0),A
	PUSH AF
	LD A,E
	EI
	OUT (#A1),A
	POP AF
	RET

By Wlcracks

Hero (572)

Аватар пользователя Wlcracks

12-02-2019, 18:38

gdx what real msx did you test if i may ask?

By santiontanon

Paragon (1833)

Аватар пользователя santiontanon

12-02-2019, 18:43

and btw, I just realized I had uploaded the wrong ROM to the latest release ... (I reuploaded v1.0 again by mistake). So, no wonder the joystick didn't work! I just recompiled and reuploaded from my work computer, so the correct version should be there now, but will check this again when I get home after work...

Страница 6/13
1 | 2 | 3 | 4 | 5 | | 7 | 8 | 9 | 10 | 11