
|
|
Author |
Message |
Reivax44
Bring 'em On


Joined: 25 Apr 2003
Last Visit: 26 Aug 2010
Topics: 3
Posts: 140
Location: Adelaide.

|
Posted: Mon May 26, 2003 11:34 pm
Subject: [Help] Adding 64+ walls?
[ IP : Logged ]
|

 
|
|
I'm creating a new TC for Wolfenstein 3d and everything (pretty much!) is going along fairly well but, when I add over 64+ ID's (for walls in Pro. mode, using FloEdit), wall 1 replaces wall 65, wall 2 replaces wall 66 etc...?
It mentions that this is a problem (in the Floedit help file) but, it dosen't say how to fix it.
Thanks,
Reivax  |
_________________ 95% of people tip-toe through life hoping to make it safely to DEATH!
|
|
 |
BrotherTank
Forum Administrator

Joined: 01 Mar 2003
Last Visit: 13 Sep 2017
Topics: 153
Posts: 2248
Location: Ontario

|
Posted: Thu May 29, 2003 9:08 pm
Subject: Re: Adding 64+ walls?
[ IP : Logged ]
|

  
|
|
Reivax44 wrote:
I'm creating a new TC for Wolfenstein 3d and everything (pretty much!) is going along fairly well but, when I add over 64+ ID's (for walls in Pro. mode, using FloEdit), wall 1 replaces wall 65, wall 2 replaces wall 66 etc...?
It mentions that this is a problem (in the Floedit help file) but, it dosen't say how to fix it.
Thanks,
Reivax
Yep... that is a problem with the original engine and the solution to add more walls is not as simple as it looks. While the routine I created is less than 25 lines of code (haven't counted but I think it's much less than that), it took ages of fighting with the engine to even allow me to add what I did. Darkone has supposedly broken the limit that even my routine has, but unfortunately, when I tried his engine the problem or it reverting back to the first 64 walls still existed.
I've created a routine to somewhat break the limit, but unfortunately, it's still not available for the general community. It allows up to 90 walls, but the additional 26 walls can not be located beside a pushwall or a door (Again the limitations of the original code)... And before you ask or go off half cocked like others have (not just this forum but places like the old Dome Forums), I will release it in time, but I am asking that I be allowed to do something with it on my own first. That's all...
I can say, that it can be done... MCS challenged me to do it, and I eventually got it to a point where he and Steve could live with the limitations of what I had created. It took probably 6 or more weeks of fighting.... It's not a major breakthrough in code, but it works.
Greg
BrotherTank |
|
|
 |
Chris
DieHard Wolfer


Joined: 11 Mar 2003
Last Visit: 14 Dec 2019
Topics: 57
Posts: 2261
Location: Canada

|
Posted: Fri May 30, 2003 9:46 am
Subject: Secrets of the unaccessible walls...
[ IP : Logged ]
|

  
|
|
Fascinating. Just reading this reply of yours makes me curious into analyzing the question myself. I found that by just adding a 'far' tag, you can go almost anywhere with ceiling colours and music files - and getting over 200 levels doesn't require much tinkering either. From your description, though, it sounds like breaking the 64 wall limit is alot more complex and requires so much more knowledge / experimenting with the source code.
I'm guessing that if you don't need more than 64 different types of walls in a single level - than just changing the start position of where it loads the wall data on different floors could yield interesting results. The more common walls you want to use would be better located closer to the 64th wall tile so that they'll still be available if you start loading the walls with, say, the 32nd-95th pattern. Of course, this means that you'll have to either change or remember your definition offset levels for Mapedit with these levels. I haven't even checked to see where the program loads the vswap yet, but I'm sure nomatter where it does it (during signon, start of the level, during gameplay) - this could still work...
Anyways - I like the way you present your reply Greg, and I respect it how you want to improve your code before releasing it. The idea that you're not giving people much to go by with your routine is great - it gives us a rough idea of what you had to go through to reach the level you have, and still keeps the door open for us to explore the issue with our own theories and imagination. I'll be looking into this concept in alot more detail now (getting 90+ walls to run at once); just as a personal challenge to see if I can get the same results as you.  |
|
|
 |
BrotherTank
Forum Administrator

Joined: 01 Mar 2003
Last Visit: 13 Sep 2017
Topics: 153
Posts: 2248
Location: Ontario

