Page 1 of 3

Hat Trick

Posted: Thu Feb 17, 2022 8:24 pm
by Kilo
Hey guys,

Do you remember the Commodore 64 game?
I'm in the process of implementing it for the Uzebox. :D 8-)
The 1st player slides over the ice.
He can also pick up the puck, but it still sticks to the hockey stick.
So... still have a lot to do.

Re: Hat Trick (WIP)

Posted: Fri Feb 18, 2022 10:01 pm
by uze6666
Very good start, Canada's national game on the Uzebox...that would be a fine addition! :P

Re: Hat Trick (WIP)

Posted: Fri Feb 18, 2022 10:34 pm
by Kilo
Well...I think the gameplay will be as easy as the German team defended their silver medal. :lol: :lol: :( :( :(
Let's see... I'll include Wayne Gretzky as the boss. only for you Uze. :lol:

An ice hockey game developed by a german. OMG
Would be the same if you create a soccer game, Uze :lol:

Re: Hat Trick (WIP)

Posted: Sat Feb 19, 2022 2:47 pm
by Kilo
Here's the first test version.
Move your player with the d-pad. You can catch the puck and drag it.
With button A you can shoot.
hattrick.uze
(32.6 KiB) Downloaded 321 times

Re: Hat Trick (WIP)

Posted: Sat Feb 19, 2022 4:29 pm
by Kilo
Ah got a problem.
I added the second player and the goalis in my sprite.map
Well there are no more sprites than in Arkanoid. I also use the makefile of Arkanoid.
But now, without adding the new sprites in the game, the game crashes on the emulator.

Code: Select all

KERNEL_OPTIONS  = -DVIDEO_MODE=3 -DINTRO_LOGO=0 -DSCROLLING=0
KERNEL_OPTIONS += -DMAX_SPRITES=20 -DRAM_TILES_COUNT=36 -DVRAM_TILES_V=29
KERNEL_OPTIONS += -DSOUND_MIXER=1
Why???

Edit: Solved! It was the sound patch file which was changed by me. There was an issue. Wow... didn't expect that this would crash the game.

Re: Hat Trick (WIP)

Posted: Sat Feb 19, 2022 11:11 pm
by Kilo
Now I need help!

I have a tilemap for the mainscreen and a spritemap for the players.
Where and how to add the font???

I tried to put the font tiles after the tileset for the maintiles and set the fontTileIndex after the mailtiles. E.g. the maintiles got a size of 217. So the font tiles must be start at 218. Right? Whatever..

It doesn't work. It only shows some tiles of the mainscreen but not the font. Well...nothing what I tried work.
Then I did the same with another font. First it works... but only when I print ABCDEFGH.
Every char after H is a black blank char. It is like the font stopped after the char H.
Other fonts didn't work as well.
Oh I guess it has something to do with the RAM TILES... Argh... decreasing the RAM TILE COUNT it works withe the font but then my sprites flickers

EDIT: The new version for you to test!!!!!
Now with CPU Player and goalies
hattrick.uze
(45.77 KiB) Downloaded 300 times

Re: Hat Trick (WIP)

Posted: Mon Feb 21, 2022 5:11 pm
by D3thAdd3r
You can only have 8 bit VRAM indices from 0-255 in Mode 3, and numbers from zero to RAM_TILES_COUNT are used by the kernel for Sprite blitting. ThIs means if you manually set:

Code: Select all

vram[(10*VRAM_TILES_H)+10] = RAM_TILES_COUNT+0;
You would have your first tile map tile at (10,10). Because of this, you can't actually use 256 different tiles with sprites in Mode 3. The more ram tiles you have, the less flash tiles you can display.

Code: Select all

SetTile(10,10,255); // will add RAM_TILES_COUNT and wrap around showing your last ram tile)
I think that's your issue, anyway this is looking good keep at it!

Re: Hat Trick (WIP)

Posted: Mon Feb 21, 2022 6:27 pm
by Kilo
Thank you Lee,
so all in all, I'm using too many tiles? That's why my font doesn't fit.
Unfortunately, I'm not the expert when it comes to this sort of thing. I could now try to trick and change my mainscreen to get fewer tiles. But I wouldn't know where to start. Possibly do not draw the edge of the field as a whole. Argh... I have to take a look.
The game doesn't make any sense without a font.

Re: Hat Trick (WIP)

Posted: Mon Feb 21, 2022 11:48 pm
by uze6666
One thing you could do is to have multiple tilesets and switch when required. So one for the title screen (and perhaps cut scenes) and one for the main game could do the trick.

Re: Hat Trick (WIP)

Posted: Tue Feb 22, 2022 5:50 am
by Kilo
Hey Uze,
well I still have one for the main and one for the title. And of course one for the sprites.
So when I do it without the titlescreen "Hat trick", I'm able to put a font in the title.
Also when I decrease the tiles in the main I am able to use font in the main.
But then the mainscreen wouldn't be like the original game. I could make a simpler edge of the field but like I said that wouldn't be close to the original. :(
I have to save tiles anyway. But I don't know how.