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] Add Text to Screen at Skill Level select - Chris
Page 1 of 1
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
Chris
DieHard Wolfer
DieHard Wolfer


Joined: 11 Mar 2003
Last Visit: 30 Oct 2017

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

PostPosted: Thu Oct 16, 2003 11:12 pm
   Subject: Re: Remove the Signon screen
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Next PostGoto Bottom of Posts

Sockman wrote:
That would be a cool feature for Wolf, I believe it was in ROTT also, but not along the same idea. It said "Creezy Man" if you selected the last skill level. Another cool feature would be random skill level options (like in ROTT Full Version)

i.e: You select "Can I Play Daddy?" and under the skills box, it reads, "Less Enemies, More powerups", etc...


Yeah man, Duke II is pretty cool. Some of those levels were really fun adventures, and it was cool how you could twist around when you jump and ride those weapon ships. Most of my fondest Duke memories (before getting the 3d version) came from the classic PC Speaker goodness of Duke I though; with those crazy rabbits, helicopters, poles that you can shoot... and those weird bonus numbers (whatever the heck they stood for) that would sometimes pop up when you can get in the "place you can save" limbo inbetween levels. After playing that game alot, I was watching my uncle and he walked right through a wall (into a secret area) and I was just blown away that this was actually possible! Even just the objects like the purple flags, chicken, pop, and twiling circle things were neat (and how you can shoot them to change their effect). Great times! Smile

I don't remember anything about those "Difficulty Messages" in Duke II, but I'm sure it's pretty easy to throw something like that in Wolf3d (since you're just adding and refreshing text on the screen). Looked in WL_MENU.C for stuff that had to do with the difficulty screen, and the first thing I saw was the DrawNewGameDiff() function... so here's what I replaced it with for fun (not sure if it's what you wanted, but feel free to try it out):

::: CODE :::
void DrawNewGameDiff(int w)
{
   VWB_DrawPic(NM_X+185,NM_Y+7,w+C_BABYMODEPIC);
   VWB_Bar(0,160,320,10,BKGDCOLOR-4);
   fontnumber = 0;
   PrintY = 160;

   switch (w)
   {
   case 0:
      SETFONTCOLOR(71,0); PrintX=70;
      US_Print("Hi, my name is Bob the idiot.");
      break;
   case 1:
      SETFONTCOLOR(51,0); PrintX=38;
      US_Print("It's like taking candy... and eating it too.");
      break;
   case 2:
      SETFONTCOLOR(95,0); PrintX=33;
      US_Print("Turns out that Green is the new fashion.");
      break;
   case 3:
      SETFONTCOLOR(58,0); PrintX=47;
      US_Print("I want Extra Meatballs on my plate!");
      break;
   }
   fontnumber = 1;
   SETFONTCOLOR(19,0);

}

Glad you had fun with Episode 6 in that EXE Sockman. I don't know if you noticed, but if you run to the opposite corner of the level... the screen will gradually squash itself (I didn't make it squash too much beyond normal, cause I like that whole stretch effect too). It's pretty easy to customize, so you can have it change based on anything you want - like your movenent, the time, your health, etc. I just threw this one into the CheckKeys() function of WL_PLAY.C (just above the start of the MLI cheat stuff), which strecthes in and out every 10 seconds:

::: CODE :::
i = (gamestate.TimeCount+350)%1400;
if (heightnumerator < 390000)
   heightnumerator += 550*(i < 700);
if (heightnumerator > 10000)
   heightnumerator -= 550*(i >= 700);

If you want to see what the actual 'height numbers' are changing to over time, plug in a "DrawScore();" under that code above; than change the one line in the DrawScore() function of WL_AGENT.C to say:

LatchNumber (6,16,6,heightnumerator);

Seeing your number displayed can be useful for alot of purposes (say, if you want the height to change when you enter a certain area, and if the player stays in that area until the height hits a certain number; your health will start to decrease gradually until you find a way out). Maybe after the height reaches 0 or infinity, you will teleport somewhere else in the level and a boss will appear behind you; or following the stretch marks will bring you to a secret treasure stash. The ideas for something like this are pretty much endless...

You can add a ton of other screen effects into the mesh by playing around with all the variables in the first half of WL_DRAW.C - but I'll leave you alone to experiment with some of that stuff yourself and see what kind of weird things you can come up with. Smile
Sockman
Don't Hurt Me
Don't Hurt Me