|
Posted: Fri May 30, 2003 12:57 pm
Subject: Re: Adding 64+ walls?
[ IP : Logged ]
|

  
|
|
Chris wrote:
Fascinating. Just reading this reply of yours makes me curious into analyzing the question myself. I found that by just adding a 'far' tag, you can go almost anywhere with ceiling colours and music files - and getting over 200 levels doesn't require much tinkering either. From your description, though, it sounds like breaking the 64 wall limit is alot more complex and requires so much more knowledge / experimenting with the source code.
Glad that you liked my response. The problem is that it's all done with "Bit" arithmatic in the original code, and to allow it to use integer defines for the walls, destroys the DGroup (exceeds the 64k limit). It takes very few lines of code, but much thinking on the way the walls are handled and how the graphics are chosen. I just counted the lines of code and it's actually only 5 (although it does require reworking the way it handles the walls using the "Bit" arithmatic.
Chris wrote:
I'm guessing that if you don't need more than 64 different types of walls in a single level - than just changing the start position of where it loads the wall data on different floors could yield interesting results. The more common walls you want to use would be better located closer to the 64th wall tile so that they'll still be available if you start loading the walls with, say, the 32nd-95th pattern. Of course, this means that you'll have to either change or remember your definition offset levels for Mapedit with these levels. I haven't even checked to see where the program loads the vswap yet, but I'm sure nomatter where it does it (during signon, start of the level, during gameplay) - this could still work...
Actually using an offset would be another way of doing it. When MCS challenged me, that was something that we didn't even look at... as we wanted access to all of the walls at any time. By changing the offset, you could have unlimited blocks of 64 wall graphics available. As to remembering your definition, that is something that MCS and I already developed, but I won't go into the code we devised as it is something new for "EoD". I can whip up a piece of code to do that in no time, if you are interested? I'm sure that once "EoD" is released, there will be a few more things that we can share with the community as far as code.
Actually, I was going to post something on removing the "hard coded secret levels" so that you can define the secret levels the way ID originally intended (the secret elevator floor code in Mapedit). That was something that I did ages ago (something that BJ Rowan said couldn't be done). I enjoy taking on the impossible challenges and trying to find a solution for them .
Chris wrote:
Anyways - I like the way you present your reply Greg, and I respect it how you want to improve your code before releasing it. The idea that you're not giving people much to go by with your routine is great - it gives us a rough idea of what you had to go through to reach the level you have, and still keeps the door open for us to explore the issue with our own theories and imagination. I'll be looking into this concept in alot more detail now (getting 90+ walls to run at once); just as a personal challenge to see if I can get the same results as you.
The routine I have now, allows for 90 walls to be used at any one time, but the additional 26 (above the 64, hence the name we gave it as 64+) are limited in their usable location. The first 64 can be used in any location without problem.
As I said, it might take you a while, but when you figure it out, you'll kick yourself as to it's simplicity. When you have it working, it also removes a bug in the original code that has to do with two doors at a 90 degree angle to one another (a positive side affect to the routine as it stops the disappearing door side/jam bug).
Greg
BrotherTank |
|
|
 |
Dugtrio17
Code Master

Joined: 11 Mar 2003
Last Visit: 03 Oct 2013
Topics: 49
Posts: 901
Location: Seattle

|
Posted: Fri May 30, 2003 6:35 pm
Subject: Re: Adding 64+ walls?
[ IP : Logged ]
|

  
|
|
yeah, Martin wants this for Kreml. I'm in for a hell of alot of work... it sounds really technical, and all I'm good with is variables and messing with numbers.
is it something extremely technical, or it as simple as you say it is? cuz im not good with technical stuff, but im gonna try. I've managed to crash the game so farr, so i guess that's something.
even if a solution is posted, I don't want to know it, cuz I wanna figure this out for myself. well, you know, maybe with the little "hints", like those above
-DAD |
_________________
|
|
 |
Reivax44
Bring 'em On


Joined: 25 Apr 2003
Last Visit: 26 Aug 2010
Topics: 3
Posts: 140
Location: Adelaide.

|
Posted: Fri May 30, 2003 10:18 pm
Subject: Re: Adding 64+ walls?
[ IP : Logged ]
|

  
|
|
Thanks guys (esp. Brother Tank). It's a little bit annoying that I wont be able to use my 100 walls in my TC but, that can't really be helped... anyway, hope your TC is good Brother Tank.
any more hints as how to change 64+ walls...?  |
_________________ 95% of people tip-toe through life hoping to make it safely to DEATH!
|
|
 |
Ripper
Code Master - Developer


Joined: 15 Mar 2003
Last Visit: 30 Sep 2008
Topics: 21
Posts: 527
Location: Germany

|
Posted: Tue Jun 03, 2003 1:24 pm
Subject: Re: Adding 64+ walls?
[ IP : Logged ]
|

 
|
|
The problem with the walls, doors and pushwalls is, that the engine normally uses the 8-bit map field "tilemap" instead of the 16-bit map field "mapsegs[0]" in the following way:
Bit 0-5: Wall texture or door number (1-63 (0 is NO wall))
Bit 6+7: Wall type flag:
00 - normal wall
01 - adjacent door
10 - door
11 - pushwall
So here comes this 64-walls limitions from.
If you modify your engine in such a way, that the draw routines also check the upper 8 bit of the corresponding mapsegs[0] field (mapsegs[0][y][x] vs. tilemap[x][y]), you can theoretically up to 4095 different walls at the same time!
At a current Wolfenstein3D project we're using an engine which only supports 127 different walls for the normal walls but also supports 128 different walls for a second row of walls above the normal row
But there are still some problems with pushable walls and doors... |
|
|
 |
|
|
|
|
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
|