2 Questions

If you have any questions on programming, this is the place to ask them, whether you're a newbie or an experienced programmer. Discussion on programming in general is also welcome. We will help you with programming homework, but we will not do your work for you! Any porting requests must be made in Developmental Ideas.
Post Reply
User avatar
JS Lemming
Insane DCEmu
Insane DCEmu
Posts: 202
https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
Joined: Mon Apr 04, 2005 8:08 am
Location: C:\CON\CON
Has thanked: 0
Been thanked: 0
Contact:

2 Questions

Post by JS Lemming »

First, is it really worth it to allow the user to adjust the screen dimensions in my games? Like to account for the TV cutting off the edges of the display? I already coded it but I'm beginning to think that it might not be worth the extra time it takes to calculate the adjustments for all things drawn. Is it just my crazy old German TV that cuts so much off the edges? Or is it a common problem?

Secondly, how many of you devvers use time to move objects rather than brute pixel amounts per frame? Is it worth it to move objects with time even though all DCs are pretty much alike? Are there super benefits either way besides the brute force approach being easier?
Vlame
Insane DCEmu
Insane DCEmu
Posts: 209
Joined: Mon Feb 13, 2006 4:55 pm
Location: Is that better Ace?
Has thanked: 0
Been thanked: 0

Post by Vlame »

I really appreciate the thought of the programmer who puts the "Adjust Display" in the options, with every game that has it, I have to adjust it so it fits perfectly. )()(
Sora Aoi, DoB : Nov. 11/83
Three #s : B35 [F Cup]-W23-H33
Ht : 5"1', Wt : She Ain't Telling
Eyes : Brwn, Hair : Brwn
Natural Bust : Disputed, Blood Type : B
Sexual Orientation : Heterosexual, Stage Names : Sola Aoi
User avatar
JS Lemming
Insane DCEmu
Insane DCEmu
Posts: 202
Joined: Mon Apr 04, 2005 8:08 am
Location: C:\CON\CON
Has thanked: 0
Been thanked: 0
Contact:

Post by JS Lemming »

Well, I think I'll keep it then. And I'll make sure that all games I create will use the same VMU file to store the adjustments. That should save people aprox. (20*(numerOfGamesIMake - 1)) seconds of their life!
BlackAura
DC Developer
DC Developer
Posts: 9951
Joined: Sun Dec 30, 2001 9:02 am
Has thanked: 0
Been thanked: 1 time

Post by BlackAura »

If this is for a 2D game, I wouldn't consider it to be worth it. Just make sure that the game works well on TVs with lots of overscan, and that important displays (life counter, for example) aren't hidden off the edge.

The main problem is that you can't stretch the display of a 2D game without causing distortion. If you're using the PVR to do hardware rendered sprites, that distortion will enable bilinear filtering, and make everything look blurry.

On the subject of time, it really depends on your game, and where you expect it to run. If you're sure it'll only ever be running at one specific framerate (say, 60Hz), then using a fixed step per frame is fine. If the framerate will ever change (say, using it on a PAL Dreamcast and ending up with 50Hz), then it's not good enough. You either need a framerate independent system, frameskipping, or to put up with the game running slower.
User avatar
JS Lemming
Insane DCEmu
Insane DCEmu
Posts: 202
Joined: Mon Apr 04, 2005 8:08 am
Location: C:\CON\CON
Has thanked: 0
Been thanked: 0
Contact:

Post by JS Lemming »

Yes, this is a 2D game.
BA wrote:If you're using the PVR to do hardware rendered sprites, that distortion will enable bilinear filtering, and make everything look blurry.
Now this confuses me a bit. Can you give me an example of how to draw something not blurry? Do you just draw something on screen with the exact dimensions of the texture? Does that mean that I'm not allowed to draw sprites with rotation or scaling?

Thanks for the help btw.
BlackAura
DC Developer
DC Developer
Posts: 9951
Joined: Sun Dec 30, 2001 9:02 am
Has thanked: 0
Been thanked: 1 time

Post by BlackAura »

If you have a sprite that's 32x32 pixels, stored in a 32x32 pixel texture, and draw it into a 32x32 rectangle on the screen, there will be a 1:1 mapping between the pixels in the texture and the pixels on screen, so the image will be reproduced exactly.

If you double the size of the rectangle you're drawing to, there isn't a direct relationship between texture pixels and screen pixels anymore, so the Dreamcast is forced to use texture filtering. The same thing will happen if you change the size of the drawn version by even one pixel, or rotate it, or distort it in any way. Depending on the artwork, this might be unnoticable, or it might totally ruin it.

If you're doing rotation and scaling anyway, then it's probably not worth worrying about. You would have already noticed if your artwork looks bad when using bilinear filtering. Artwork in the style of 8- or 16-bit games tends to look horrible when filtered, because the sharp transitions between different colours become blurred. Larger, more natural looking artwork without sharp colour transitions tends to look fine - you won't even be able to tell when it's doing filtering.
Phantom
DC Developer
DC Developer
Posts: 1753
Joined: Thu Jan 16, 2003 4:01 am
Location: The Netherlands
Has thanked: 0
Been thanked: 0
Contact:

Post by Phantom »

I've never been able to get the PVR to give me a 1:1 mapping. I assumed it would always filter even if the image happened to be the exact 'right' size. I guess I'll have to give that another shot.
"Nothing works" - Catweazle
User avatar
carbon14
DCEmu Freak
DCEmu Freak
Posts: 50
Joined: Thu Mar 04, 2004 3:10 am
Location: York, England
Has thanked: 0
Been thanked: 0
Contact:

Post by carbon14 »

On your question about the whether it's just your tv that cuts things off the screen.

I'm only just getting to grips with NTSC, because I'm in the UK and I have PAL.

Everything fits on my PAL screen, but NTSC seems to lose quite a lot at the top and bottom, and that just seems to be the way it is. If you look at a lot of games, they try to avoid putting important stuff at the top and bottom of the screen, either with thick borders, or with gameplay elements that are less important.

I tried resizing the screen for NTSC and it just looked ugly, because my textures were designed to fit nicely pixel for pixel, the distortions were really distracting. In the end, I have just moved gameplay elements up from the bottom of the screen, and down from the top. It's irritating, but I can't see a better way round it.

If I was doing a 3D game, I would probably change the viewing frustrum so that I actually showed a bit more at the top and bottom of NTSC screens, and expected it to get cut off, but that's not really an option with 2D stuff.

Also, my game is slightly easier on PAL, because it runs 5/6ths of the speed.
Oh my god, he's one of those cyborgs.

Luckily he's on our side.
User avatar
JS Lemming
Insane DCEmu
Insane DCEmu
Posts: 202
Joined: Mon Apr 04, 2005 8:08 am
Location: C:\CON\CON
Has thanked: 0
Been thanked: 0
Contact:

Post by JS Lemming »

My TV cuts so much off all the edges that it just isn't funny. We're talking a good 30 pixels on the left and a little less on the top and bottom (none on the right oddly). That's too much for me.
Post Reply