DieHard Wolfers Forum Index DieHard Wolfers
A Wolfenstein 3d Fan Community


  Hosted by: MCS & Areyep.com - Designed by: BrotherTank

Original Yahoo Forum - Die Hard Archives

AReyeP HomepageAreyep Homepage DieHard Wolfenstein BunkerDieHard Wolfenstein Bunker Log inLog in RegisterRegister Banlist FAQFAQ Search ForumsSearch

  Username:    Password:      Remember me       

[Code] Wall Patches
Page 1 of 2 Goto page 1, 2  Next
DieHard Wolfers Forum Index -> Code Tutorials View Previous TopicRefresh this PageAdd Topic to your Browser FavoritesSearch ForumsPrint this TopicE-mail TopicGoto Page BottomView Next Topic
Post new topicReply to topic
Author Message
Adam Biser
Utility Developer
Utility Developer


Joined: 06 Jun 2003
Last Visit: 10 Dec 2017

Topics: 46
Posts: 2291
Location: USA
usa.gif

PostPosted: Thu Nov 18, 2004 1:57 pm
   Subject: [Code] Wall Patches
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Next PostGoto Bottom of Posts

With the help of BrotherTank, this has been tested and seems to be bug free.

First, let me explain what wall patches are. They are speciall wall textures that are drawn on top of the wall tile at the given map spot. These patches use palette color #255 to know what pixels it should not draw. So you can set up a sign wall patch and place it over any and all wall textures without having to add any new wall textures.

In WL_DRAW.C, right above HitVertWall:
::: CODE :::
/*
====================
= ApplyPatch
====================
*/
byte   far patchedwall[PMPageSize];
int      lastpatchnum;
#define FIRSTPATCHOBJ    500
#define NUMPATCHES       2   // This is the number of patch pairs (light/dark) in use.
#define PATCHSTART       DOORWALL-NUMPATCHES*2

unsigned GetPatchNum(void)
{
   unsigned spot;

   spot = MAPSPOT(xtile,ytile,1);
   // Restrict patch objects to the given range.
   if (spot < FIRSTPATCHOBJ || spot >= FIRSTPATCHOBJ+NUMPATCHES )
      return 0;
   else
      return spot;
}

boolean ApplyPatch(int wallpic)
{
      byte   far *scan;
      int    pixel;
      unsigned spot;

   spot = GetPatchNum();
   if (spot > 0 && wallpic < DOORWALL) // Don't do door-related textures.
   {
      // Keep track of the patch in memory.
      //   The wall is already stored elsewhere.
      lastpatchnum = spot;
      spot -= FIRSTPATCHOBJ;
      // Adjust for light/dark patch sides
      spot = spot * 2 + (lastside?1:0);
      // Load the wall into the byte array first.
         scan = PM_GetPage(wallpic);
         for (pixel=0; pixel<PMPageSize; pixel++,scan++)
          patchedwall[pixel] = *scan;
      // Now add the patch. This MUST be done separate from wallpic's page.
         scan = PM_GetPage(PATCHSTART+spot);
         for (pixel=0; pixel<PMPageSize; pixel++,scan++)
          if (*scan < 255)
             patchedwall[pixel] = *scan;
      return true;
   }
   lastpatchnum = 0;
   return false;
}
 
/*
====================
= AssignWall
=
= repeated code for HitVert/HorizWall
====================
*/
void AssignWall(int wallpic)
{
   if (ApplyPatch (wallpic))
      *( ((unsigned *)&postsource)+1) = (unsigned)(memptr)patchedwall;
   else
      *( ((unsigned *)&postsource)+1) = (unsigned)PM_GetPage(wallpic);
}

Now in HitVertWall (added code is red, code to comment out is green):
::: CODE :::
   if (lastside==1 && lastintercept == xtile && lasttilehit == tilehit && lastpatchnum == GetPatchNum())
...
//      *( ((unsigned *)&postsource)+1) = (unsigned)PM_GetPage(wallpic);
       AssignWall (wallpic);
         (unsigned)postsource = texture;

And in HitHorizWall:
::: CODE :::
   if (lastside==0 && lastintercept == xtile && lasttilehit == tilehit && lastpatchnum == GetPatchNum())
...
//      *( ((unsigned *)&postsource)+1) = (unsigned)PM_GetPage(wallpic);
       AssignWall (wallpic);
         (unsigned)postsource = texture;

