Kevin Vance - What kind of day would it be if I didn't post a HexxagonDS picture?…

Entries | Archive | Friends | Friends' Friends | User Info

01:01 am

Thursday, June 29th, 2006
Previous Entry Share Next Entry
Tags,

What kind of day would it be if I didn't post a HexxagonDS picture?

Hexxagon DS screenshot

(It is impossible to take a picture of this thing!)

Technical achievement: the gem on the bottom of the screen is rendered in 3D, like the one from the last post but board sized. The gem on the top of the screen was rendered directly to sprite memory when the program started. Because the pieces are orthographically projected and directionally lit, they look the same regardless of their position on the board. So I can save a ton of GPU time by using the same sprite for any piece that isn't moving! When I start using spheres as player 2's pieces, I'd run out of polygons with a full board anyway.

The hardware video capture function was difficult to get working. I eventually got it to work by rendering the same frame three times and capturing each time. I'll have to register on the gbadev boards so I can ask about this.

The hexagonal highlights are also sprites. White for the selection, green for dupe, yellow for jump. There are 128 hardware sprites available, and Hexxagon can have up to 61 tiles. So even with the board filled and a highlight on every square (impossible) I'd still have a couple of empty sprite slots.

This thing could actually be playable (no animations, extra extra rough) by this weekend!

I'm also working like crazy on duinlas's game, which is just a bit further ahead than this one :P
Link )Reply )

Comments
From: c99koder
2006-06-29 12:37 pm (UTC)
How many polys can the DS handle per frame? I'm considering porting DreamZZT to the DS, which uses 80 * 25 * 2 triangles * 2 layers = 8000 polys per frame to render the screen. It'll even be slightly higher, 'cause I'll be rendering twice to do split-screen:


(mockup using the Mac build)

I guess I should get around to ordering the homebrew stuff for my DS so I can actually start working with the hardware.
(Reply) (Thread)
[User Picture]From: kvance
2006-06-29 04:42 pm (UTC)
I don't think 3D is a good choice. The framerate will probably be frustratingly low.

The limit is 2048 polys/scanline, and the 3D hardware only works on the main display. You can get around this by (a) only drawing the lower parts of the scene during the horizontal retrace and (b) capture the 3D output to VRAM mapped to the subdisplay and then render the main frame.

I haven't used the hardware tiles yet, but I think it's more suited to ZZT. There is an 8x8 tile mode with 4-bit color and 16 palettes. You could render a character as 2 tiles (8x16), using each of the palettes as a single color. Then use a second layer to render the character's background color. There are 4 such layers available in hardware, 2 of which support rotation/scaling, which looks perfect for what you want to do.
(Reply) (Parent) (Thread)
From: c99koder
2006-06-29 06:15 pm (UTC)
Hmm. I was trying to avoid having to maintain two different versions of the drawing code.. horizontally it should only be 320 polys / scanline so maybe it wont be so bad. Is it possible to render 3D onto one of the hardware scalable tiles? I could just render the scene onto that and then render the tile on each screen with different scales. After work I'm gonna get around to ordering a flash cart and DS cartridge so I can actually start playing around with it :)
(Reply) (Parent) (Thread)
[User Picture]From: kvance
2006-06-29 08:45 pm (UTC)
I can't think of a way to render into tiles. But you can capture 3D output into a bitmap surface and use the hardware to scale that. You may be able to get away with only one 3D display then. Check out how ScummVM does it, they have a similar scaled/full size screen layout.
(Reply) (Parent) (Thread)
[User Picture]From: kartos
2006-06-30 05:27 am (UTC)
You haven't been on aim in a week or so, what gives? D:
(Reply) (Thread)
[User Picture]From: kvance
2006-06-30 03:37 pm (UTC)
That is part of the reason I'm getting so much hacking done. I'll be back on this weekend.
(Reply) (Parent) (Thread)
[User Picture]From: kartos
2006-07-01 02:23 am (UTC)
bah! life without aim? nevar!
(Reply) (Parent) (Thread)
[User Picture]From: rspeed
2006-06-30 03:38 pm (UTC)
Izat some DS homebrew!?

Also, I finally added you to my friends list. Heh.
(Reply) (Thread)
[User Picture]From: lipid
2006-07-03 03:35 am (UTC)
update! :P
(Reply) (Thread)