Hat Trick

Use this forum to share and discuss Uzebox games and demos.
User avatar
Kilo
Posts: 330
Joined: Wed Dec 19, 2012 3:43 pm
Location: AC, Germany

Hat Trick

Post 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.
Attachments
uzem_000.png
uzem_000.png (4.4 KiB) Viewed 4019 times
The last digit of Pi is 7! I calculated this, as I counted to infinity yesterday!
User avatar
uze6666
Site Admin
Posts: 4801
Joined: Tue Aug 12, 2008 9:13 pm
Location: Montreal, Canada
Contact:

Re: Hat Trick (WIP)

Post by uze6666 »

Very good start, Canada's national game on the Uzebox...that would be a fine addition! :P
User avatar
Kilo
Posts: 330
Joined: Wed Dec 19, 2012 3:43 pm
Location: AC, Germany

Re: Hat Trick (WIP)

Post 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:
The last digit of Pi is 7! I calculated this, as I counted to infinity yesterday!
User avatar
Kilo
Posts: 330
Joined: Wed Dec 19, 2012 3:43 pm
Location: AC, Germany

Re: Hat Trick (WIP)

Post 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
The last digit of Pi is 7! I calculated this, as I counted to infinity yesterday!
User avatar
Kilo
Posts: 330
Joined: Wed Dec 19, 2012 3:43 pm
Location: AC, Germany

Re: Hat Trick (WIP)

Post 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.
The last digit of Pi is 7! I calculated this, as I counted to infinity yesterday!
User avatar
Kilo
Posts: 330
Joined: Wed Dec 19, 2012 3:43 pm
Location: AC, Germany

Re: Hat Trick (WIP)

Post 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
The last digit of Pi is 7! I calculated this, as I counted to infinity yesterday!
User avatar
D3thAdd3r
Posts: 3221
Joined: Wed Apr 29, 2009 10:00 am
Location: Minneapolis, United States

Re: Hat Trick (WIP)

Post 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!
User avatar
Kilo
Posts: 330
Joined: Wed Dec 19, 2012 3:43 pm
Location: AC, Germany

Re: Hat Trick (WIP)

Post 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.
The last digit of Pi is 7! I calculated this, as I counted to infinity yesterday!
User avatar
uze6666
Site Admin
Posts: 4801
Joined: Tue Aug 12, 2008 9:13 pm
Location: Montreal, Canada
Contact:

Re: Hat Trick (WIP)

Post 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.
User avatar
Kilo
Posts: 330
Joined: Wed Dec 19, 2012 3:43 pm
Location: AC, Germany

Re: Hat Trick (WIP)

Post 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.
The last digit of Pi is 7! I calculated this, as I counted to infinity yesterday!
Post Reply