Author Topic: Error @ game start  (Read 5210 times)

Tanja

  • Clever
  • Fanatic
  • ***
  • Posts: 606
    • View Profile
Error @ game start
« on: 2008-01-28, 10:03:58 AM »
today i tried to start my game on the computer for all the presentations tomorrow. (4 a.m. in your time)
i installed net framework 1.1, directx9.0c is already installed, its video card is a nVidia Geforce 8800 gts.

the error at the game start is attached for you to view.
i picked out all the relevant lines in the .cs files.

Frameset.cs:
public Frame this[int index]
   {
      get
      {
         return this.m_arFrames[(index % this.m_arFrames.Length)];
      }
   }


Layerbase.cs:
 for (int x = nStartCol; x <= EndCol; x++)
          {
             int[] SubFrames = GetTileFrame(x,y);
             for (int nFrame = 0; nFrame < SubFrames.Length; nFrame++)
             {
        Frame f = m_Frameset[SubFrames[nFrame]];
                spr.Transform = Matrix.Multiply(f.Transform, Matrix.Translation(
                   x * nTileWidth + CurrentPosition.X + ViewRect.X,
                   y * nTileHeight + CurrentPosition.Y + ViewRect.Y, 0));
              spr.Draw(f.GraphicSheetTexture.Texture, f.SourceRect, Vector3.Empty, Vector3.Empty, overrideModulation==-1?f.Color:overrideModulation);
             }
         }


start_map.cs:
 protected override void Draw()
   {
      this.m_Startbildschirm.InjectSprites();
      this.m_Startbildschirm.Draw();
      this.m_Startbildschirm.ClearInjections();
      this.m_Display.Sprite.Flush();
   }


mapbase.cs:

public void DrawAllViews()
   {
      switch(viewLayout)
      {
         case ViewLayout.Single:
            currentViewIndex = 0;
     Draw();

gameform.cs:
  OverlayMap.DrawAllViews();

project.cs:
  game.Run();

durnurd

  • Lead Lemming
  • Expert
  • Fanatic
  • *****
  • Posts: 1234
  • Games completed so far: 0
    • MSN Messenger - durnurd@hotmail.com
    • View Profile
    • Find My Ed
Re: Error @ game start
« Reply #1 on: 2008-01-28, 12:46:22 PM »
Are you absolutely certain that this file is the exact same as the file you had on your other system?  Just make sure it works on your computer again, copy it again, and then see if it works on the new system.

You can use WinDiff to look at the differences between whole folders, which you may want to do in this case.  Look at the difference between the output folder on your system and the new system and see if there are any differences in any of the .cs files.

Unfortunately, this problem is hard to debug in the SGDK2 IDE because Frameset.cs isn't in the source code folder.  Find somewhere to post the SGDK2 file if nothing else.  I can't imagine it's a problem with the hardware or .Net framework... unless it's a very strange bug.
Edward Dassmesser

Tanja

  • Clever
  • Fanatic
  • ***
  • Posts: 606
    • View Profile
Re: Error @ game start
« Reply #2 on: 2008-01-28, 02:01:16 PM »
seems to be some hardware or driver conflict. i tested two more computers. the one with a nvidia geforce fx 5900 runs the game well. it is indeed so, that coincidentally my private computer and my computer at the university happen to have the same video card, namely the above mentionend.

the other computer has a nvidia geforce 5900 XT. here comes another strange error: the monitor turns black and a window reads: invalid/illegal/improper frequency. (it reads only one of the first words, but i didn't know what was the most adequate in this case.) the next line reads: 165.9 kH, 239 Hz, NP
i don't know what's the meaning of all that, but i changed the frequency of the monitor to some normal values (60,75,70,85 H), but nothing helped.
at the first time i tried to run the game, after a short while this error message came:

Fatal Error
System.NullReferenceException

at Frameset.get_Item (Int32 index)
at LayerBase.Draw()
at Start_Map.Draw()
at MapBase.DrawAllViews()
at GameForm.Run()
at Project.Main

i guess it tells the same like the other error message above... only in another way.

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: Error @ game start
« Reply #3 on: 2008-01-28, 04:41:27 PM »
Are you trying to run it full screen?  I suggest trying to run it in a window if it's having frequency problems.

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: Error @ game start
« Reply #4 on: 2008-01-30, 06:15:04 AM »
Were you able to do your presentation?

Tanja

  • Clever
  • Fanatic
  • ***
  • Posts: 606
    • View Profile
Re: Error @ game start
« Reply #5 on: 2008-01-30, 02:25:12 PM »
yeah, i started it from my own computer. there was a silly moment when i startd it and no sound came, but this was because someone had changed the settings at the hi-fi equipment for the former presention. i can't really say how it was for the other people, normally i am very excited and just say the text and run through the game/project. i forgot to mention a few things, and run really fast through the game....

but since i did it with a program noone knew, i opend the game in the IDE and showed how one can use tilesets and program with rules. this was quite interesting for the others. my professors asked two silly questions, the first one asked if i could go into the background layers, and the second asked what my background music (from the kirby games) had to do with zeppelins....  :ugly:

it's really interesting that from 6 computers where i tested the games, only the three with a geforce 5900 were able to run it. i wanted to buy a new graphic card, but only when i am sure my games will run with it... silly situation. tomorrow i will test in the public computer pools.

i have choosen "Mistraal" to be the name of the game. i like it best, and for that name there are maybe three sites on google. maybe i will split it into two games. i changed the concept from dropping mail bags to dropping seed in a barren world of rocks, where are only a few sources of water. maybe it will be a game where you can play "7 days of genesis" or something, bringing vegetable and animal life to the world. and the player is some mysterious, sparkling god. maybe i go deeper in some exotic creation myths to use it and adapt the graphics (the aztec style is cool).
and for that museum in friedrichshafen, i would like to make the game like it was concepted before, with dangerous rain clouds wetting the ship and when there is the snow storm it will freeze partially. and you will have only a limited time before you come down and explode.

i hope the best to have the motivation to do this.
(p.s. the last two days i slept only 6 hours in total ^^)

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: Error @ game start
« Reply #6 on: 2008-01-30, 06:41:25 PM »
It's odd that you got errors on the other systems.  It doesn't seem like a hardware failure due to inadequate hardware.  It seems like maybe just a bad driver or software setup.  Did you try compiling the game on that machine, or just copying the files?  Does the SGDK2 IDE run on the other machines?  Did you try it in windowed mode?  I wonder if the sample game works.  The first error you got seems to have nothing to do with hardware/drivers, but just that maybe your project file got corrupted while transferring it (?)