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       

In-Game Messages Tutorial - WSJ
Page 4 of 4 Goto page Previous  1, 2, 3, 4
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
Matte
Registered User
Registered User


Joined: 22 Oct 2006
Last Visit: 03 Feb 2011

Topics: 2
Posts: 12
Location: Jämtland
sweden.gif

PostPosted: Mon Oct 23, 2006 7:06 am
   Subject: Re: In-Game Messages Tutorial - WSJ
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Next PostGoto Bottom of Posts

I've got a little problem with this code when using it together with the Automap on hud code.

Everytime I pick up an item and a message pops up the screen starts to flicker, but if I comment out DrawLevelMap(); the in-game text works just fine.
There must be some kind of conflict between these two.

Anybody have any solution for this?
Chris
DieHard Wolfer
DieHard Wolfer


Joined: 11 Mar 2003
Last Visit: 02 Dec 2018

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

PostPosted: Mon Oct 23, 2006 3:13 pm
   Subject: Re: In-Game Messages Tutorial - WSJ
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Matte wrote:
I've got a little problem with this code when using it together with the Automap on hud code.

Everytime I pick up an item and a message pops up the screen starts to flicker, but if I comment out DrawLevelMap(); the in-game text works just fine.
There must be some kind of conflict between these two.

Anybody have any solution for this?

Not sure about the In-Game Messages, but I would agree that there are a lot of better ways to handle the Automap.

If you want, give me a few days and I'll try to post something better (like sending the map to a buffer, instead of directly to the screen every tic).
Matte
Registered User
Registered User


Joined: 22 Oct 2006
Last Visit: 03 Feb 2011

Topics: 2
Posts: 12
Location: Jämtland
sweden.gif

PostPosted: Tue Oct 24, 2006 2:49 am
   Subject: Re: In-Game Messages Tutorial - WSJ
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Quote:
Not sure about the In-Game Messages, but I would agree that there are a lot of better ways to handle the Automap.

If you want, give me a few days and I'll try to post something better (like sending the map to a buffer, instead of directly to the screen every tic).


Thanks!


Last edited by Matte on Tue Oct 24, 2006 2:51 am; edited 1 time in total
Chris
DieHard Wolfer
DieHard Wolfer


Joined: 11 Mar 2003
Last Visit: 02 Dec 2018

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

PostPosted: Tue Oct 24, 2006 11:02 pm
   Subject: Re: In-Game Messages Tutorial - WSJ
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Heh. I see what you mean about when they're run together Matte. Wild stuff.

Well, here's an easy fix, just add the line in red near the end of the DrawLevelMap() function in WL_AGENT.C:

::: CODE :::
   VWB_Plot(player->tilex+midx-offx,player->tiley+midy-offy,140);

   if (!gamestate.TimeCount)
      VW_UpdateScreen ();
}

I should really work on improving the actual way the automap works sometime though. Just looking at that sloppy code again makes me shutter. Laughing
Codetech84
Code Master
Code Master


Joined: 12 Mar 2003
Last Visit: 27 Aug 2018

Topics: 22
Posts: 1284
Location: Rauma - Finland
finland.gif

PostPosted: Wed Oct 25, 2006 12:07 am
   Subject: Re: In-Game Messages Tutorial - WSJ
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Are you drawing the automap to all the vga planes? That might cause flicker.

_________________
Click here to visit KFH Games website!
*UPDATED* Spear of Destiny Reloaded
KFH Games on Facebook
Matte
Registered User
Registered User


Joined: 22 Oct 2006
Last Visit: 03 Feb 2011

Topics: 2
Posts: 12
Location: Jämtland
sweden.gif

PostPosted: Sun Oct 29, 2006 1:48 am
   Subject: Re: In-Game Messages Tutorial - WSJ
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Chris wrote:
Heh. I see what you mean about when they're run together Matte. Wild stuff.

Well, here's an easy fix, just add the line in red near the end of the DrawLevelMap() function in WL_AGENT.C:

::: CODE :::
   VWB_Plot(player->tilex+midx-offx,player->tiley+midy-offy,140);

   if (!gamestate.TimeCount)
      VW_UpdateScreen ();
}

I should really work on improving the actual way the automap works sometime though. Just looking at that sloppy code again makes me shutter. Laughing


Thanks, that worked perfectly!
thellt
Bring 'em On
Bring 'em On


Joined: 21 Jan 2008
Last Visit: 12 May 2009

Topics: 11
Posts: 85
Location: bloodgulch
usa.gif

PostPosted: Fri Feb 29, 2008 2:00 pm
   Subject: Re: In-Game Messages Tutorial - WSJ
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

how can you make it use less dosbox ram?