That's all the code changes. Now how to usethem.
1) Create some patches. These are like normal wall textures, but can have transparent pixels. Be sure to have a pair, one for the lighter side of the wall, and one for the darker side.
2) Insert the textures into the VSWAP. This code assumes that they are placed immediately in front of the door textures.
3) Now set NUMPATCHES to the number of patch PAIRS you have.

Wall patches are placed by using the object codes starting at 500 (defined by FIRSTPATCHOBJ).
So, place your wall, then place object #500 over top of this wall and now that wall will have the first patch drawn on top of it.

Some notes:
- Patches do not need to have any transparent pixels, ie: a patch can be a whole new wall.
- Patches cannot be used on secret doors, since the secret door tile is in the object plane
- Patches aren't drawn on any door textures.
- This has only been tested with a clean version of the Wolf3d code and some of BTank's code.
- It should also work with animated textures, meaning the wall is animated, but the patch is static, but feel free to toy around with this, you can probably animate the patches too.
- This does NOT allow walls to have see-through spots. See Ripper's directional sprites tutorial for that.

With wall patches you have an almost limitless amount of walls that you can use without a drop in FPS. (Lower end machines may take a hit though, if someone tries this on an older machine, let us know how well it works out, ie: using DarkOne's FPS counter).

Enjoy!

EDIT: I removed the int vertical parameters and use the global "lastside" instead, as it represents the same thing. I don't think I broke anything in the tutorial.

_________________
Orb of Dilaaria now has a Facebook page
Star Wars: Bloodlines now has a Facebook page


Last edited by Adam Biser on Thu Nov 18, 2004 10:05 pm; edited 3 times in total
Adam Biser
Utility Developer
Utility Developer


Joined: 06 Jun 2003
Last Visit: 10 Dec 2017

Topics: 46
Posts: 2291
Location: USA
usa.gif

PostPosted: Thu Nov 18, 2004 6:35 pm
   Subject: Re: [Code] Wall Patches
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Here's an idea I thought of for something like this: (Again, the low FPS is due to DOSBox)
Unsuspecting...

Someone's gonna have to clean that up...

Of course, the patch code would have to be extended to allow patches to only show on certain sides of walls, etc. and a more elaborate system of placing patch objects via code would be needed so the blood spot isn't always in the middle of the wall. But it's an idea.
This idea could also apply to bullet holes on walls, etc.

_________________
Orb of Dilaaria now has a Facebook page
Star Wars: Bloodlines now has a Facebook page


Last edited by Adam Biser on Thu Nov 18, 2004 9:48 pm; edited 1 time in total
BrotherTank
Forum Administrator
<B>Forum Administrator</B>


Joined: 01 Mar 2003
Last Visit: 13 Sep 2017

Topics: 153
Posts: 2256
Location: Ontario
canada.gif

PostPosted: Thu Nov 18, 2004 8:09 pm
   Subject: Re: [Code] Wall Patches
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Side note:

For those using Mapedit. You must define your patches in the objdata.wl6 file for mapedit. Then to apply them on a map you must follow this order:

1) Place a floor tile (any) in the spot you want the modified wall to be in....
2) Place the object modifier on the spot....
3) Place the wall that you want on that spot to be modified with the object texture.

The reason for this is a strange quirk in Mapedit... (and other editors)... The don't allow sprites (objects) to be placed on walls,except for the "Secret or Pushwall" code... But, you can place a wall on a sprite. Hence the reason for the 3 steps above.

So lets say you want a basic sign on the basic stone wall.... You first cut the graphics from another wall with the sign type you like... you paste it into a new 64x64 image that is colour 255 from the wolf palette as the background (or you can create your own sign).... You insert the graphics into the vswap as Adam states in his tutorial... And adjust the tutorial appropriately...

Then you edit your objdata.wl6 file or floedit or wdc or Chaosedit on the object or sprite plane with something like (and this is for Mapedit):

01F4 C030 Sign Wall Patch Mod

And save, then compile your new source... edit the map as I stated above... by placing any floor value down on the spot you want the new patched wall image... Then select the Sign wall patch object and place it on that tile... Then select the basic stone wall and place it on the tile. Want the same sign on the blue stone wall.... Just use the blue stone wall value for the third item placed on the map on that spot.... Save your maps...

