Author Topic: Inventory Error  (Read 4564 times)

Tanja

  • Clever
  • Fanatic
  • ***
  • Posts: 606
    • View Profile
Inventory Error
« on: 2008-01-19, 01:11:49 PM »
i wanted to create an inventory. i have all done like in the tuts several times said, but a mean error occures when compiling.


Tanja

  • Clever
  • Fanatic
  • ***
  • Posts: 606
    • View Profile
Re: Inventory Error
« Reply #1 on: 2008-01-19, 03:03:33 PM »
must have to do with overlay maps. i started now making a title screen and there it comes again. maybe it clashes with my other overlay map, the snow storm. but the snow storm event is scripted, and the error occurs when trying to start the game.

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: Inventory Error
« Reply #2 on: 2008-01-19, 07:53:56 PM »
It looks like that is an error from trying to run the game, not compile it; the title bar says "meins18.exe", so that program must be running and causing the error.  But the error message is not helpful -- it's just having problems starting the debugger, so it doesn't even say what the real problem is.  Maybe you'll have to install Visual C# Express 2008 and try loading the generated .VCPROJ file into that (and run it from there) to see exactly what the error is.

Tanja

  • Clever
  • Fanatic
  • ***
  • Posts: 606
    • View Profile
Re: Inventory Error
« Reply #3 on: 2008-01-20, 03:54:50 AM »
seems somewhat is missing. but since the debugging window has soooo many lines, may you please look into it? it is way to big for a screenshot.

maybe this is the problem:

Inner Exception:
    Inner Exception:
    Message:

{"Could not find any resources appropriate for the specified culture or the neutral culture.  Make sure \"Project.resources\" was correctly embedded or linked into assembly \"meins18\" at compile time, or that all the satellite assemblies required are loadable and fully signed."}
   Source: "mscorlib"
   StackTrace:
"at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents)\r\n   at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents)\r\n   at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents)\r\n   at System.Resources.ResourceManager.GetString(String name, CultureInfo culture)\r\n   at System.Resources.ResourceManager.GetString(String name)\r\n   at Project..cctor() in C:\\Archiv\\Studiumsprodukte\\4_Studienjahr\\Zeppelin\\2D-Spiel\\MEIN SPIEL\\meins18\\Project.cs:line 55"


but i upload the csproj file for you to view, okay?

Tanja

  • Clever
  • Fanatic
  • ***
  • Posts: 606
    • View Profile
Re: Inventory Error
« Reply #4 on: 2008-01-20, 05:03:37 AM »
i messed around and i think, it is the creation of a new tileset with using a new grapic sheet what causes the error to occur.
maybe i have so many graphic sheets in use, that they fill my RAM completely? could this cause the game to fail?

edit:
yeah could be. i looked at my graphics and atm i try to calculate how much memory they need. (the task managers says: "memory occupancy rate: 125.000 kb" thats pretty much, hm?)
but this moots some questions. i save all my graphics at 72 dpi. when i export them from sgdk they have 96 dpi. is this the internal standard? would it not be better to handle this at 72 dpi?
the project properties are 800x600x16. this means all grapics i import will be downsized to 16bit, doesn't it? why have the exported images 32bit?
i tried to save my graphics optimized, but then the alpha channel is gone and i have only one transparency color. this will make the most graphics ugly, but maybe it's the only way...
« Last Edit: 2008-01-20, 05:45:19 AM by Morgengrauen »

Jam0864

  • Contributor
  • Fanatic
  • **
  • Posts: 744
    • MSN Messenger - marmalade0864@hotmail.com
    • View Profile
    • Jam0864's Content Dump
    • Email
Re: Inventory Error
« Reply #5 on: 2008-01-20, 08:20:35 AM »
ummm, how the hell can you fill all the RAM with graphics? :S you must have a heap of graphics.

I doubt this is the problem though, because usually when the system lacks RAM, it swaps stuff to the harddrive, which makes it slower, although then it runs at least...

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: Inventory Error
« Reply #6 on: 2008-01-20, 08:42:10 AM »
If you fill your video memory with graphics, I suppose that would be a problem, because video memory, as far as I know, cannot be swapped.  But the error message doesn't look like it's complaining about being out of memory.  It looks like it's complaining that it can't find the image it's looking for in the EXE file.  Did you give some graphic sheet a strange name?  Or did something else maybe cause the compiling of the graphic sheet images to fail?

I can't tell much just from looking at the csproj file.  That's just a list of files in your project (you can see for yourself in notepad).  But the file named Project.resources seems like it would be the source of the problem... that should get compiled into Project.resx and then linked into the EXE file, and there might be some problem there -- is that file huge (hundreds of MB)?  That file should contain all your graphic sheet images.

