Naked War Diagnostic. *Please Help*

Miscellaneous Forums/General Discussion/Naked War Diagnostic. *Please Help*

Hello,

Our game Naked War has just entered Beta. We're getting quite high proportion of testers (25% ish) having problems running the game. The two most common issues are connecting with our server and a graphical issue where copyrect seems to be failing when copying from the backbuffer to a texture.

I've written a little program which isolates and tests these two issues.

If you have a free moment I'd be grateful if you'd run this code and report back on here.

[link removed - thanks everyone]

Thanks,

Most of the people with graphical glitches seem to have 6800 based cards. Does anyone know if this is a known problem?

All ok here; Athlon XP3000+, Radeon 9600 128mb, 1.5GB RAM, WinXP SP2.

Currently at skool here, but I myself got a 6800GT at home, will try it out once I get out of here.
(I'd be assuming it's a latest-drivers issue)

Btw, what exactly goes on in the demo?

If it's a bit discrete I can test it out on a few systems over here.

Cheers.

Genexi2: The demo does two things: Runs a php script on our server and copies a section of the backbuffer into a texture and displays a rotatey cube.

Currently at skool here
The irony.... :)

I'll test this on me laptop as well, see what happens there.

[edit] It works on my laptop, too but it is VERY slow.

P3 1.1 GHz, 256Mb RAM, 16Mb Trident Cyberblade (hideous on-board thing).

Fine on the 1900xt. Maybe an nvidia driver issue?

All works fine here (specs in sig).

Worked here.

I'll test it when I get home from work tonight.

Texture-stuff works fine (Intel Crap-GPU), connection to your server failed (Proxy here). Do you use system's proxy-settings?


Do you use system's proxy-settings?


I really need to learn about this stuff. All I'm doing is:

tcp=OpenTCPStream( "www.zee-3.com",port )


How would I do this proxy stuff in Blitz?

Fine here - Inspiron with one o' them fangled Intel GFX chips (915GM/GMS,910GML Express).

Found something in the Code Archives that shows use of a Proxy Server, but no means of how to detect any current ones being used by the actual internet connection.

http://www.blitzbasic.com/codearcs/codearcs.php?code=1023

Cheers Genexi2, I'll have a look at that.

John, just tried this from work and it worked fine:

tcp = OpenTCPStream(ProxyAddress$, ProxyPort)

; Following is from the OpenTCPStream help example
WriteLine tcp,"GET <a href="http://www.zee-3.com" target="_blank">http://www.zee-3.com</a> HTTP/1.0" 
WriteLine tcp,Chr$(10) 
If Eof(tcp) Print "Failed.":WaitKey:End 
Print "Request sent! Waiting for reply..." 
While Not Eof(tcp) 
Print ReadLine$( tcp ) 
Wend 
If Eof(tcp)=1 Then Print"Success!" Else Print"Error!" 
CloseTCPStream tcp 

WaitKey()

From what I can tell (looking here http://www.vbip.com/winsock/winsock_http_03_01.asp) you basically just connect to the proxy rather than to your server directly and then use full URLs (as opposed to local URLs) to GET or whatever.

So at it's most basic you'd just need to allow a proxy address and port to the specified and use those instead in the OpenTCPStream if supplied, otherwise use your defaults.

Edit: which is pretty much what the example posted by Genexi2 says :-)

Works fine here John, specs in sig...

Works fine on my 6800. I'm running v84.21 drivers which I think is the latest.

Works fine on this school PC, Radeon X600 series gfx card, WinXP SP2, even the network test worked behind this networks firewall.

works on my desktop... I'll test the laptop tomorrow when I get to work.

Works fine here on 6600, AMD XP3000+ 2Gig Ram

EDIT: I did have to give the app permision to access the internet in Zonealarm though.
Cheers

Garion

Works fine here, silky smooth and superfast.

AMD 1.67Ghz, 256 meg ram, GForce 5700 ultra or other.

Works fine here fella.

Okay. Cheers everyone. Looks like I'm barking up the wrong tree with the texture issue. People who have the problem with the game don't have it with this code. Must be something else like the size of the texture that causes it.

Anyway, I have the feedback I need thanks for your trouble.

I know this is a silly thing to say, but i take it you state the two buffers you copy from and too. I have seen copyrect produce strange results if you don't specify both buffers. Same with Write/readpixelfast commands. Good luck. What size textures are we talking about here?