(sorry i dont mean to trippel post... Crying or Very sad i have never (beore dhw) used a forum... i have trouble with certain things... nvm... i just tried to tellu u that i just noticed the "goto page link" last time. sorry... btw i love ur avatar! Very Happy Laughing )

_________________
}{even or }{ellt?

look for helt3d


Last edited by thellt on Thu Mar 13, 2008 2:13 pm; edited 1 time in total
jasonbay
Can I Play Daddy
Can I Play Daddy


Joined: 22 Feb 2008
Last Visit: 12 Mar 2010

Topics: 20
Posts: 48
Location: u.s.a.
usa.gif

Warnings : 1
PostPosted: Wed Mar 12, 2008 2:10 pm
   Subject: Re: In-Game Messages Tutorial - WSJ
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Error: _messagetime defined in module WOLFHACK.C is duplicated in module WL_MAIN.C
Error: _messagetime defined in module WOLFHACK.C is duplicated in module WL_TEXT.C
Error: _messagetime defined in module WOLFHACK.C is duplicated in module WL_MENU.C
Error: _messagetime defined in module WOLFHACK.C is duplicated in module WL_INTER.C
Error: _messagetime defined in module WOLFHACK.C is duplicated in module WL_GAME.C
Error: _messagetime defined in module WOLFHACK.C is duplicated in module WL_PLAY.C
Error: _messagetime defined in module WOLFHACK.C is duplicated in module WL_DEBUG.C
Error: _messagetime defined in module WOLFHACK.C is duplicated in module WL_DRAW.C
Error: _messagetime defined in module WOLFHACK.C is duplicated in module WL_SCALE.C
Error: _messagetime defined in module WOLFHACK.C is duplicated in module WL_STATE.C
Error: _messagetime defined in module WOLFHACK.C is duplicated in module WL_AGENT.C
Error: _messagetime defined in module WOLFHACK.C is duplicated in module WL_ACT1.C
Error: _messagetime defined in module WOLFHACK.C is duplicated in module WL_ACT2.C


my error

_________________
TheTalentedMrLeo
Forum Administrator
<B>Forum Administrator</B>


Joined: 14 Mar 2003
Last Visit: 8:43 ago.

Topics: 36
Posts: 682
Location: Sometimes in Canada
usa.gif

PostPosted: Wed Mar 12, 2008 9:32 pm
   Subject: Re: In-Game Messages Tutorial - WSJ
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

It is very obvious that you aren't having a problem with the forum. If you were, there'd be no need to be posting the same exact message three times in a row, 5-10 minutes apart. I am deleting the other two spam posts. Please refrain from triple posting.

Leo
Forum Mod.
Dean
Moderator
<B>Moderator</B>


Joined: 10 Jan 2006
Last Visit: 08 Dec 2018

Topics: 53
Posts: 2205
Location: Australia
australia.gif

PostPosted: Fri Oct 17, 2008 2:30 pm
   Subject: In-Game Messages Tutorial - WSJ
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

I've installed this and everythings working perfectly however I wanted to have a shadow underneath the text like MCS had in EoD so that it defines the text a bit more if the background colous are similar. Does anyone know had to add this? Thanks

_________________
... Still alive Razz
BrotherTank
Forum Administrator
<B>Forum Administrator</B>


Joined: 01 Mar 2003
Last Visit: 13 Sep 2017

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

PostPosted: Fri Oct 17, 2008 9:37 pm
   Subject: Re: In-Game Messages Tutorial - WSJ
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Sure Dean... you print it twice.... First using your background shade colour... and then using the foreground colour. But you adjust the x (or/and) y say (+ or - ) the # of pixels for the shade...

Greg
BrotherTank
AlumiuN
DieHard Wolfer
DieHard Wolfer


Joined: 29 Nov 2007
Last Visit: 5:28 ago.

Topics: 38
Posts: 2513
Location: Christchurch, New Zealand
newzealand.gif

PostPosted: Fri Oct 17, 2008 9:55 pm
   Subject: Re: In-Game Messages Tutorial - WSJ
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Just make it write another, darker message at a small offset before writing the normal message.
Dean
Moderator
<B>Moderator</B>


Joined: 10 Jan 2006
Last Visit: 08 Dec 2018

Topics: 53
Posts: 2205
Location: Australia
australia.gif

PostPosted: Sat Oct 18, 2008 10:48 pm
   Subject: In-Game Messages Tutorial - WSJ
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Thanks again for your help BrotherTank. Smile

For anyone else that might want to add this in at any time here's what my code looks like that gives a black shadow one pixel lower and one pixel to the right. I'm using a red color text but just adjust where indicated to the letter or number on the original Wolf palette for the color that you want to use.

The FIRST section does the shadow.
The SECOND section does the main colour.

::: CODE :::
/*
========================
=
= DrawMessage
=
= displays ingame messages
=
========================
*/

void DrawMessage (void)
{
  messagetime-=tics;

  fontnumber = 0;
  SETFONTCOLOR(0x0,0x0); // set the color
  PrintX=9; PrintY=3; // position the message
  US_Print(gamestate.message); // print message

  SETFONTCOLOR(0xc,0x0); // set the color
  PrintX=8; PrintY=2; // position the message
  US_Print(gamestate.message); // print message
  DrawAllPlayBorderSides ();
}


Hope this helps some others who may to want add a shadow to their onscreen text also.

_________________
... Still alive Razz
RichterBelmont12
DieHard Wolfer
DieHard Wolfer


Joined: 14 Aug 2004
Last Visit: 04 Dec 2018

Topics: 97
Posts: 1509
Location: New Jersey
usa.gif

PostPosted: Sun Nov 02, 2008 6:21 pm
   Subject: Re: In-Game Messages Tutorial - WSJ
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

man someone beat me to it

_________________
http://www.youtube.com/RichterBelmont12

https://www.facebook.com/RichterBelmont123

https://twitter.com/Richterbelmont6
Tricob
Moderator
<B>Moderator</B>


Joined: 14 Mar 2005
Last Visit: 20:50 ago.

Topics: 165
Posts: 8276
Location: Neo-traditions, Inc.
usa.gif

PostPosted: Mon Nov 03, 2008 6:55 pm
   Subject: Re: In-Game Messages Tutorial - WSJ
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

LOL
AlumiuN
DieHard Wolfer
DieHard Wolfer


Joined: 29 Nov 2007
Last Visit: 5:28 ago.

Topics: 38
Posts: 2513
Location: Christchurch, New Zealand
newzealand.gif

PostPosted: Mon Nov 03, 2008 11:35 pm
   Subject: Re: In-Game Messages Tutorial - WSJ
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

By a LONG SHOT. Mr Green
Soldat 555
Guest



Last Visit:





PostPosted: Mon Jan 31, 2011 3:04 pm
   Subject: Re: In-Game Messages Tutorial - WSJ
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

Okay, sorry for reviving a dead post but I had an interesting idea... Could we have the message get typed out like in Duke Nukem II? Smile


Thunderstorm Joshua M@d Wolf Waight Thunderstorm
Tricob
Moderator
<B>Moderator</B>


Joined: 14 Mar 2005
Last Visit: 20:50 ago.

Topics: 165
Posts: 8276
Location: Neo-traditions, Inc.
usa.gif

PostPosted: Mon Jan 31, 2011 7:35 pm
   Subject: Re: In-Game Messages Tutorial - WSJ
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

It's probably possible, but you have to figure out something first - how to get the code to "stop" on the first line of text, then have it do the next line without printing the previous along with it. Smile
gerolf
DieHard Wolfer
DieHard Wolfer


Joined: 28 Jan 2010
Last Visit: 23 Oct 2018

Topics: 162
Posts: 1084
Location: Alabama
usa.gif

PostPosted: Mon Mar 07, 2011 4:56 pm
   Subject: Re: In-Game Messages Tutorial - WSJ
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

wow, i was thinking about that a while ago, text like that would be great for intermission screens.

_________________
Tricob
Moderator
<B>Moderator</B>


Joined: 14 Mar 2005
Last Visit: 20:50 ago.

Topics: 165
Posts: 8276
Location: Neo-traditions, Inc.
usa.gif

PostPosted: Mon Mar 07, 2011 6:45 pm
   Subject: Re: In-Game Messages Tutorial - WSJ
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Bottom of Posts

For intermission screens, it's actually much easier; all the text can be called up through an array in a simple loop. In actual gameplay, it's much different - and difficult.
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 4 of 4 Goto page Previous  1, 2, 3, 4
Jump to:  

Related topics
 Topics   Replies   Views   Last Post 
No new posts [Code] Add Text to Screen at Skill Level select - Chris
Author: Chris
3 3155 Tue Sep 28, 2010 6:59 pm
Tricob View latest post
No new posts [Code] Adding an Object that causes Damage - Chris
Author: Chris
4 2142 Sat Apr 24, 2004 7:53 pm
Guest View latest post
No new posts [Code] Split Hitler Boss into 2 Enemies - Adam Biser
Author: Adam Biser
4 1958 Mon Jan 05, 2004 12:13 pm
Adam Biser View latest post
No new posts [Code] Change Colour of Blocks on Signon - Adam
Author: Adam Biser
0 1272 Sun Jan 04, 2004 10:55 am
Adam Biser View latest post
No new posts [Help] Different Enemy Dying Frames/Views
Author: Guest
7 609 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