Then give it a whirl.... You should now see the sign on your base wall. So now effectively, you could have 64 base wall types... And an unlimited set of walls because you can place any graphic on top of each wall... as many as you add Modifiers for... You can have Pipes like in SoD Missions... You can have pictures... Signs... Wall tapestries... anything on any wall of your choosing!

Enjoy... I've tested this in Wolfplus.... And it works fantastic... I've tested this in Wolf Advanced... and it works just as amazingly well... And thanks Adam for letting me help with some of the coding and testing... It really sparked my enthusiasm.

Greg
BrotherTank

Example: The 2 signs and the wall electrical box are wall patches Smile

ChiefRebelAngel
DieHard SS
DieHard SS


Joined: 27 Jul 2004
Last Visit: 09 Jan 2010

Topics: 28
Posts: 485
Location: Northern Darkness
blank.gif

PostPosted: Thu Nov 18, 2004 8:11 pm
   Subject: Re: [Code] Wall Patches
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Honestly dude, F*** YOU! How are you this amazing????!!!????

No way. I don't buy it! I don't...can't believe it. I'm hysterical!!!!!!

AHHH!!!!!

You are a genius dude, you are awsome!!!! Much respect!!! AHHHHHHhshshshahaahheheeh!!!

Very Happy Shocked What?
andy3012
DieHard Guard
DieHard Guard


Joined: 02 Jul 2004
Last Visit: 15 Feb 2008

Topics: 29
Posts: 292
Location: England
uk.gif

PostPosted: Fri Nov 19, 2004 9:10 am
   Subject: Re: [Code] Wall Patches
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Wahey you guys finially fixed it, and what an amazing tutorial, you guys don't realise how fun it was just to watch you guys in code crackers contiously posting replies to get this to work lol... Oh yeh and how did you manage to get the blood stain on the wall when the guard is shot that is a really nice function...
WSJ
DieHard Officer
DieHard Officer


Joined: 17 Apr 2004
Last Visit: 08 May 2017

Topics: 24
Posts: 521

blank.gif

PostPosted: Fri Nov 19, 2004 2:47 pm
   Subject: Re: [Code] Wall Patches
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Nice job. In some ways, this is more useful than my method... Not only can it be used to get around the 64 limit, but it also reduces the need to create more walls, since a lot of the wall spaces are taken up with variants of the same kind of wall (ex: grey brick, grey brick w/ picture, grey brick w/ flag, etc.)
Hair Machine
DieHard SS
DieHard SS


Joined: 24 Nov 2003
Last Visit: 08 Jul 2017

Topics: 8
Posts: 431
Location: editing my profile
uk.gif

PostPosted: Fri Nov 19, 2004 2:51 pm
   Subject: Re: [Code] Wall Patches
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Brilliant. That's all I'm saying... *goes and frantically codes, only to realise his computer won't compile the source anymore and cries like a little child whose marshmallows just got eaten by a crow*

_________________
Rar rar fiddle di dee
TexZK
DieHard SS
DieHard SS


Joined: 07 Feb 2004
Last Visit: 17 Oct 2016

Topics: 19
Posts: 370
Location: Northern Italy
italy.gif

PostPosted: Sun Nov 21, 2004 12:14 pm
   Subject: Re: [Code] Wall Patches
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Hey, this is damned amazing! Great feature, guys! I'll add it to WFF!

What about the FPS counter? Are FPS low? If it's so, we'll try to make it faster!
Adam Biser
Utility Developer
Utility Developer


Joined: 06 Jun 2003
Last Visit: 10 Dec 2017

Topics: 46
Posts: 2291
Location: USA
usa.gif

PostPosted: Sun Nov 21, 2004 3:37 pm
   Subject: Re: [Code] Wall Patches
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

TexZK wrote:
What about the FPS counter? Are FPS low?

I didn't notice any drop in FPS. Slower computers, however, may get slower if there are a lot of patches in view at one time. However, no one has confirmed this.

_________________
Orb of Dilaaria now has a Facebook page
Star Wars: Bloodlines now has a Facebook page
Adam Biser
Utility Developer
Utility Developer


Joined: 06 Jun 2003
Last Visit: 10 Dec 2017

Topics: 46
Posts: 2291
Location: USA
usa.gif

PostPosted: Sun Nov 21, 2004 3:46 pm
   Subject: Re: [Code] Wall Patches
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

andy3012 wrote:
Oh yeh and how did you manage to get the blood stain on the wall when the guard is shot that is a really nice function...

