Hey, we have forums!

Author Topic: What are the expected system requirements?  (Read 68916 times)

0 Members and 2 Guests are viewing this topic.

Offline Alec

  • Administrator
  • Dream Bit
  • **********
  • Posts: 2211
    • View Profile
Re: What are the expected system requirements?
« Reply #30 on: May 30, 2007, 10:52:09 pm »
I was looking at a tutorial about that, and it seems like it could work... if you knew the name of the dll.

But it seems like with each version of DirectX 9 they release a differently named XInput.

For example the current one I have is XInput1_3.dll.

In my system32 folder I have all of:

xinput1_1.dll
xinput1_2.dll
xinput9_1_0.dll

I guess we could package one dll with the game and only try to load that, but that seems like a bad idea since people wouldn't be able to update to the latest dll.

Any ideas? :)

Offline Zam

  • Extra Bit
  • *****
  • Posts: 163
  • ph33r
    • View Profile
Re: What are the expected system requirements?
« Reply #31 on: May 30, 2007, 10:56:21 pm »
Uh, the simple fix seems to make a folder for dll's and have them just stick the newest  version in there when they need to.

Offline Alec

  • Administrator
  • Dream Bit
  • **********
  • Posts: 2211
    • View Profile
Re: What are the expected system requirements?
« Reply #32 on: May 30, 2007, 10:58:59 pm »
Forcing the user to rename a dll and put it in the game directory seems like asking too much.

It would be best if there was a way to detect the latest xinput dll somehow.

Offline Zam

  • Extra Bit
  • *****
  • Posts: 163
  • ph33r
    • View Profile
Re: What are the expected system requirements?
« Reply #33 on: May 30, 2007, 11:49:03 pm »
A update button, that asks some server if it has the latest version?

Offline Alec

  • Administrator
  • Dream Bit
  • **********
  • Posts: 2211
    • View Profile
Re: What are the expected system requirements?
« Reply #34 on: May 31, 2007, 12:02:26 am »
Not sure if you get what we're talking about. :)

People can just install directx to get the latest xinput dll.

The problem is, we want to use unsual code to use the xinput stuff, so that we don't have to rely on having it - so that people with windows 98 can play the game.

But to do that we need to find out the name of the latest xinput dll installed on the user's computer, because the different versions have different names. And when you're loading dlls "dynamically" like this, you need to tell it the specific name of the dll.

Offline nestor

  • Bit
  • ***
  • Posts: 23
    • View Profile
Re: What are the expected system requirements?
« Reply #35 on: May 31, 2007, 12:37:39 am »
some code to get the version of the OS:

Code: [Select]

    OSVERSIONINFO osversion;

    // get OS version
    osversion.dwOSVersionInfoSize = sizeof( osversion );

if (!GetVersionEx (&osversion))
error ("Couldn't get OS info");


then check here: http://msdn2.microsoft.com/en-us/library/ms724834.aspx for what the version numbers are.


Offline Alec

  • Administrator
  • Dream Bit
  • **********
  • Posts: 2211
    • View Profile
Re: What are the expected system requirements?
« Reply #36 on: May 31, 2007, 12:40:48 am »
The doesn't address the dynamic dll loading problem.

Don't need to know the version of the OS, only what the name of the proper xinput*.dll to load is. If the dll can't be found or fails to load, you assume you're on 98 or you don't have directx 9 installed.

The problem is finding the name of the newest xinput dll so a load can be attempted.

One way would be to scan windows/system32 for xinput*.dll filenames, then comparing time stamps. But that seems messy and prone to error.

Offline nestor

  • Bit
  • ***
  • Posts: 23
    • View Profile
Re: What are the expected system requirements?
« Reply #37 on: May 31, 2007, 12:45:49 am »
I guess we could package one dll with the game

.. hrm, better read the Microsoft SDK documentation about "redistributables".  They supply some DLLs that are intended to be distributable under some sort of license.  but some aren't.  I don't know enough about DirectX at this point to know why they keep changing the xinput dlls.   They must've figured out a way for you to code around it.  perhaps its just

Code: [Select]
HINSTANCE hInst;
hInst = LoadLibrary("xinput1_3.dll");
if ( !hInst )
    hInst = LoadLibrary("xinput1_2.dll");
if ( !hInst )
    hInst = LoadLibrary("xinput1_1.dll");
if ( !hInst )
/* no  controller available */

Offline Alec

  • Administrator
  • Dream Bit
  • **********
  • Posts: 2211
    • View Profile
