Hello, Ladies and Guys from SFML
I'm working on a Sonic the hedgehog game, cos I'm a fan of it, and Mario, since I was a child
By now, it works fine, has 4 Zones, 2 Acts each one, and has an interesting memory problem
Here's the link to download my poor Sonic (exe, dlls, and data files, in a .rar)
https://www.dropbox.com/s/9ikj1kbm53oqpp3/Sonic%20the%20Hedgehog%20by%20Pablito.rarMy system is Windows 7 Ultimate, 32 bit, and the program is written in C#
I would need to know these:
* Should I post a link to the source code? (I would have no problem)
* There's a problem in the app, it throws an Exception of the OutOfMemoryException class, when loading Zone3Act1; Is it allowded to ask help about that here? If it's not, please tell me where it is (I already asked in the Help->General, and nobody knew how to solve my bug); if it is, then I explain it below;
On each game level, the program calls the LoadZone?Act?() method, which loads 2 Images (.jpg that are there in the LEVELS subfolder), the level's foreground and background ... in some levels, by now the background is null ... the Images are local variables, that are passed to 2 Sprites[,] splitted into 1000x1000 Textures
First I built the Images in runtime, and saved them to files (Image.SaveToFile()) ... when the app runs with the 1st option, it works fine (excepting for a casual SEHException - that I don't know what it means), ... but when it loads the Images directly from the .jpg files, it throws a disgusting OutOfMemoryException when attempting to load Zone3Act1.jpg ... I don't know how much RAM my program needs, but my system has 2 GB, ... then I ran the game, starting on Zone3Act1, and it ran up to 4-1, where occured the same problem
I tried Image.Dispose(), Texture.Dispose(), etc, etc ..., reallocating the objects with "new" ...
Perhaps if you see the code, someone will find the bug ... there are many files, but those where the problem could be are 3 or 4, and they aren't too long
If it isn't the correct place to talk about this, I'm sorry, and please tell me where should I do
Thanks
Pablo
(Bs As Argentina)