Well, it's far from complete and could never look so good really.

In WL_STATE.C, in KillActor() (add the red code)
::: CODE :::

   int   tilex,tiley;
   int   checkx,checky;
...
   ob->flags |= FL_NONMARK;

   if (player->angle < ANGLES/8 || player->angle > 7*ANGLES/8)
   {
      checkx = ob->tilex + 1;
      checky = ob->tiley;
   }
   else if (player->angle < 3*ANGLES/8)
   {
      checkx = ob->tilex;
      checky = ob->tiley-1;
   }
   else if (player->angle < 5*ANGLES/8)
   {
      checkx = ob->tilex - 1;
      checky = ob->tiley;
   }
   else
   {
      checkx = ob->tilex;
      checky = ob->tiley + 1;
   }
   if (tilemap[checkx][checky])
      if (MAPSPOT(checkx,checky,1) == 0)
         MAPSPOT(checkx,checky,1) = 500;

This is very incomplete, but can be a good starting place. This code only checks cardinal directions and assumes the first wall patch is object 500. Just set a blood spot as the first patch pair and try this out. A lot of work would be needed to make it semi-realistic.

EDIT: Oops! Should've put this post in the last one.

_________________
Orb of Dilaaria now has a Facebook page
Star Wars: Bloodlines now has a Facebook page
TexZK
DieHard SS
DieHard SS


Joined: 07 Feb 2004
Last Visit: 17 Oct 2016

Topics: 19
Posts: 370
Location: Northern Italy
italy.gif

PostPosted: Mon Nov 22, 2004 7:35 am
   Subject: Re: [Code] Wall Patches
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Adam Biser wrote:
I didn't notice any drop in FPS. Slower computers, however, may get slower if there are a lot of patches in view at one time. However, no one has confirmed this.


Yep, in WFF (which uses many features at once), the FPS counter never falls under 62 without patches. Now I'll try with patches, but I think it doesn't drop in FPS.

Good work guys! Now let us know how The Brother™ made see-thru doors Rolling Eyes Laughing !
andy3012
DieHard Guard
DieHard Guard


Joined: 02 Jul 2004
Last Visit: 15 Feb 2008

Topics: 29
Posts: 292
Location: England
uk.gif

PostPosted: Tue Nov 23, 2004 10:59 am
   Subject: Re: [Code] Wall Patches
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Hey cheers for that Adam, i would code it now, but ive gotta bunch of unfinished codes to do... Laughing
Adam Biser
Utility Developer
Utility Developer


Joined: 06 Jun 2003
Last Visit: 10 Dec 2017

Topics: 46
Posts: 2291
Location: USA
usa.gif

PostPosted: Mon Dec 13, 2004 8:15 am
   Subject: Re: [Code] Wall Patches
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Just a follow up concerning wall patches and FPS.
I can only detect a drop in FPS while running in DOSBox. Using VDMSound doesn't have the drop.
The more patches on the screen, the slower it gets.
I tested with DOSBox 0.62.

_________________
Orb of Dilaaria now has a Facebook page
Star Wars: Bloodlines now has a Facebook page
KyleRTCW
DieHard Officer
DieHard Officer


Joined: 30 Jul 2003
Last Visit: 09 Nov 2017

Topics: 45
Posts: 510
Location: Ohio
usa.gif

PostPosted: Mon Dec 13, 2004 3:57 pm
   Subject: Re: [Code] Wall Patches
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Awesome feature Shocked, this allows a lot of people to add a whole bunch of walls and just have wallpatches with flags or symbols. Now people can have a better variety of walls!! Thanks Adam!! Very Happy

I have questions though:

1. So these wall patches take up a "static object slot" (max 399)?

2. These "wall patches" go infront of the door automatcially (at least with FloEdit), is their a limit to these as 64 walls?

Thanks
Kyle

_________________
Steam: http://steamcommunity.com/id/stormx312
Adam Biser
Utility Developer
Utility Developer


Joined: 06 Jun 2003
Last Visit: 10 Dec 2017

Topics: 46
Posts: 2291
Location: USA
usa.gif

