I'm working on Project 4 of the Coding Academy (the 'Fish Feast' game), and I'm having a problem with SDL. It refuses to display the 'background.jpg' file in the window. In fact, every time I run the program, it simply crashes with this message:
Unhandled Exception: SdlDotNet.Core.SdlException: Couldn't open media/background.jpg
at SdlDotNet.Graphics.Surface..ctor (System.String file) [0x00000]
at fishfeast.MainClass.Main (System.String args) [0x00014] in /home/chris/Projects/fishfeast/fishfeast/Main.cs:20
I followed Paul's suggestion to copy the files to the "fishfeast/fishfeast/bin/debug" folder, but I still get the error message. I have changed the program's 'Output Path' to "fishfeast/fishfeast" as Paul instructed (and setup a 'media' file there with the 'background.jpg' and 'logo.png' files) to no avail. I have double checked the list of dependencies (on p.32 of the Coding Academy) to be sure I have them all installed, and I have even installed the dependencies listed at the "SDL.NET" site ( http://cs-sdl.sourceforge.net/index.php ... to_SDL.NET ) to make sure I have those available. I still get the error message.
One other thing I have noticed is that when I tried to add the following command:
- Code: Select all
I simply got a black window. No other colors would work.
Any advice would be greatly appreciated.