You have to use square textures for those 6800 cards. Not power of 2 or whatever but square (nothing regtangular works). I had to go through Aerial Antics and do that for a few textures that were causing those cards to fail. That's what fixed it.

Yeah, I'm specifiying the buffers correctly. It only seems to 6800 based cards that are failing.

We're talking about copying a 256x256 texture into 1024x512. Perhaps the non-square destination is a problem?

I agree with Jeremy, stick to base 2 and nothing larger than 256x256 to ensure maximum protection against unusual slowdown.

Anything over 256 pixels is a big no no to some older cards for some unknown reason. My Voodoo Banshee practically dies if you go over 256x256.
Not had any problems with rectangular textures though, but probably best to stick to same size squares just incase.

> We're talking about copying a 256x256 texture into 1024x512.

Have a play with making a tilset of multiple 256x256 tiles joined together.

Well it's too late for that, I'm using big textures (2048x2048) in places. They aren't the problem though. They work.

What appears to be failing is copyrect. The rest of the texture is being displayed (the part I'm not copying to).


You have to use square textures for those 6800 cards. Not power of 2 or whatever but square (nothing regtangular works).


Okay cheers. That's my answer then. Still wierd that the texture works and only copy fails.

Right. It looks the the problem isn't connected with non-square textures.

One of the cases causing problems only uses square textures.

The problem seems to be copying a small texture onto a section of a larger texture. This seems to be failing completely.

Don't want to send you on a wild goose chase, but how is CopyRect working internally I wonder (are you in Blitz3D?) because in BlitzMax there is no CopyRect and I tried using SetViewPort but many people said this was not a reliable method of copying a texture ... In BlitzPlus it was all CPU-based of course whereas it could be implemented differently in Blitz3D. Maybe other Blitz3D users can shed some light on this?

Also when copying the square texture onto a larger one, is the destination texture rectangular ever? Sorry if I'm being dumb here but you said "256x256 texture into 1024x512."

You haven't said the exact nature of the problem - are you sure its not an alpha thing? I only ask because the one issue I can think of that you might have with CopyRect, is that its primarily a 2D command and doesn't copy alpha.

Yes that's a good point, or perhaps a mask issue...

I don't want it to copy alpha. I want it to work the way it does on every other card.

Grey. In one case I'm copying into a rectangular texture. The copy seems to fail (I don't have card here to test directly). But other portions of that rectangular texture are visible on screen so the texture is 'working' but it seems I can't copy into it.

In another case I'm copying a square section into a (bigger) square texture. Again, the copy seems to fail but other portions of the texture are visible.

Do you force 32 bit display or support 16?

What exactly are the flags you are using for your target texture?

I would also check you haven't forgotten to unlock the texture elsewhere as such oversights may sometimes only affect a limited subset of drivers.

I support 16bit but haven't tried in that mode for ages. Seems to work.

Flags: 1+2+16+32+256+512

In both cases the textures are png's with alpha containing lots of empty space which is where I'm copying stuff to.

I haven't locked any of the textures.

In another case I'm copying a square section into a (bigger) square texture. Again, the copy seems to fail but other portions of the texture are visible.
OK I get it, so rectangles clearly aren't the issue as you already stated. well good luck as my 3D card knowledge runs out here...

Can you possibly come up with a demo & source that replicates the issue on said clients machines?

May make things alot easier to figure out if you can narrow the portions of the code down to said problem into a standalone piece of code.

Yeah. I've have a crack at that in the morning. Perhaps its something to do with those 256 & 512 flags. They aren't really needed are they?

Well it's too late for that, I'm using big textures (2048x2048) in places. They aren't the problem though. They work.


The certainly won't work on all cards -- many older ones have smaller maximum texture sizes...

I've had issues with those flags as well.

The certainly won't work on all cards -- many older ones have smaller maximum texture sizes...
But the GeForce 6800 does, and that's what seems to be causing problems.

Okay, here's some code that copies over parts of a large texture. If anyone has a 6800 or a 6600 card could they give this a quick try.

