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       

128x128 Maps problem
Page 1 of 1
DieHard Wolfers Forum Index -> SDL Code Crackers 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
Mortimer
Don't Hurt Me
Don't Hurt Me


Joined: 25 Oct 2007
Last Visit: 05 Dec 2017

Topics: 14
Posts: 51

poland.gif

PostPosted: Sun Dec 19, 2010 7:12 am
   Subject: 128x128 Maps problem
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Next PostGoto Bottom of Posts

As you might remember (or not), I've posted some time ago a topic about how to turn maps in 128x128.

It worked, but I have noticed a serious bug during some tests:

Being 128x128 means that the map is four times bigger than the original. Imagine a 128x128 map divided in four parts of the same size, like 4 original levels in one. If I put an enemy in the first empty tile of the first part (64x64), if I go to the next vertical part, depending on the size of the room(s) and on the angle that you are looking, you will see random images from enemies (it doesn't happens with static objects) on the other part, just for a frame, and then disappear. It's a bit hard to explain with words. I have also tested this in a fresh source code and it happens.

Here is an image to describe it better:

http://img259.imageshack.us/f/diehardwolfers.jpg/
http://img526.imageshack.us/f/diehardwolfers02.jpg/


Also, I can't shoot or kill these guards that appear in my screen because they aren't actually there. Also important to remember this doesn't happens horizontally, only vertically.

Does anybody have any idea of what this could be?

Thanks.
Tricob
Moderator
<B>Moderator</B>


Joined: 14 Mar 2005
Last Visit: 5:19 ago.

Topics: 163
Posts: 8194
Location: Neo-traditions, Inc.
usa.gif

PostPosted: Mon Dec 20, 2010 7:04 pm
   Subject: Re: 128x128 Maps problem
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

It sounds like the code isn't completely ported in WL_DRAW.CPP. From what you've said, the player, the enemies, and the static objects also function correctly, they just appear where they're not supposed to. The WL_DRAW.CPP has all the functions that draw these sorts of things. Smile
Mortimer
Don't Hurt Me
Don't Hurt Me


Joined: 25 Oct 2007
Last Visit: 05 Dec 2017

Topics: 14
Posts: 51

poland.gif

PostPosted: Sun Jan 02, 2011 9:42 am
   Subject: 128x128 Maps problem
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

I have also did some other tests.

I've removed the shootdelta restriction in KnifeAttack, tried to hit "apparitions" and hit them successfully. You may also think that this would hit every single enemy in the level, but that doesn't happen, what means it isn't a simple drawing problem, it's something more serious.
Tricob
Moderator
<B>Moderator</B>


Joined: 14 Mar 2005
Last Visit: 5:19 ago.

Topics: 163
Posts: 8194
Location: Neo-traditions, Inc.
usa.gif

PostPosted: Sun Jan 02, 2011 5:43 pm
   Subject: Re: 128x128 Maps problem
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Are you using the code from my WolfDX source? I know now that it has a lot of problems, as it doesn't always read the map areas properly. If you point at certain angles, the EXE gets bad data from the maps for some reason.

The WolfDX code was lapped over BT's Bunker source, and there's a lot of things I did in the source which - if you're not starting with a fresh copy of the Wolf4SDL code - is asking for trouble. That's why my current coding project began with vanilla Wolf4SDL source.
Mortimer
Don't Hurt Me
Don't Hurt Me


Joined: 25 Oct 2007
Last Visit: 05 Dec 2017

Topics: 14
Posts: 51

poland.gif

PostPosted: Fri Jan 07, 2011 5:37 pm
   Subject: Re: 128x128 Maps problem
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

I am using a fresh copy of the Wolf4SDL too. If you try this on a fresh one, you will also get this problem.

Unfortunately it seems this isn't something easy to solve.
Dugtrio17
Code Master
Code Master


Joined: 11 Mar 2003
Last Visit: 03 Oct 2013

Topics: 49
Posts: 903
Location: Seattle
usa.gif

PostPosted: Fri Jan 07, 2011 11:00 pm
   Subject: Re: 128x128 Maps problem
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

The only insight I can offer is that KnifeAttack/GunAttack won't hit every single enemy in the level like that (unless I'm misunderstanding what you did); they pick one target and then hit that one guy. My hunch would also be toward the drawing code, but I know nothing of the 128x128 map code.

_________________
Mortimer
Don't Hurt Me
Don't Hurt Me


Joined: 25 Oct 2007
Last Visit: 05 Dec 2017

Topics: 14
Posts: 51

poland.gif

PostPosted: Sun Jan 09, 2011 5:17 pm
   Subject: 128x128 Maps problem
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Yeah, it doesn't actually hit all the enemies, but it hits the "apparitions" (just when they are appearing in my screen), what shouldn't happen if this was a simple drawing problem.

I really would like to figure out what causes this Rolling Eyes
Chris
DieHard Wolfer
DieHard Wolfer


Joined: 11 Mar 2003
Last Visit: 13 Sep 2018