PostPosted: Mon Dec 13, 2004 4:25 pm
   Subject: Re: [Code] Wall Patches
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Thanks. No, they don't take up static object slots. And they aren't limited to 64. You just need to be sure that they are between your wall textures and your door textures.
The only limit can be the FPS, which only seems to be a problem when run in DOSBox. If you look at the newest Orb picture on modDB.com, you'll see a screen full of patches/decals. The FPS is 8 (!!) in DOSBox, but 70 when run normally or with VDMSound.
But that's when every single wall in view had a patch on it.

_________________
Orb of Dilaaria now has a Facebook page
Star Wars: Bloodlines now has a Facebook page
KyleRTCW
DieHard Officer
DieHard Officer


Joined: 30 Jul 2003
Last Visit: 09 Nov 2017

Topics: 45
Posts: 510
Location: Ohio
usa.gif

PostPosted: Mon Dec 13, 2004 6:11 pm
   Subject: Re: [Code] Wall Patches
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Wow, It seems all the problems magent to me, I have 5 wall patch (10 images) and only 2 work :\
I'll have to look into this :\

NVM: It seems I got to grow the part of my brain "Common Sense" I forgot to change 2 to 5

if (KyleRTCW != Idiot)
KyleRTCW = Idiot;
else
Quit ("Error! : KyleRTCW is not smart!");

_________________
Steam: http://steamcommunity.com/id/stormx312
Adam Biser
Utility Developer
Utility Developer


Joined: 06 Jun 2003
Last Visit: 10 Dec 2017

Topics: 46
Posts: 2291
Location: USA
usa.gif

PostPosted: Mon Dec 13, 2004 6:29 pm
   Subject: Re: [Code] Wall Patches
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Well, at least you got it working now. Very Happy

_________________
Orb of Dilaaria now has a Facebook page
Star Wars: Bloodlines now has a Facebook page
KyleRTCW
DieHard Officer
DieHard Officer


Joined: 30 Jul 2003
Last Visit: 09 Nov 2017

Topics: 45
Posts: 510
Location: Ohio
usa.gif

PostPosted: Tue Dec 14, 2004 3:22 am
   Subject: Re: [Code] Wall Patches
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

I had to edit my code to look like to work:
::: CODE :::

#define NUMPATCHES       5   // I have 5 images
#define PATCHSTART       DOORWALL-8 // However I must minus 8 in order for it work :\


Weird!! Shocked

_________________
Steam: http://steamcommunity.com/id/stormx312
Adam Biser
Utility Developer
Utility Developer


Joined: 06 Jun 2003
Last Visit: 10 Dec 2017

Topics: 46
Posts: 2291
Location: USA
usa.gif

PostPosted: Tue Dec 14, 2004 6:03 am
   Subject: Re: [Code] Wall Patches
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

@KyleRTCW: Well, you might check to be sure you've added all your patch textures and that DOORWALL is defined properly (ie: if you've added new door textures, this will probably need to be changed.)
Otherwise, only 4 patches will work. What happens when you use the 5th patch? Anything? Or does a door wall show up? If a door wall shows up, then you need to change your 8 back to NUMPATCHES*2.

_________________
Orb of Dilaaria now has a Facebook page
Star Wars: Bloodlines now has a Facebook page
BrotherTank
Forum Administrator
<B>Forum Administrator</B>


Joined: 01 Mar 2003
Last Visit: 13 Sep 2017

Topics: 153
Posts: 2256
Location: Ontario
canada.gif

PostPosted: Tue Dec 14, 2004 8:39 am
   Subject: Re: [Code] Wall Patches
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

@Kyle...

If you have DOORWALL set properly as Adam has said, then the problem lies within the other defines you've made for the patches to work.....

The original lines are:

::: CODE :::

#define FIRSTPATCHOBJ    500
#define NUMPATCHES       2   // This is the number of patch pairs (light/dark) in use.
#define PATCHSTART       DOORWALL-NUMPATCHES*2


In your case you say that you have 5 patches, so it should work (as it does here) by changing the NUMPATCHES to 5... The PATCHSTART should be calculated by the rest of the routines without problem. I have seen it where you might need to change the define of PATCHSTART to something like:

::: CODE :::

#define PATCHSTART   (DOORWALL - (NUMPATCHES * 2))


Based on what you have said about your code... The only other problem I can see is if you have these defines "above" the "#define DOORWALL (PMSpriteStart-8)" line... If you have the patch defines above the "DOORWALL" line then it will never know the value of DOORWALL in the PATCHSTART line... defines like these must be sequential. ie, you can't use a define to define a define that hasn't yet been defined.... While the compiler will not say it is an error... it will not give you the proper results...

