![]() |
|
Welcome to the Computer Webmaster Gaming Console Graphics Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
| |||||||
| Software Programming Software programming talk, ask questions about computer software programming or help others |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 | ||
| Hello, it's me: Steven, again. Anywho, I just encountered an issue. I don't know if it's with my code, though. The game has been running fine for the past few weeks, but all of the sudden something went screwy. I haven't been doing anything different, I just sit there and watch the sprites animate. My game is in 8-bit, paletted mode. For some reason, out of the blue, all of the colors on the screen change. It's like my palette suddenly got replaced, but I don't see how that can happen. I only even deal with my palette interface once, and that's at before the game even starts; The main game loop never even touches the palette. The game will run fine for a minute or so, but then, blow! Colors go screwey. It only happens if I run my game after I run a LaMothe demo. I don't know if this has anything to do with it, but this is the only time I've encountered this problem. Anybody have any ideas what could be wrong? Thanks a lot. You're all very nice people. | |||
| Advertisements |
| | #2 | ||
| "Steven" <windecks@hotmail.com> wrote in message > > Anywho, I just encountered an issue. I don't know if it's with my > code, though. The game has been running fine for the past few weeks, > but all of the sudden something went screwy. I haven't been doing > anything different, I just sit there and watch the sprites animate. > It could be that you're corrupting the area of memory occupied by the palette. It could be that you're somehow telling the system to use a different palette. We can't debug over Usenet. For a difficult bug, the strategy you should use is this. 1) Comment out huge chunks of your code you that you've got effectively a "hello world" app that also uses a palette (correctly). 2) Comment in the rest of the code. Now the error should reappear. 3) Comment out the code again and comment in a few blocks you think should be OK. Keep on doing this until the error reappears. 4) Try to isolate the error to as small an area of code as you can. The bug should then be obvious. | |||
| | #3 | ||
| Any new programs installed recently, run any unsafe EXEs that might have installed some spyware?? Running anything in the background that might be doing some tricks?? Its possible that a previous program is setting DirectX/Display mode/attributes that your program doesn't do a complete initialization of all the modes YOU use. Look at LaMothe or samples on the DirectX sdk (or OpenGL ???) to see what initializations they do . Steven wrote: > Hello, it's me: Steven, again. > > Anywho, I just encountered an issue. I don't know if it's with my > code, though. The game has been running fine for the past few weeks, > but all of the sudden something went screwy. I haven't been doing > anything different, I just sit there and watch the sprites animate. > > My game is in 8-bit, paletted mode. For some reason, out of the blue, > all of the colors on the screen change. It's like my palette suddenly > got replaced, but I don't see how that can happen. I only even deal > with my palette interface once, and that's at before the game even > starts; The main game loop never even touches the palette. The game > will run fine for a minute or so, but then, blow! Colors go screwey. > It only happens if I run my game after I run a LaMothe demo. I don't > know if this has anything to do with it, but this is the only time > I've encountered this problem. > > Anybody have any ideas what could be wrong? > > Thanks a lot. You're all very nice people. | |||
| | #4 | ||
| Maybe the LaMothe demo caused a resource leak? Did you get this from his website or from one of his books? Try Malcom's debugging tip, this should help. Another alternative is to send a MessageBox(); output after initializing the palette, after initializing your DirectDraw Surface, etc. The only thing that gets me is that these problems occur during the game loop. Steven <windecks@hotmail.com> wrote in message news:ce9a7d65.0307111437.d8e1521@posting.google.co m... > Hello, it's me: Steven, again. > > Anywho, I just encountered an issue. I don't know if it's with my > code, though. The game has been running fine for the past few weeks, > but all of the sudden something went screwy. I haven't been doing > anything different, I just sit there and watch the sprites animate. > > My game is in 8-bit, paletted mode. For some reason, out of the blue, > all of the colors on the screen change. It's like my palette suddenly > got replaced, but I don't see how that can happen. I only even deal > with my palette interface once, and that's at before the game even > starts; The main game loop never even touches the palette. The game > will run fine for a minute or so, but then, blow! Colors go screwey. > It only happens if I run my game after I run a LaMothe demo. I don't > know if this has anything to do with it, but this is the only time > I've encountered this problem. > > Anybody have any ideas what could be wrong? > > Thanks a lot. You're all very nice people. | |||
| Featured Websites | ||||
|
![]() |
| Tags: palette, troubles |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Palette locations | Pare | Graphics in general | 2 | 06-11-2007 9:40 PM |
| Info Palette and Monitor calibration | John Tee | Graphics in general | 0 | 05-31-2007 6:41 PM |
| Corel 8 - User defined Color Palette | Ton | Graphics in general | 0 | 05-28-2007 7:54 PM |
| CD7 printing troubles | Stefano C.A. Rossi | Graphics in general | 1 | 05-28-2007 7:46 PM |
| Color palette .cpl for Windows XP icons | Gunnar Bartels | Graphics in general | 0 | 05-28-2007 7:46 PM |
| Featured Websites | ||||
|