Computer Webmaster Gaming Console Graphics Forum

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.

MK PitStop Main Earn $25 Earn Money Posting Extras Members Blogs Image Hosting User Pages
Go Back   Computer Webmaster Gaming Console Graphics Forum > Computer Forums > Software Programming
Register FAQ/Rules Become A V.I.P. Member Search Today's Posts Mark Forums Read

Software Programming Software programming talk, ask questions about computer software programming or help others

Google
Closed Thread
 
LinkBack Thread Tools Display Modes
Old 06-12-2007, 9:40 PM   #1
Steven
 
Steven's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default Palette troubles.

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.
 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Advertisements
Old 06-12-2007, 9:40 PM   #2
Malcolm
 
Malcolm's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default Palette troubles.


"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.




 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Old 06-12-2007, 9:41 PM   #3
Eternal Vigilance
 
Eternal Vigilance's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default Palette troubles.

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.


 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Old 06-12-2007, 9:41 PM   #4
Mario
 
Mario's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default Palette troubles.

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.



 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Featured Websites
Free Space
Free Space
Free Space Free Space
Closed Thread
Tags: ,




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

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




All times are GMT +1. The time now is 12:32 AM.


Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.0.0
Cheap Computers
MK PitStop Copyright 2005 - 2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98