So... with that said... your lines should be something like this:

::: CODE :::

#define DOORWALL (PMSpriteStart-8)  // number 8 represents # of doors * 2 images per door
#define FIRSTPATCHOBJ    500 // your starting mapedit defined identifier for using patches
#define NUMPATCHES       5   // This is the number of patch pairs (light/dark) in use.
#define PATCHSTART       DOORWALL-NUMPATCHES*2  // Patches start # of patches times 2 below the value of Doorwall


or the second variation of:

::: CODE :::

#define DOORWALL (PMSpriteStart-8)
#define FIRSTPATCHOBJ    500
#define NUMPATCHES       5   // This is the number of patch pairs (light/dark) in use.
#define PATCHSTART       (DOORWALL-(NUMPATCHES*2 ))


Hope that helps...

Greg
BrotherTank

_________________

The probability of someone watching you is directly related to the Stupidity of your actions
&
The two most abundant things in the Universe are Hydrogen & Stupidity - H.Ellison

Which of those is more relevant to you??
Guest




Last Visit:





PostPosted: Tue Dec 14, 2004 4:20 pm
   Subject: Re: [Code] Wall Patches
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

@Adam Biser: if you notice the FPS start dropping under DosBox, then try restart in Plain DOS (if you have a DOS bootable disk) and run your TC to if it work for you without any drop in FPS.....

I used Dual OS in same hard drive which I can run any TCs under Plain DOS, when I finished this game, reboot to Windows 2000 to surf on BrotherTank's Fuzzy forum.... Laughing
Adam Biser
Utility Developer
Utility Developer


Joined: 06 Jun 2003
Last Visit: 10 Dec 2017

Topics: 46
Posts: 2291
Location: USA
usa.gif

PostPosted: Tue Dec 14, 2004 8:53 pm
   Subject: Re: [Code] Wall Patches
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

@<Howling Wolf>: Well, I think the problem is DOSBox. I asked Majik Monkee to test it on his machine (Win 95, 48 MB RAM) and he didn't notice a slowdown for an area filled with patches. Another thing I noticed about DOSBox is that there is also a 5 second pause when loading a level in games that use Ripper's shading. But maybe it's how my DOSBox is set up too. I also don't have a pure DOS boot disk. I have only XP.

_________________
Orb of Dilaaria now has a Facebook page
Star Wars: Bloodlines now has a Facebook page
Guest




Last Visit:





PostPosted: Thu Jan 13, 2005 11:45 am
   Subject: Re: [Code] Wall Patches
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