Topics: 55
Posts: 2139
Location: Canada
blank.gif

PostPosted: Thu Apr 28, 2011 5:03 pm
   Subject: Re: 128x128 Maps problem
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Hi Mortimer,

Thanks for pointing this out, and explaining the bug so well. Very Happy

Here is the problem... There is still a part in DrawScaleds() of WL_DRAW.CPP that is hard coded for 64x64 maps:

::: CODE :::
        //
        // could be in any of the nine surrounding tiles
        //
        if (*visspot
            || ( *(visspot-1) && !*(tilespot-1) )
            || ( *(visspot+1) && !*(tilespot+1) )
            || ( *(visspot-65) && !*(tilespot-65) )
            || ( *(visspot-64) && !*(tilespot-64) )
            || ( *(visspot-63) && !*(tilespot-63) )
            || ( *(visspot+65) && !*(tilespot+65) )
            || ( *(visspot+64) && !*(tilespot+64) )
            || ( *(visspot+63) && !*(tilespot+63) ) )
        {

Pointers! 64 memory locations away on the map would be the next line in a 64x64 map (one square away by turning 90 degrees and walking), but it would be the other side of the map in 128x128 (stuff that's 63-65 squares away)... haha.

A quick way to make this code work right for any mapsize would be this:

::: CODE :::
        //
        // could be in any of the nine surrounding tiles
        //
        if (*visspot
            || ( *(visspot-1) && !*(tilespot-1) )
            || ( *(visspot+1) && !*(tilespot+1) )
            || ( *(visspot-(MAPSIZE+1)) && !*(tilespot-(MAPSIZE+1)) )
            || ( *(visspot-(MAPSIZE)) && !*(tilespot-(MAPSIZE)) )
            || ( *(visspot-(MAPSIZE-1)) && !*(tilespot-(MAPSIZE-1)) )
            || ( *(visspot+(MAPSIZE+1)) && !*(tilespot+(MAPSIZE+1)) )
            || ( *(visspot+(MAPSIZE)) && !*(tilespot+(MAPSIZE)) )
            || ( *(visspot+(MAPSIZE-1)) && !*(tilespot+(MAPSIZE-1)) ) )
        {


Thumbs Up Beer
insurrectionman
DieHard Mutant
DieHard Mutant


Joined: 07 May 2005
Last Visit: 31 Aug 2018

Topics: 87
Posts: 759
Location: Wisconsin
usa.gif

PostPosted: Thu Apr 28, 2011 7:11 pm
   Subject: Re: 128x128 Maps problem
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

I didn't think it could be that simple. I wonder how many more hard-coded values are still hidden in the code. :S

_________________
I'm back! I missed this community!
Youtube Channel: TreeSapThief

New Site: http://www.treesapthief.com
Twitter: @treesapthief
Mortimer
Don't Hurt Me
Don't Hurt Me


Joined: 25 Oct 2007
Last Visit: 05 Dec 2017

Topics: 14
Posts: 51

poland.gif

PostPosted: Tue May 03, 2011 12:01 pm
   Subject: 128x128 Maps problem
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

I'll have to say the same as insurrectionman: I didn't think it was so simple.

Thank you very much for this, Chris. I also tried my best at explaining it Beer

Just out of curiosity now, did you find the solution for it quickly or did you keep looking for it for a time?
Tricob
Moderator
<B>Moderator</B>


Joined: 14 Mar 2005
Last Visit: 5:19 ago.

Topics: 163
Posts: 8194
Location: Neo-traditions, Inc.
usa.gif

PostPosted: Wed May 04, 2011 3:36 pm
   Subject: Re: 128x128 Maps problem
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Bottom of Posts

My bet is that Chris has experienced this problem himself. Smile
Display posts from previous:   
Post new topicReply to topic Time synchronized with the forum server time
DieHard Wolfers Forum Index -> SDL Code Crackers View Previous TopicRefresh this PageAdd Topic to your Browser FavoritesSearch ForumsPrint this TopicE-mail TopicGoto Page TopView Next Topic
Page 1 of 1
Jump to:  

Related topics
 Topics   Replies   Views   Last Post 
No new posts Sticky: [Tutorial] Compiling Wolf4SDL with Code::Blocks
Author: dcbasic
90 24559 Wed May 24, 2017 7:53 pm
Falcon*93 View latest post
No new posts [HELP] Stat-bar problem.
Author: Raziel
1 919 Sun Jul 20, 2008 12:43 pm
insurrectionman View latest post
No new posts [HELP] Weird Bug
Author: Raziel
6 1578 Sun Jul 20, 2008 7:22 am
Raziel View latest post
No new posts Problem with new Wolf4SDL Demo Releases
Author: BrotherTank
4 1805 Sun Jul 20, 2008 3:57 am
Ripper View latest post
No new posts [Help] Problem with Checkweaponchange function (wolf4sdl)
Author: Mortimer
4 3204 Sat May 17, 2008 11:26 am
Mortimer 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