Re: What are the expected system requirements?
« Reply #38 on: May 31, 2007, 12:55:19 am »
Yeah, that'd work for older versions, but not for newer ones. :)

Its frustrating for sure!

Maybe there's a way to check the version using DX Caps?

Offline Alec

  • Administrator
  • Dream Bit
  • **********
  • Posts: 2211
    • View Profile

Offline Zam

  • Extra Bit
  • *****
  • Posts: 163
  • ph33r
    • View Profile
Re: What are the expected system requirements?
« Reply #40 on: May 31, 2007, 01:05:56 am »
Not sure if you get what we're talking about. :)

But to do that we need to find out the name of the latest xinput dll installed on the user's computer, because the different versions have different names. And when you're loading dlls "dynamically" like this, you need to tell it the specific name of the dll.

Ah, I see.

...
...
...

Well, that's annoying.

Offline nestor

  • Bit
  • ***
  • Posts: 23
    • View Profile
Re: What are the expected system requirements?
« Reply #41 on: May 31, 2007, 01:31:29 am »
Yeah, that'd work for older versions, but not for newer ones. :)

Yeah, you know, the more I think about it, .. I realize what other games do.  They:
1 - Require that you have DirectX9.0c or greater  ( because there are things in there that the game absolutely relies upon and would be an unnecessary pain to code around )
2 - They supply the directX 9.0c installer if you dont already have it.
3 - They release 1.x patches which might take advantage of newer versions of stuff, while fixing bugs. 

[rant]
Windows should basically take care of you for backwards compatibility and that's the most that you need to worry about when releasing software as a commodity.  You can't really see into the future.  For mouse code, DirectInput Version 8 is still the newest one.    Imagine, at some point ten years down the road we'll all be using... Linux? ;-p , and people will say, "Man, I want to play Aquaria again.", and there will be a web effort to make it work on whatever the new stuff is.   It doesn't need to support the newer dll, just support whichever xinput is supplied by directX9 now  and that's it.  Those standards wont go away for pretty much ever I think.   
[/rant]

Offline Alec

  • Administrator
  • Dream Bit
  • **********
  • Posts: 2211
    • View Profile
Re: What are the expected system requirements?
« Reply #42 on: May 31, 2007, 01:35:27 am »
Yeah... I'm beginning to wonder if the newer installers will include all the older dlls in them. That might make sense.

In that case I could just look for xinput1_3.dll....

As long as we can support both XBox360 contollers on XP and still run on 98/2000 for the near future I'd be happy.

Offline nestor

  • Bit
  • ***
  • Posts: 23
    • View Profile
Re: What are the expected system requirements?
« Reply #43 on: May 31, 2007, 01:57:10 am »
Yeah... I'm beginning to wonder if the newer installers will include all the older dlls in them. That might make sense.

In that case I could just look for xinput1_3.dll....

As long as we can support both XBox360 contollers on XP and still run on 98/2000 for the near future I'd be happy.

plus, the APIs might change between those different xinput*.dll .  I hadn't thought of that before.  so supporting multiple could blow-up out of control fairly quickly. 

for 98 compatibility:  I don't know how your input code is setup, but just make the 360 controller routines separate from the mouse and keyboard, and if the dll doesn't load, then the controller doesn't work  and that's that.   separated code won't effect how everything else is setup.  I would wrap the conditional input with a global state variable, like:
Code: [Select]
if  _xbox_360_controller_loads_
bool xboxControllerFound = true;

... later on

input() {
if (xboxControllerFound) {
// get input
}
getkeys();
getmice();
}

people are gonna be so stoked about this game that nobody will even notice if it crashes a 98 box.  Hell, that might mean it has good taste.

Offline Alec

  • Administrator
  • Dream Bit
  • **********
  • Posts: 2211
    • View Profile
Re: What are the expected system requirements?
« Reply #44 on: May 31, 2007, 02:02:45 am »
Yeah you're right, the joystick code is already separate.

I just set it up with delayed dll loading and it works! Uninstalled all the dlls, it failed to load 1_3, disabled the controller input and kept on running. Reinstalled dlls, and it picked up the input again! So now '98 should be possible.

I'll try to test on a virtual machine at some point.

Its more for people who use 2000 though, because to get xinput support you need to install like 4 service packs. O.o

Yeah, so I guess people who want X360 controller support can just make sure they have xinput1_3.

WOOOOOOOOOOOOOOOOOT