I`d like to know if there is a way to apply wall patches to doors.
Maybe i could combine it with my code of every door is locked.
Adam Biser
Utility Developer
Utility Developer


Joined: 06 Jun 2003
Last Visit: 10 Dec 2017

Topics: 46
Posts: 2291
Location: USA
usa.gif

PostPosted: Thu Jan 13, 2005 12:41 pm
   Subject: Re: [Code] Wall Patches
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

@flamer46: Try altering this line:
::: CODE :::
if (spot > 0 && wallpic < DOORWALL)

make is something like:
::: CODE :::
if (spot > 0 && (wallpic < DOORWALL || wallpic >= DOORWALL+2 )

Or whatever you want...
Plus you'll need to add code to HitVert/HorizDoor that is similar to the HitVert/HorizWall changes...

I've not tested this, but it *should" work, or at least point you in the right direction.

_________________
Orb of Dilaaria now has a Facebook page
Star Wars: Bloodlines now has a Facebook page
Zombie_Plan
DieHard Wolfer
DieHard Wolfer


Joined: 12 Oct 2004
Last Visit: 07 Jun 2016

Topics: 101
Posts: 1614
Location: A hole in the wall
australia.gif

PostPosted: Sun Jan 16, 2005 6:00 pm
   Subject: Re: [Code] Wall Patches
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

I tested it without DOSBOX on an XP and found that large wall patches slow FPS down to 18!!!

SH**!

_________________
Zombieskittles

Welcome to 2016, where DHW still thinks it is okay to ban the world's most popular email service provider, and I can't have an avatar over 10kb
Adam Biser
Utility Developer
Utility Developer


Joined: 06 Jun 2003
Last Visit: 10 Dec 2017

Topics: 46
Posts: 2291
Location: USA
usa.gif

PostPosted: Sun Jan 16, 2005 10:53 pm
   Subject: Re: [Code] Wall Patches
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

@Deathshead. You might recheck the tutorial and make sure you didn't skip some of the changes, such as checking the last patch in the If statements. This spot is particularly important because, otherwise, the patch will be reloaded for every post causing a massive slowdown.
I've tested this on a 1GHz XP (w/o DOSBox) with no slowdown and Majik Monkee tested it on his older Win95 machine (not sure it's speed) and said he didn't notice a slowdown, and that was for a map that had all walls using patches..

_________________
Orb of Dilaaria now has a Facebook page
Star Wars: Bloodlines now has a Facebook page
Sporb2000
DieHard SS
DieHard SS


Joined: 27 Dec 2004
Last Visit: 26 May 2009

Topics: 19
Posts: 383
Location: New Zealand - Invercargill
newzealand.gif

PostPosted: Tue Apr 26, 2005 6:22 pm
   Subject: Re: [Code] Wall Patches
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

would it be feasible to apply these patch's to the roof and floor? if it was and it didnt effect gameplay that badly then it would be neat.

_________________
I Like (Brackets)
Guest




Last Visit:





PostPosted: Wed Apr 27, 2005 1:02 pm
   Subject: Re: [Code] Wall Patches
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Yes Sporb Adam could probably do it. But i don`t think it`s a good idea. When i installed the multi texture f/c tutorial i found out that if there where too many different textures they would show up as screen garbage. So that could be a result.
Adam Biser
Utility Developer
Utility Developer


Joined: 06 Jun 2003
Last Visit: 10 Dec 2017

Topics: 46
Posts: 2291
Location: USA
usa.gif

PostPosted: Wed Apr 27, 2005 3:56 pm
   Subject: Re: [Code] Wall Patches
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

@Sporb2000: It would be better just to make a new ceiling/floor texture since they don't need to be used as wall textures. It would probably slow things down quite a bit, and be a hassle to figure out a method to define them in the map.

@flamer46: sounds like something got messed up when you applied the multi-texture flats tutorial. You might re-check it and maybe post a screenshot demonstrating this bug in that tutorial's thread if everything appears to be right.

_________________
Orb of Dilaaria now has a Facebook page
Star Wars: Bloodlines now has a Facebook page
Guest




Last Visit:





PostPosted: Thu Apr 28, 2005 8:49 am
   Subject: Re: [Code] Wall Patches
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Bottom of Posts

Where getting a bit off-topic here. Anyway. It`s strange. Probably a computer matter. On my Windows 98 comp it looks fine, even with 10 different ceiling textures and 10 different floor textures in view. The same code and map and the same view gives me screen garbage sometimes on my windows ME comp. It`s probably a computer matter.
Display posts from previous:   
Post new topicReply to topic Time synchronized with the forum server time
DieHard Wolfers Forum Index -> Code Tutorials View Previous TopicRefresh this PageAdd Topic to your Browser FavoritesSearch ForumsPrint this TopicE-mail TopicGoto Page TopView Next Topic
Page 1 of 2 Goto page 1, 2  Next
Jump to:  

Related topics
 Topics   Replies   Views   Last Post 
No new posts [Code] Display Different Ammo Types on Statusbar-BrotherTank
Author: BrotherTank
1 2381 Fri Feb 11, 2005 9:18 pm
Zombie_Plan View latest post
No new posts [Code] Adding a Frames per Second Counter - Darkone
Author: BrotherTank
0 1703 Sat Mar 13, 2004 2:07 pm
BrotherTank View latest post
No new posts [Code] Changing an Enemies Attack Strength - BrotherTank
Author: BrotherTank
0 1969 Tue Jan 27, 2004 10:29 am
BrotherTank View latest post
No new posts [Code] Changing Weapons -CheckWeaponChange- BrotherTank
Author: BrotherTank
2 2700 Sun Oct 26, 2003 1:21 am
Guest View latest post
No new posts [Help] Different Enemy Dying Frames/Views
Author: Guest
7 607 Tue Jul 29, 2003 3:00 pm
Codetech84 View latest post
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
   You cannot delete your posts in this forum
You cannot vote in polls in this forum


Copyright ©2003-2008 DieHard Wolfers
A Modified subBunker Theme by BrotherTank
Powered by phpBB © 2001, 2005 phpBB Group