Pure Racer Demo

Advanced game related topics
GPI
PureBasic Expert
PureBasic Expert
Posts: 1394
Joined: Fri Apr 25, 2003 6:41 pm

Post by GPI »

Tomcat wrote:Yes, I wrote my own engine for this game (used only TransformSprite3D()).
Maybe this is the reason, why i have only white boxes for the "speed-meter". 3DSprites are only allowed with spezific resolutions (for example 256x256) or nothing is displayed on some cards (newer and older ones).

@Fred: It would be nice, when the debugger showes Warning-messages (don't interrupt the programm, only open the debug-message-window).
Btw: any complaints about the gameplay so far?
At the moment you program a "simple" racing-program. It exist thousends racing games.

BUT it doesn't exist many Mario-Kart-Clones....
Tomcat
User
User
Posts: 15
Joined: Sat Apr 26, 2003 6:59 am
Location: Germany

Post by Tomcat »

GPI wrote:Maybe this is the reason, why i have only white boxes for the "speed-meter". 3DSprites are only allowed with spezific resolutions (for example 256x256) or nothing is displayed on some cards (newer and older ones).
Hmm, this may be possible. I know about the restricted sizes, but these two sprites could have slipped through my QA ;) Maybe I can recall, how the data-file is build, extract the two sprites and rebuild a new one.
At the moment you program a "simple" racing-program. It exist thousends racing games.

BUT it doesn't exist many Mario-Kart-Clones....
Hehe, before I started the whole 3D-Stuff, I had exactly a Mario-Kart-Clone in mind (the window-title from Racingtest still is 'MK-Test') :) Don't know why I switched, but I also would like to see a game like 'Ridge Racer' or 'F-Zero' on the PC. Hm, but something like Mario-Kart would also be funny... :)
Tomcat
User
User
Posts: 15
Joined: Sat Apr 26, 2003 6:59 am
Location: Germany

Post by Tomcat »

OK, I've found the program to manage the datafile on my other harddisk. The 3D-Sprites of the speed-meter were all 192x192 and I resized them to 256x256. Maybe this helps you to get rid off the white boxes.

New Datafile (~160kb)
Replace the old 'misc.aga' in the 'PureRacerDemo\Data\'-directory with the new one.

If the white boxes are still there, maybe your Gfx-Card doesn't support the blendingmode I've used for them.

Bye,
Tomek
Berikco
Administrator
Administrator
Posts: 1326
Joined: Wed Apr 23, 2003 7:57 pm
Location: Belgium
Contact:

Post by Berikco »

Yep, the new datafile fixes the white box problem for me :)
dontmailme
Enthusiast
Enthusiast
Posts: 537
Joined: Wed Oct 29, 2003 10:35 am

Post by dontmailme »

:lol:

I now have a nice black box with a red line ( The rev pointer )......

And there's a lot of PINK on the screen ;)

That's because I'm running on a laptop with an S3 SuperSavage which isn't supported by the 3dsprite commands I guess...... please look into this fred!

Good work though, shame you lost it !
Paid up PB User !
Num3
PureBasic Expert
PureBasic Expert
Posts: 2812
Joined: Fri Apr 25, 2003 4:51 pm
Location: Portugal, Lisbon
Contact:

Post by Num3 »

Impressive!!!

Runs at 59 FPS all the time!!! No frame drop!

Athlon XP 2000+
Geforce 2 MX400 - 64Mb
396Mb of memory

You built a very impressive engine...

Congrats!! :mrgreen:
Skipsy
User
User
Posts: 98
Joined: Wed Apr 30, 2003 12:26 pm
Location: France

Post by Skipsy »

:D Wow !!

I am very impressed !!!
Works perfectly on a P4 1.4ghz

Sorry you have lost you source :cry:

Cheers,
WW
Beware of the man who has the solution before he understands the problem...
GPI
PureBasic Expert
PureBasic Expert
Posts: 1394
Joined: Fri Apr 25, 2003 6:41 pm

Post by GPI »

>If the white boxes are still there, maybe your Gfx-Card doesn't support the
>blendingmode I've used for them.

The Speedometer is now there, but the Trees have now a lila-boarder... (also the pureracer-type in the main-menu). Can you replace the lila with black (rgb(0,0,0)) because black is the transparent color.

GPI
User avatar
Paul
PureBasic Expert
PureBasic Expert
Posts: 1282
Joined: Fri Apr 25, 2003 4:34 pm
Location: Canada
Contact:

Post by Paul »

Corrupt images and messedup backgrounds/borders with 3D Sprites are all symptoms of a crappy video card. Get an up-to-date video card and all your problems will go away :)

(or don't bother with games that use the 3D accellerated sprites)
Image Image
GPI
PureBasic Expert
PureBasic Expert
Posts: 1394
Joined: Fri Apr 25, 2003 6:41 pm

Post by GPI »

Paul wrote:Corrupt images and messedup backgrounds/borders with 3D Sprites are all symptoms of a crappy video card. Get an up-to-date video card and all your problems will go away :)

(or don't bother with games that use the 3D accellerated sprites)
Look at my sig: My VGA-Card isn't so old and only PB has this problem with the lila-boarder -> This is a problem of PB!

AND the Speedometer is transparent! So it works, but not with the Trees.
User avatar
Paul
PureBasic Expert
PureBasic Expert
Posts: 1282
Joined: Fri Apr 25, 2003 4:34 pm
Location: Canada
Contact:

Post by Paul »

If it's not your video card, then why does it work fine on 5 different computers here sporting modern video cards, and the 2 computers here that have an older crappy video card, display the colored borders you talk about ??

Good/New video cards work just fine and the people using new video cards are not having any problems.

Accept the fact that there are a number of crappy video cards out there that have lousy accellerated 3D video support (or none at all).
Image Image
Karbon
PureBasic Expert
PureBasic Expert
Posts: 2010
Joined: Mon Jun 02, 2003 1:42 am
Location: Ashland, KY
Contact:

Post by Karbon »

And an Asus TNT2 Ultra 32MB isn't that old? Remember we're talking computer years here :-)
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Door
New User
New User
Posts: 8
Joined: Tue Dec 02, 2003 2:14 pm

Post by Door »

Asus TNT2 Ultra 32MB,
Definite oldie. That is a six year old graphic standard, and it does NOT properly support DX7 which Pure BASIC requires. Personally I will not support anything older than a Geoforce2 MX 400 64MB card (And those GF2 MX 400 64MB are really old, currently selling as $30-$40 budget cards, but at least they support DX7 properly).
GPI
PureBasic Expert
PureBasic Expert
Posts: 1394
Joined: Fri Apr 25, 2003 6:41 pm

Post by GPI »

What i want to say is, that my card can normaly all direct-x things. (ok, it can't bumpmapping and thant kind, but basic-things (and transparence background IS a basic thing) should be no problem. I can run Warcraft3 with no problems (ok, the fps is about 10, but it runs!)

And this small example

Code: Select all

If InitSprite()=0 Or InitSprite3D()=0
  MessageRequester("Init-Problem","Can't init")
EndIf
If OpenScreen(320,200,32,"test")=0
  MessageRequester("Screen-Problem","Can't open")
EndIf

LoadSprite(1,"pic_black.bmp",#PB_Sprite_Texture)
LoadSprite(2,"pic_pink.bmp",#PB_Sprite_Texture)
TransparentSpriteColor(2,255,0,255)
CreateSprite3D(1,1)
CreateSprite3D(2,2)

x1=Random(320):y1=Random(200):t1=Random(100)+155
x2=Random(320):y2=Random(200):t2=Random(100)+155
dx1=1:dy1=1:dt1=1
dx2=-1:dy2=-1:dt2=-1
Repeat
  ClearScreen(0,200,100)
  x1+dx1:If x1>320-32:x1=320-32:dx1=-1:EndIf
  If x1<0:x1=0:dx1=1:EndIf
  y1+dy1:If y1>200-32:y1=200-32:dy1=-1:EndIf
  If y1<0:y1=0:dy1=1:EndIf
  t1+dt1:If t1>255:t1=255:dt1=-1:EndIf
  If t1<0:t1=0:dt1=1:EndIf
  
  x2+dx2:If x2>320-32:x2=320-32:dx2=-1:EndIf
  If x2<0:x2=0:dx2=1:EndIf
  y2+dy2:If y2>200-32:y2=200-32:dy2=-1:EndIf
  If y2<0:y2=0:dy2=1:EndIf
  t2+dt2:If t2>255:t2=255:dt2=-1:EndIf
  If t2<0:t2=0:dt2=1:EndIf
  StartDrawing(ScreenOutput())
  Locate(100,100)
  DrawText(Str(x1)+" "+Str(y1)+" "+Str(t1))
  DrawText("/"+Str(x2)+" "+Str(y2)+" "+Str(t2))
  StopDrawing()
  Start3D()
  DisplaySprite3D(1,x1,y1,t1)
  DisplaySprite3D(1,x2,y2,t2)
  Stop3D()
  FlipBuffers()
Until getasynckeystate_(#vk_escape)&$FF00

End
shows me, that the transparence background is function! (The sourcecode of the Racer would be nice, but it seems, that that is imposible...)

(pic_black has a black background, pic_pink has a pink/lila background).

And when i remember right: I has with my Mosaik the problem, that TransparentSpriteColor() work with some backgroundcolors (i have change the color and then it works....) So maybe here is a problem.

Please Tomcat, when you can, make a little-test-file with a black tree-background.

@Dontmailme:
Please test the new Speed-Meter-File: Is the Speedmeter with a transparent background?
User avatar
Paul
PureBasic Expert
PureBasic Expert
Posts: 1282
Joined: Fri Apr 25, 2003 4:34 pm
Location: Canada
Contact:

Post by Paul »

As expected, your code works fine here on a good video card :)

I used these 2 images to test with.
ImageImage

By the way, quite an odd screen resolution you have chosen.


Here are 2 screen captures showing that both are transparent and there is no sign of pink !
Image
Image


So, everyone repeat after me...
New cards good.... old cards crap. :)
Image Image
Post Reply