Global message_pointer=0
Dim messages$(255)

		Graphics3D 640,480,32,2
		SetBuffer BackBuffer()
		AppTitle "Zee 3 \ Naked War Diagnostic"
		
		
		debuglog2 ("About to start texture test: Press a Key")
		
		WaitKey
		
		cube=CreateCube()
		tex=CreateTexture(1024,1024)
		EntityTexture cube,tex
		cam=CreateCamera()
		CameraRange cam,.1,30
		light=CreateLight()
		PositionEntity cube,2,2,0
		PointEntity cam,cube
		
		
	
	
	
	
		
		debuglog2 "-------"
		debuglog2 "You should see a cube with flashing coloured squares"
		debuglog2 "-------"
		debuglog2 "Press 'ESC' to exit this test"
		
		
		While Not KeyHit(1)
		
			clock#=clock+1
	
			If Rnd(1)<(Sin(clock)+.3)
	
			Color Rnd(255),Rnd(255),Rnd(255)
		
			Else
			
			Color 0,0,50
			
			EndIf
		
			Rect 0,0,128,128
			
			x=Rnd(0,7)
			y=Rnd(0,7)
			
			CopyRect 0,0,128,128,128*x,128*y,BackBuffer(),TextureBuffer (tex)
	
	
			TurnEntity cube,.1,.3,.2
			RenderWorld()
			draw_messages(0)
			Flip(1)
		
		Wend
		
	
		
		EndGraphics()
	
	
	
		End
		
	



Function debuglog2 (message$,display=1)


		messages$(message_pointer)=message$
		message_pointer=message_pointer+1
		If display Then draw_messages()
		
End Function
		
	
		
Function draw_messages(doflip=1)
		
		y=470-14*message_pointer
		
		If doflip Then Cls
		Color 255,255,0
	
		For f=0 To message_pointer-1
			Text 0,y,messages$(f)
			y=y+14
		Next	
		If doflip Then Flip(0)
		
		
End Function


You might get more test results if you compile that into an .exe for 6800 owners without Blitz3D...

That's what I've just been doing.

http://zee-3.com/video/z3diag2.zip

John


Works fine here using a nvidia 6600GT

Recent nvidia drivers (8.1.9.8), Windows XP, DirectX 9.0c

Works here, specs in sig.

Fine here too (specs in sig).

hmm... Perhaps it's something to do with alpha channels then.

Back to the drawing board.

John,

Im not sure if its relative, I didnt have time to read every post im on my way out the door. But I have found that Nvidia cards freak out if you read a pixel off the boundary of a buffer, while Radeon cards do not. Is there any chance your copyrect is going beyond the borders ?

I don't think so, but it's worth a check. Ta.

(2048x2048 textures) The certainly won't work on all cards -- many older ones have smaller maximum texture sizes...

But the GeForce 6800 does, and that's what seems to be causing problems.


But even though it may not be the root cause of THIS particular problem, depending on 2048x2048 texture support still seems like a bad idea...

I'm not depending on it. But that isn't causing any problems.

Works here too, x850xt-pe + Cat. 6.5.

Works here to on my Geforce 5500 256MB Wossname

Cheers

Garion

16 bit mode doesn't work with cubemaps though, as i recall. It is a strange problem though... Maybe it's the size of the texture your are copying too that causing the problem? Perhaps the texture your are copying too, is too big to fit in VRAM. Maybe when the copyrect takes places, both textures need to be in VRAM? And that is what is causing the problem.

I'm copying a smaller texture (256x256) from the backbuffer onto a section of a bigger texture (1024x512). The bigger texture works - it displays on screen (as sprites) but the copy fails. The parts of the texture I'm NOT copying to seem to be okay. (I'm basing this on descriptions and the odd screengrab from testers - I don't have access to one of these cards).

This seems to be happening on 6800 cards which are pretty uptodate and have plenty of RAM as far as I know.

The game uses about 51Meg of Vram.

I don't believe copyrect has specific requirements for the textures to be in VRam. Does it?

I'll be making a 3rd test program tomorrow - one which more closely replicates what I'm doing in the game. Hopefully this one will isolate the problem.

Example works for me on gfx440mx 32mb.

Holding the textures in vram certainly speeds up the copyrect process for me.

Shame I'll need 51meg vram to play this!

Stevie

You can turn down features and presumably everything doesn't have to fit into VRAM at the same time anyway. I think we can get it under 30 meg with a few low-res textures etc. 51meg is everything maxed out.

Yeah, I've got it working fine on a 32Mb GeForce 4 Mobile (basically a GeForce 4 MX). Just needed to turn things down a bit (wasn't getting any water texture at the default settings).