The images are saved by the .NET framework, so I didn't tell it what format to use, just "PNG" and the rest are defaults I guess.  DPI doesn't really matter because we're dealing with fixed numbers of pixels, not inches in SGDK2.  So the DPI setting will only determine how large to display the image in applications that measure things in inches, it doesn't affect the number of pixels in the image (as far as SGDK2 is concerned), I think.

Images are exported in 32 bits to support 8-bits for each of R, G, B and A.  I don't think anything less is advisable or necessary because PNG compresses well, and it all gets decompressed into 32 bits in video memory anyway.

Tanja

  • Clever
  • Fanatic
  • ***
  • Posts: 606
    • View Profile
Re: Inventory Error
« Reply #7 on: 2008-01-20, 08:56:08 AM »
It looks like it's complaining that it can't find the image it's looking for in the EXE file.  Did you give some graphic sheet a strange name?

no, definitlely not. i used several images, also the default sprite sheet from the sample project, always the same problem. i do not even use this tileset somewhere! when it's made, there's the problem. in my game project it is always the seventh tileset. i wanted to test that with the sample project, but there it works. i upload my game to the support site. please look at it. i have no clue what it could be.

Or did something else maybe cause the compiling of the graphic sheet images to fail?

what could that do?

But the file named Project.resources seems like it would be the source of the problem... that should get compiled into Project.resx and then linked into the EXE file, and there might be some problem there -- is that file huge (hundreds of MB)?

no, it is only 5 to 7 mb...
« Last Edit: 2008-01-20, 09:22:57 AM by Morgengrauen »

Tanja

  • Clever
  • Fanatic
  • ***
  • Posts: 606
    • View Profile
Re: Inventory Error
« Reply #8 on: 2008-01-20, 12:15:01 PM »
now i've put a tile from a already used sheet into another frameset. nothing else.
(it was the mail bag the ship is carrying, put into the tileset with all the rocks to use it for TileTake. so, both sheets were already used all the time)
the error occurs.

why?? the deadline draws near...

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: Inventory Error
« Reply #9 on: 2008-01-20, 06:24:47 PM »
I don't see any errors happening when I run the project you uploaded (meins17.sgdk2).  When does the error happen, right during startup?  Maybe you have to delete the folder where your files are being generated or something.  Maybe something in the old folder is interfering with the compile process.

Edit: I also tried adding a seventh tileset using SpriteFrames, and added a new layer to the map with this tileset.  Still no problem.

Edit2: Have you been loading the project into some version of Visual Studio, or just running it directly from SGDK2?  The project that SGDK2 generates has problems is Visual C# Express 2008 after being upgraded (a similar problem to the one you describe), but it shouldn't be a problem if you're running from the SGDK2 IDE.

Also, I noticed that the graphics that are taking so long to load during startup are "windrad gross".  The slow part is transferring all those graphics from system RAM to video RAM.  It would be much faster if you could just draw 1/4 of the graphics and rotate the rest in the frameset.  Then it would be even faster if you could also animate them using frameset manipulations. Another thing you could do to save even more time/RAM is make everything 1/2 size and use the frameset editor to scale it up, since these images are very simple, and probably don't even need to have crisp edges.  As it stands, that is such a big graphic to put in video RAM, and so much if it is unnecessary if you just use the frameset features.  That graphic sheet image is 1536x2816 pixels.  That's 4,325,376 pixels or 17,301,504 bytes that need to be transferred to video RAM.  I bet it could easily come down to about 4% of the original size (about ~ 1/2 MB) with some clever reductions as described above.
« Last Edit: 2008-01-20, 06:50:22 PM by bluemonkmn »

Tanja

  • Clever
  • Fanatic
  • ***
  • Posts: 606
    • View Profile
Re: Inventory Error
« Reply #10 on: 2008-01-21, 03:28:16 AM »
i.... do not.... believe this...
i have deleted the folders with the compiled files and now all versions which failed before run properly! ... .... ...
oh man and i was so concerned and annoyed by this fuss...

thanks for your support bluemonk! i'll try to optimize the graphics. it was a huge effort to make these. and i wanted/had to make them in photoshop to not lose track of all. the big wheels animate with three frames. the small ones with 9. the straight tiles with 6. at every tile is a index number painted to easily put together the mapped tiles.
i made it all for the first time and had a lot of trouble to get all the angles and connections right. but finally it's done.

i want to make a title screen and load all graphics in the background, so there's only a small pause at the start of the game. but sure i'll try to optimize all.

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: Inventory Error
« Reply #11 on: 2008-01-21, 06:13:01 AM »
Did you also make separate copies of the graphics for counterclockwise vs clockwise rotation?  That is also unnecessary.

Tanja

  • Clever
  • Fanatic
  • ***
  • Posts: 606
    • View Profile
Re: Inventory Error
« Reply #12 on: 2008-01-21, 07:10:56 AM »
yes.  :hurt:
ah, come on, it was my first wind system.