Joined: 19 Jun 2003
Last Visit: 24 Jun 2008

Topics: 3
Posts: 67
Location: City 17
usa.gif

PostPosted: Fri Oct 17, 2003 1:04 pm
   Subject: Re: Remove the Signon screen
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

This seems to be what I need, although I haven't tested it yet. Thanks in advance.

Duke I was a cool game. I can remember the odd "save rooms" that you had to reach at the end of the level, and the bonuses came from nowhere. BTW, for Duke2, If you want to know how to tell if a red box is a bomb, check the position of your sprite. If Duke goes "behind" the box, it's a bomb. If he goes in "front" like he should, it's some sort of soda for health.

You can also type PageDown + Backspace in Duke 1 to get all keys and weapons. Similar to Wolf's I-L-M cheat, or Keen's B-A-T cheat, except this is Duke.

I'm making an addon now (changing between 3 other addons Laughing ) that will follow the base ideas of the first 2 duke games. You can kill people and get bonuses that ring up at the end of the mission. There'll be a cool skill mode where it's a seperate episode with respawning enemies. If you reach 1,000,000 (1 million) points, you've won, and you're score resets. Any score you get after that is what goes on the high-score list.

Be cool d00ds Cool

_________________
This isn't revenge; it's punishment.
Soldat 555
Guest



Last Visit:





PostPosted: Mon Sep 27, 2010 3:29 pm
   Subject: Re: [Code] Add Text to Screen at Skill Level select - Chris
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Next PostGoto Bottom of Posts

::: CODE :::

void DrawNewGameDiff(int w)
{
   VWB_DrawPic(NM_X+185,NM_Y+7,w+C_BABYMODEPIC);
   VWB_Bar(0,160,320,10,BKGDCOLOR-4);
   fontnumber = 0;
   PrintY = 160;

   switch (w)
   {
   case 0:
      SETFONTCOLOR(71,0); PrintX=70;
      US_Print("Hi, my name is Bob the idiot.");
      break;
   case 1:
      SETFONTCOLOR(51,0); PrintX=38;
      US_Print("It's like taking candy... and eating it too.");
      break;
   case 2:
      SETFONTCOLOR(95,0); PrintX=33;
      US_Print("Turns out that Green is the new fashion.");
      break;
   case 3:
      SETFONTCOLOR(58,0); PrintX=47;
      US_Print("I want Extra Meatballs on my plate!");
      break;
   }
   fontnumber = 1;
   SETFONTCOLOR(19,0);

}


I ran into a bit of a snag with this in SDL coding. I did this exact code but the twxt appears right over the name of the difficulty instead of below the outlined box... I fixed this by replacing all the PrintXs with PrintX = 30; PrintY = 160; but now all the difficulty messages appear over each other... Any help guys?


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


Joined: 14 Mar 2005
Last Visit: 15:28 ago.

Topics: 160
Posts: 8007
Location: Neo-traditions, Inc.
usa.gif

PostPosted: Tue Sep 28, 2010 6:59 pm
   Subject: Re: [Code] Add Text to Screen at Skill Level select - Chris
   [ IP : Logged ]
Reply with quote
Goto Top of PostsGoto Previous PostGoto Bottom of Posts

I couldn't help but notice that I left this feature out when I coded WolfDX in Wolf4SDL. I'll make a note to try enabling this feature before releasing the source. This part of the code probably won't care whether it's in vanilla Wolf4SDL code or BunkerSDL, from which WolfDX was based.

But to sum up what the problem is in SDL, part of the code is supposed to erase the old text before the new text is drawn over it. This is done by overlapping the old text with a blank rectangle. In the SDL code, the rectangle is being drawn in the wrong place (in other words, the rectangle is still being drawn somewhere, but not where the text is). That's why your problem is occurring. Smile

The line of code you need to adjust appears to be here:

::: CODE :::
 VWB_Bar(0,160,320,10,BKGDCOLOR-4);
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 1
Jump to:  

Related topics
 Topics   Replies   Views   Last Post 
No new posts [Code] Blood Splatz Tutorial - Blood Splatters
Author: Dugtrio17
45 11219 Tue Mar 11, 2008 12:02 am
AlumiuN View latest 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
 
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