Background Graphics
Moderator: Zyx
Forum rules
Please read the Forum rules and policies before posting.
Please read the Forum rules and policies before posting.
- Charlatan75
- Apprentice
- Posts: 59
- Joined: Mon Nov 10, 2003 2:32 pm
Hmmm... Argh! It seems that you're right... but I don't understand why the link does not work.
I zipped the picture and uploaded it again here :
http://pageperso.aol.fr/TheCharlatan75/Lucyle/Pic.zip
Charlatan75
(Argh! I'm cursed or very tired, I inverted the notations 'D0', 'D1', 'D2', 'D3' in the picture. Now it should be ok)
I zipped the picture and uploaded it again here :
http://pageperso.aol.fr/TheCharlatan75/Lucyle/Pic.zip
Charlatan75
(Argh! I'm cursed or very tired, I inverted the notations 'D0', 'D1', 'D2', 'D3' in the picture. Now it should be ok)
- Paul Stevens
- CSBwin Guru
- Posts: 4318
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
- cowsmanaut
- Moo Master
- Posts: 4378
- Joined: Fri Jun 30, 2000 12:53 am
- Location: canada
hex31 4 bit planes 1 bit per pixel 16 colors
after some searching (to show I'm not opposed to learning new things ) the above I guess gives me my answer to my second question.
'tis a shame, still lots of cooll things that can be done with this.
Let me know if you want the walls I showed earlier in the thread to test when you get to wall skining later on
after some searching (to show I'm not opposed to learning new things ) the above I guess gives me my answer to my second question.
'tis a shame, still lots of cooll things that can be done with this.
Let me know if you want the walls I showed earlier in the thread to test when you get to wall skining later on
- Paul Stevens
- CSBwin Guru
- Posts: 4318
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
I think you numbered the cells wrong. That is cellgrass is drawn over a wall
number 4 that you drew at relative location (3r2)
Three ahead and 2 right. It should be cell number 1.
My initial diagram numbered the cells from left to
right 0,1,2,3,4 but I changed that quickly to be the
order that they are drawn 0,2,4,3,1.
In any case is was the mask for cell 4 (which should be
the central cell at (3,0) (three ahead) that is drawing
the grass on the wall at (3r2).
- Paul Stevens
- CSBwin Guru
- Posts: 4318
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
- Paul Stevens
- CSBwin Guru
- Posts: 4318
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
- Paul Stevens
- CSBwin Guru
- Posts: 4318
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
Version ...test8 has the changes for the allowed height
of the graphic. It comes with a beautiful demonstration
of a grassland.
http://dianneandpaul.net/CSBwin/BackgroundGraphics.zip
There are still a couple of glitches but they are well on
their way to being corrected.
of the graphic. It comes with a beautiful demonstration
of a grassland.
http://dianneandpaul.net/CSBwin/BackgroundGraphics.zip
There are still a couple of glitches but they are well on
their way to being corrected.
- Paul Stevens
- CSBwin Guru
- Posts: 4318
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
I am extremely pleased with the seeming success of the
Floor graphics and I hope that the Middle and Ceiling
graphics work out equally well. Do you think it is time to
attack the Wall graphics? If so........
Can they be done in exactly the same way? I number the
walls from 0 to #walls-1. After drawing each cell
I check to see if a skin is defined for that cell.
If so I find the wall graphic for that skin. I then find
the nth wall mask and if it exists I draw the graphic using
that mask.
If this seems like a sane approach then I need to know how
many wall graphics we think there are. When the original code
draws the walls it examines 12 cells ( the four rows ahead with
one cell to each side ) but of course you cannot see all sides
of all cells. A diagram (overhead map) of the walls that need
drawing and numbered in the order that they should be drawn
would be nice.
EDIT**********************
All sides of a cell must share the same skin number because
that is how 'skins' are defined: on a cell-by-cell basis. Is this
going to be a big drawback? Should the skin for a wall be
associated with the adjacent open cell rather than with the
wall cell?
Floor graphics and I hope that the Middle and Ceiling
graphics work out equally well. Do you think it is time to
attack the Wall graphics? If so........
Can they be done in exactly the same way? I number the
walls from 0 to #walls-1. After drawing each cell
I check to see if a skin is defined for that cell.
If so I find the wall graphic for that skin. I then find
the nth wall mask and if it exists I draw the graphic using
that mask.
If this seems like a sane approach then I need to know how
many wall graphics we think there are. When the original code
draws the walls it examines 12 cells ( the four rows ahead with
one cell to each side ) but of course you cannot see all sides
of all cells. A diagram (overhead map) of the walls that need
drawing and numbered in the order that they should be drawn
would be nice.
EDIT**********************
All sides of a cell must share the same skin number because
that is how 'skins' are defined: on a cell-by-cell basis. Is this
going to be a big drawback? Should the skin for a wall be
associated with the adjacent open cell rather than with the
wall cell?
- Charlatan75
- Apprentice
- Posts: 59
- Joined: Mon Nov 10, 2003 2:32 pm
Hello!
Hmmm... I don't understand where you think I did number the cells wrong (?)...
I saw that you numbered them 0,2,4,3,1 (and so on...), and I understood that it was just the order in which the skins of these cells were drawn in the dungeon view...
I also understood that in the "FloorMask.bin" the order was (of course?) 0,1,2,3,4 (and so on...). Just enter the first room of the test dungeon, if I inverted cell 1 with cell 2, or cell 2 with cell 4... you will see that immediately (no?). ^^
Well... I admit that I'm now totally lost... (Argh! Help!)
Charlatan75
Hmmm... I don't understand where you think I did number the cells wrong (?)...
I saw that you numbered them 0,2,4,3,1 (and so on...), and I understood that it was just the order in which the skins of these cells were drawn in the dungeon view...
I also understood that in the "FloorMask.bin" the order was (of course?) 0,1,2,3,4 (and so on...). Just enter the first room of the test dungeon, if I inverted cell 1 with cell 2, or cell 2 with cell 4... you will see that immediately (no?). ^^
Well... I admit that I'm now totally lost... (Argh! Help!)
Charlatan75
- Paul Stevens
- CSBwin Guru
- Posts: 4318
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
OK. We are so very close to getting this exactly
right. Let me tell you what I see in the CSBgraphics.dat.
It could very well be me, CSBgraphics.exe, CSBwin, or
you that has made the mistake. Start from scratch------
Three graphics:
1 - skins
2 - FloorMask
10 - floor10
I exported #2 (FloorMask) and look at it with
hex editor. I see that there are 16 masks in the
following order:
The destinationY is the same for all. That makes sense
because they all start at the horizon. The destinationX is
what interests me. The one farthest to the right (at 192) is
the one for cell #4. But cell number 4 is the middle cell.
Why are you drawing cell #4 far to the right of cell #2????
The order is 0, 2, 4, 3, 1. You can see that cell # 4 should
be to the right of cells #0 and #2 and to the left of cells #1
and #3. Your masks place #4 at the far right at x=192.
Your masks place cell #2 in the middle at x = 64.
That is why I thought you had numbered them 0, 1, 2, 3, 4.
EDIT *********
But your argument makes perfect sense, too. So I think there
are two errors. Yours and CSBwin.
right. Let me tell you what I see in the CSBgraphics.dat.
It could very well be me, CSBgraphics.exe, CSBwin, or
you that has made the mistake. Start from scratch------
Three graphics:
1 - skins
2 - FloorMask
10 - floor10
I exported #2 (FloorMask) and look at it with
hex editor. I see that there are 16 masks in the
following order:
Code: Select all
# offset destinationX destinationY width height
0 64 0 66 32 10
1 132 0 66 96 10
2 288 64 66 96 10
3 444 128 66 96 10
4 600 192 66 32 10
etc....not interesting
because they all start at the horizon. The destinationX is
what interests me. The one farthest to the right (at 192) is
the one for cell #4. But cell number 4 is the middle cell.
Why are you drawing cell #4 far to the right of cell #2????
The order is 0, 2, 4, 3, 1. You can see that cell # 4 should
be to the right of cells #0 and #2 and to the left of cells #1
and #3. Your masks place #4 at the far right at x=192.
Your masks place cell #2 in the middle at x = 64.
That is why I thought you had numbered them 0, 1, 2, 3, 4.
EDIT *********
But your argument makes perfect sense, too. So I think there
are two errors. Yours and CSBwin.
- Paul Stevens
- CSBwin Guru
- Posts: 4318
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
- Charlatan75
- Apprentice
- Posts: 59
- Joined: Mon Nov 10, 2003 2:32 pm
- Paul Stevens
- CSBwin Guru
- Posts: 4318
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
- Charlatan75
- Apprentice
- Posts: 59
- Joined: Mon Nov 10, 2003 2:32 pm
- cowsmanaut
- Moo Master
- Posts: 4378
- Joined: Fri Jun 30, 2000 12:53 am
- Location: canada
http://dmweb.free.fr/Stuff/files/walls2.zip
that's them uncut but masked and in the correct palette. I'm unsure how you plan on zoning this stuff for the walls. But here it is ready to be chopped up.
moo
that's them uncut but masked and in the correct palette. I'm unsure how you plan on zoning this stuff for the walls. But here it is ready to be chopped up.
moo
- Paul Stevens
- CSBwin Guru
- Posts: 4318
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
If the 'you' was meant to mean Paul Stevens thenhow you plan
you got the wrong man. I don't plan any of this.
But I assume that whoever does the work will do
it by putting all 5 of your graphics, along with their
reflections for a total of 10 graphics, into a single
4-color-plane bitmap. Then they will construct as many
masks as are needed to display these walls in the
proper positions within the viewport.
Before I can do MY work, I still need to know how
many such masks will be needed along with a diagram
(an overhead map) of where they are to be placed and
the order in which they should be drawn. Like this
Code: Select all
-------------------
| 1 | 2 | 3 |
| | | |
|4 |5 |6 |7
| | | |
-------------------
8 | 9 | 10
| |
|11 |12
| |
-------
| 13 |
| |
|14 |15
| P |
------
- cowsmanaut
- Moo Master
- Posts: 4378
- Joined: Fri Jun 30, 2000 12:53 am
- Location: canada
ok you have seperate mask images?
if someone wants to give me a basic idea of how these should be chopped I don't mind doing the work. I mean replacing the orriginal walls were time consuming but I had a template to go by there at least.. which was the original extracted images. For this I have now basis for reference.
your above map is missing two patches for the wal 13.. you can still see sections of wall (the very edges anyway) to either side of it.
should probably be more like that I'm guessing.
if I'm reading that right anyway.. I mean if you can see 14 and 15 in your map what happens when you take those away..
so, what I'm not clear on with this whole wall thing.. is it to be cut up based on where the walls sit I guess? used to have a screen zone coords for the whole thing somewhere.. Showing where each wall stopped and started.. damned if I can find it now. but I guess I could redo that if there is need?
moo
if someone wants to give me a basic idea of how these should be chopped I don't mind doing the work. I mean replacing the orriginal walls were time consuming but I had a template to go by there at least.. which was the original extracted images. For this I have now basis for reference.
your above map is missing two patches for the wal 13.. you can still see sections of wall (the very edges anyway) to either side of it.
Code: Select all
-------------------
| 1 | 2 | 3 |
| | | |
|4 |5 |6 |7
| | | |
-------------------
8 | 9 | 10
| |
|11 |12
| |
--------------
13 | 14 | 15
| |
|16 |17
| P |
------
if I'm reading that right anyway.. I mean if you can see 14 and 15 in your map what happens when you take those away..
so, what I'm not clear on with this whole wall thing.. is it to be cut up based on where the walls sit I guess? used to have a screen zone coords for the whole thing somewhere.. Showing where each wall stopped and started.. damned if I can find it now. but I guess I could redo that if there is need?
moo
- Paul Stevens
- CSBwin Guru
- Posts: 4318
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
Hmmm.... I thought that you (or someone) said once
upon a time that you could also see a bit of wall to the
left of (1) and to the right of (3).
of what is needed.
We sort of decided that (Toni was the only person who
commented so 'we' means he and I) we would provide
two skins for the backgrounds if we wanted a 'moving'
effect when the party moved or turned. The current
way of doing this is to 'reflect' the background if the
sum of the x, y, and facing is and odd number. I do not
plan to do this 'reflection'. That is why two skins are
necessary. If the skin number is 128 or greater then
the program will display the specified skin for the odd case
and the next higher skin for the even case. So you may
want to create a different skin or simply reflect the one
you have.
may help:
It is quite arbitrary. Your graphic needs to contain all the
needed pieces. But they do not have to be in any particular
arrangement because the mask for each individual piece
describes exactly which pixels from the source graphic
are to be copied to the viewport and exactly where in the
viewport they are to be placed. They one big constraint is
that the source MUST have the same left-right alignment
relative to 4-byte boundaries. The CSBwin code will do no
shifting to align the pixels. All x-offsets and widths are in
units of 4 bytes (for efficiency at runtime).
upon a time that you could also see a bit of wall to the
left of (1) and to the right of (3).
I will wait a bit until someone can be a bit more sureprobably be more like that I'm guessing
of what is needed.
We sort of decided that (Toni was the only person who
commented so 'we' means he and I) we would provide
two skins for the backgrounds if we wanted a 'moving'
effect when the party moved or turned. The current
way of doing this is to 'reflect' the background if the
sum of the x, y, and facing is and odd number. I do not
plan to do this 'reflection'. That is why two skins are
necessary. If the skin number is 128 or greater then
the program will display the specified skin for the odd case
and the next higher skin for the even case. So you may
want to create a different skin or simply reflect the one
you have.
I do not understand the question exactly. But I think thisis it to be cut up based on where the walls sit
may help:
It is quite arbitrary. Your graphic needs to contain all the
needed pieces. But they do not have to be in any particular
arrangement because the mask for each individual piece
describes exactly which pixels from the source graphic
are to be copied to the viewport and exactly where in the
viewport they are to be placed. They one big constraint is
that the source MUST have the same left-right alignment
relative to 4-byte boundaries. The CSBwin code will do no
shifting to align the pixels. All x-offsets and widths are in
units of 4 bytes (for efficiency at runtime).
- Paul Stevens
- CSBwin Guru
- Posts: 4318
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
Any size except the width must be a multiple of 16 pixels.
I said before that it must be on 32-bit boundaries but I was
wrong. I see that the code expects 16-pixel boundaries which
is 64-bit boundaries. It would not make much sense to change
half the bits in a pixel. The source bitmap might be made a
bit smaller if I allowed 32-bit boundaries (You could pack things
together more tightly) but it would be
pretty negligble.
I said before that it must be on 32-bit boundaries but I was
wrong. I see that the code expects 16-pixel boundaries which
is 64-bit boundaries. It would not make much sense to change
half the bits in a pixel. The source bitmap might be made a
bit smaller if I allowed 32-bit boundaries (You could pack things
together more tightly) but it would be
pretty negligble.
- cowsmanaut
- Moo Master
- Posts: 4378
- Joined: Fri Jun 30, 2000 12:53 am
- Location: canada
- Charlatan75
- Apprentice
- Posts: 59
- Joined: Mon Nov 10, 2003 2:32 pm
Hello!
Ok, I corrected my mistake and created a new FloorMask.bin file. ^^
It seems that the skin is not displayed in two cases : when the player is standing on it, and when it is two steps in front of him.
I did put all the test files in a zip but it seems that I can't upload anything for now where I usually do. Can I send the zip to you directly?
Charlatan75
Ok, I corrected my mistake and created a new FloorMask.bin file. ^^
It seems that the skin is not displayed in two cases : when the player is standing on it, and when it is two steps in front of him.
I did put all the test files in a zip but it seems that I can't upload anything for now where I usually do. Can I send the zip to you directly?
Charlatan75
- Paul Stevens
- CSBwin Guru
- Posts: 4318
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
- Paul Stevens
- CSBwin Guru
- Posts: 4318
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
- Paul Stevens
- CSBwin Guru
- Posts: 4318
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
- cowsmanaut
- Moo Master
- Posts: 4378
- Joined: Fri Jun 30, 2000 12:53 am
- Location: canada
wow walls must be rather difficult not that I think about it.. because which ones overlap what?
I can see instances where you would need them one way and for others it would change. What a pain.. hmmm
indeed though the most common I suppose would be back to front
purples, furthest cyan, greens, next cyan, blues, next cyan, reds and final cyan.
moo
I can see instances where you would need them one way and for others it would change. What a pain.. hmmm
indeed though the most common I suppose would be back to front
purples, furthest cyan, greens, next cyan, blues, next cyan, reds and final cyan.
moo
Suppose we have the following configurations:
1)
. _
/ . \
2)
. _
/
3)
/ . \
If we want to allow irregular edges for walls (instead of cut off edges), we only can have it:
- wether for the front views of walls if they're displayed before the side views.
Case 2 would have frontal irregular edges, case 1 would have them hidden.
- wether for the side views of walls if they're displayed before the front views.
Case 3 would have lateral irregular edges, case 1 would have them hidden.
So I think a choice is to be made here.
1)
. _
/ . \
2)
. _
/
3)
/ . \
If we want to allow irregular edges for walls (instead of cut off edges), we only can have it:
- wether for the front views of walls if they're displayed before the side views.
Case 2 would have frontal irregular edges, case 1 would have them hidden.
- wether for the side views of walls if they're displayed before the front views.
Case 3 would have lateral irregular edges, case 1 would have them hidden.
So I think a choice is to be made here.
- Paul Stevens
- CSBwin Guru
- Posts: 4318
- Joined: Sun Apr 08, 2001 6:00 pm
- Location: Madison, Wisconsin, USA
If necessary I am willing to use different masks for the
different cases. Each wall could have four masks, selected
depending on what is at the two ends of the wall.
You would need to supply a table (in the wall map graphic
probably) that has 19 entries ( if that is how many walls
segment exist). Each entry says which wall segment is
to be examined to the left and right to determine the mask
to use.
Would that be sufficient?
The wall directly in front of the party would depend
on the presence or absence of the walls directly left and
right of the party, for example.
Alternative: Draw each wall in two parts so that only two
masks are needed for each of the 38(?) pieces.
Alternative: Supply "edge" graphics to be applyed after the
walls have been drawn and depending on the configuration of
the walls at each of the possible corners. How many
configurations would we have to have? At least three it seems.
1) both straight edge. 2) left wall irregular. 3) right wall irregular.
Do we have to worry about these things at all possible corners
or only the ones that are close to the party?
different cases. Each wall could have four masks, selected
depending on what is at the two ends of the wall.
You would need to supply a table (in the wall map graphic
probably) that has 19 entries ( if that is how many walls
segment exist). Each entry says which wall segment is
to be examined to the left and right to determine the mask
to use.
Would that be sufficient?
The wall directly in front of the party would depend
on the presence or absence of the walls directly left and
right of the party, for example.
Alternative: Draw each wall in two parts so that only two
masks are needed for each of the 38(?) pieces.
Alternative: Supply "edge" graphics to be applyed after the
walls have been drawn and depending on the configuration of
the walls at each of the possible corners. How many
configurations would we have to have? At least three it seems.
1) both straight edge. 2) left wall irregular. 3) right wall irregular.
Do we have to worry about these things at all possible corners
or only the ones that are close to the party?