Tempest is possible

Use this forum to share and discuss Uzebox games and demos.
CunningFellow
Posts: 1238
Joined: Mon Feb 11, 2013 8:08 am
Location: Brisbane, Australia

Re: Tempest is possible

Post by CunningFellow » Sat Apr 04, 2015 9:53 pm

Nicksen,

The video mode is not a vector mode in the same sense as the original tempest arcade. It still operates very similar to Mode6 which used RAMTiles to draw lines upon. The difference here is that I made the RAMTiles 2Bpp which gave me 4 colours (3 + transparent) and then streamed a 1Bpp background off the SD card (the 5th colour blue).

In normal operation every frame I start with 127 free RAMTiles and a blank screen (VRAM filled with 0x00). Then I start plotting lines/points. Each new point I plot I :

Divide X and Y by 8 to go from pixel address to tile address Xt,Yt
Read the tile from VRAM location Xt,Yt
If the tile read was 0x00
.....Read the counter that holds the next free RAMTile number
.....Write that number to VRAM(Xt,Yt)
.....Increment the free RAMTile counter
Use the lower 3 bits of X and Y to work out the Address of the byte that contains the pixel data
Modify the pixel data byte
write it back to RAM

So that is my "Set Pixel" routine. Above that is a Bresenham Line routine that calls "Set Pixel" for each point in it's line.

Above that is the Object drawing routines

Above that is the Object management,collision detection stuff and game logic.

But for the title screen here with the words "TORNADO 2000" and the swirly thing. The foreground colours are just using RAMTile the same way any other game would use tiles.

I drew the font in cells in a spreadsheet, and I then had a formula in the spreadsheet create some C data structures to be my tiles in ROM.
T2KFont.png
T2KFont.png (26.37 KiB) Viewed 2200 times
The cells themselves have conditional formatting so they change RED/GREEN/YELLOW depending on the number 1,2 or 3 in them.

Columns BC and BD the uses a formula that looks like this

=(3-AW755)*64+(3-AV755)*16+(3-AU755)*4+(3-AT755)*1

to go between the 8x 2Bpp pixels and the 2x 8bit numbers that represent them. Columns BG and BH are just the hexadecimal of those two bytes.

Column BJ is the textual concatenation of 8 rows of bytes that I cut and paste into C.

You may be wondering about 0xFF being blank and 0x00 being all filled. This is due to the weird back to front logic I had to adopt for the video mode so I could work around the Pixel-Out code colliding with Reset/Interrupt vectors. It is documented about 5 or 10 pages into this thread from memory. If you haven't read it and are keen I find it and link it.

CunningFellow
Posts: 1238
Joined: Mon Feb 11, 2013 8:08 am
Location: Brisbane, Australia

Re: Tempest is possible

Post by CunningFellow » Sun Apr 05, 2015 10:29 am

Changed the title back to red. Got a bit more pop than the blue.

Have a title page and a credit page, each with their own movie.

Just the highscore page now, but I think I have had enough coding for this weekend.
Attachments
FullIntro.zip
(1.38 MiB) Downloaded 76 times

User avatar
D3thAdd3r
Posts: 2437
Joined: Wed Apr 29, 2009 10:00 am
Location: Minneapolis, United States

Re: Tempest is possible

Post by D3thAdd3r » Sun Apr 05, 2015 4:48 pm

Wow :shock:

User avatar
uze6666
Site Admin
Posts: 4487
Joined: Tue Aug 12, 2008 9:13 pm
Location: Montreal, Canada
Contact:

Re: Tempest is possible

Post by uze6666 » Mon Apr 06, 2015 12:24 am

That swirly thing is very cool! :D I'll check if the 2000 fits on my tv, I suspect it may be clipped a bit in the bottom.

CunningFellow
Posts: 1238
Joined: Mon Feb 11, 2013 8:08 am
Location: Brisbane, Australia

Re: Tempest is possible

Post by CunningFellow » Mon Apr 06, 2015 3:08 am

OK - here it is with some moodier colours and the 2000 moved 16 pixels up.
Attachments
FullIntro.zip
(1.38 MiB) Downloaded 76 times

User avatar
uze6666
Site Admin
Posts: 4487
Joined: Tue Aug 12, 2008 9:13 pm
Location: Montreal, Canada
Contact:

Re: Tempest is possible

Post by uze6666 » Mon Apr 06, 2015 3:14 am

Now you talk, you really nailed the perfect look for the Tornado font, exquisitely retro! I love it! :mrgreen:

User avatar
paul
Posts: 457
Joined: Sat May 02, 2009 8:41 am
Location: Brisbane, Australia

Re: Tempest is possible

Post by paul » Mon Apr 06, 2015 9:26 am

Yea...it's okay, I guess. ;)

CunningFellow
Posts: 1238
Joined: Mon Feb 11, 2013 8:08 am
Location: Brisbane, Australia

Re: Tempest is possible

Post by CunningFellow » Tue Apr 07, 2015 1:03 am

Someone external who can't run the emulator wanted to see photos of what they title/credit screen looked like
title.png
Title screen for Tornado 2000
title.png (6.76 KiB) Viewed 2066 times
credits.png
Credits screen for Tornado 2000
credits.png (4.04 KiB) Viewed 2055 times

CunningFellow
Posts: 1238
Joined: Mon Feb 11, 2013 8:08 am
Location: Brisbane, Australia

Re: Tempest is possible

Post by CunningFellow » Wed Apr 15, 2015 3:45 am

Well - I have now collided with the bootloader.

Time to move the title screen tiles to SD card and do a bit of code refactoring to save some words.

User avatar
uze6666
Site Admin
Posts: 4487
Joined: Tue Aug 12, 2008 9:13 pm
Location: Montreal, Canada
Contact:

Re: Tempest is possible

Post by uze6666 » Wed Apr 15, 2015 3:58 am

Wait! You are still using the default waves table as far as I know and we didn't use all waves for the songs and effects. How much bytes are you busting?

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests