Results 1 to 19 of 19

Thread: REF vs. HAL (DX 8.1) [Resolved]

  1. #1

    Thread Starter
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190

    REF vs. HAL (DX 8.1) [Resolved]

    If you are using a function in DX with HAL, and the graphics card don't support it, will it then use REF in stead? Or will it crash? If it uses REF in stead, why is it then a possibility to use REF at all?
    Last edited by NoteMe; Jan 9th, 2004 at 08:38 AM.

  2. #2
    KING BODWAD XXI BodwadUK's Avatar
    Join Date
    Aug 2002
    Location
    Nottingham
    Posts
    2,176
    REF should simulate all HAL stuff it is just dramatically slower. If it doesnt work in ref then it will probably return a number but carry on anyway. DirectX tends to skip any failed things without returning an error message

    Failing that TRY IT
    If you dribble then you are as mad as me

    Lost World Creations Website (XBOX Indie games)
    Lene Marlin

  3. #3

    Thread Starter
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190
    Hehe.....I have never used the return values of DX....are you sure it doesn't return an error. At least my books are telling me every function has the possebility to return errors. I just never catch them...

  4. #4
    KING BODWAD XXI BodwadUK's Avatar
    Join Date
    Aug 2002
    Location
    Nottingham
    Posts
    2,176
    When DX fails it returns a long (Or at least in my experiance) DX is made to function in REF and HAL at the same level. AKA if it is setup correctly it will work.

    My code is so naff i have to trap the errors!!!!
    If you dribble then you are as mad as me

    Lost World Creations Website (XBOX Indie games)
    Lene Marlin

  5. #5

    Thread Starter
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190
    OK...thanks for the tip...I will try it out and camme back later to the topic if encounter any problems...

  6. #6
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    I think REF is by default disabled, so as to rather fail than to make a slug app.
    The idea behind REF is that you can use it to try out something without hardware support, not to actually use it. DX8 allows you to provide a software implementation of a feature yourself. Since you can be sloppy there it will be much faster than REF, which is tailored to accuracy instead of speed.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  7. #7

    Thread Starter
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190
    So no games are actually using REF to make more PCs compatible with the game at all. So the developers thinks that if the user doesn't have a graphics card that can handle the game they won't supprt it at all in the release version? Is that what you are trying to say?

  8. #8
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    No. Games usually check in advance if the feature they want is supported. If not, they just don't use it. This results in worse graphics, but at least the game is playable.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  9. #9

    Thread Starter
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190
    So they use REF so most users can use the game. So I should make functions in the game for users that don't have the graphics card that I wan't them to use.

  10. #10
    KING BODWAD XXI BodwadUK's Avatar
    Join Date
    Aug 2002
    Location
    Nottingham
    Posts
    2,176
    I have seen many games that allow the use of REF

    Its best to force HAL unless you cant or make options for the user to change advanced settings.

    What game you working on anyway??
    If you dribble then you are as mad as me

    Lost World Creations Website (XBOX Indie games)
    Lene Marlin

  11. #11
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    Originally posted by NoteMe
    So they use REF so most users can use the game. So I should make functions in the game for users that don't have the graphics card that I wan't them to use.
    No, actually they degrade their graphics I think. That's what the D3DX Effects files are for.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  12. #12

    Thread Starter
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190
    But lots of the normal functions like making a surface or a texture are also made for HAL and REF, not only the special effects. They can't leave those out in the game. So to make a game be able to play for everyone with those functions they have to be made both by REF and HAL....(I must admitt that I hate this)...

  13. #13
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    But those functions are usually supported on every computer that runs current games, so there's no need for the REF there.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  14. #14

    Thread Starter
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190
    OK....I think that we will make the game only using HAL, it is only the first game we are making togheter so we are not going to make any fancy **** out of it anyway. And we have 10-15 persons that are willing to test it on medium to good computers. So if we get any response that some of the functions we are using is not working on the alpha version we will implement it before the "release" version.

    Thanks for all your time and answers.

    ØØ

  15. #15

    Thread Starter
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190
    For DX7 (DDraw surfaces):
    VB Code:
    1. 'Settin up the surface
    2. Dim sFly1r1 As DirectDrawSurface7
    3. Dim sdFly1r1 As DDSURFACEDESC2
    4.  
    5. 'load the bitmap into the surface
    6. sdFly1r1.lFlags = DDSD_CAPS
    7.     sdFly1r1.ddsCaps.lCaps = DDSCAPS_OFFSCREENPLAIN
    8.     Set sFly1r1 = DD.CreateSurfaceFromFile("name.bmp", sdFly1r1)

    VB Code:
    1. Dim key As DDCOLORKEY
    2. Dim ddpf As DDPIXELFORMAT
    3.  
    4. 'The primary surface    
    5. Primary.GetPixelFormat ddpf
    6.  
    7. 'Geting the value og Magent
    8. key.low = ddpf.lRBitMask + ddpf.lBBitMask
    9. key.high = ddpf.lRBitMask + ddpf.lBBitMask
    10.  
    11. 'Telling that the trancparent color is Magent for this surface    
    12. sFlue.SetColorKey DDCKEY_SRCBLT, key


    VB Code:
    1. 'Blting the surface
    2. Call BackBuffer.BltFast(100, 100, sFly1r1, rSprite1r1n1, DDBLTFAST_SRCCOLORKEY Or DDBLTFAST_WAIT)


    The Blt part has a couple of parameters you canchange, but leave the two last ones with the Or in between alone.


    Hope this helps...and hope it is DX7 you are using...

  16. #16
    KING BODWAD XXI BodwadUK's Avatar
    Join Date
    Aug 2002
    Location
    Nottingham
    Posts
    2,176
    If you dribble then you are as mad as me

    Lost World Creations Website (XBOX Indie games)
    Lene Marlin

  17. #17

    Thread Starter
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190
    Originally posted by BodwadUK

    [Edit**** WRONG THREAD....[/edit]

  18. #18
    KING BODWAD XXI BodwadUK's Avatar
    Join Date
    Aug 2002
    Location
    Nottingham
    Posts
    2,176


    FOOL

    If you dribble then you are as mad as me

    Lost World Creations Website (XBOX Indie games)
    Lene Marlin

  19. #19

    Thread Starter
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190
    Ohhh ****....I posted the DDraw code here too...:d...ok sorry....over and out...:

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width