Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Templar

What you would like EDGE to have....

Recommended Posts

Templar said:

I remember the old EDGE ran a lot faster.

As far back as I can remember, EDGE has never been a particularly speedy port.

Templar then said:

EDGE is a real engine, not this Zdoom fairy stuff heh heh

Lies and blasphemies

Share this post


Link to post
Nanami said:

Heh, this is my personal opinion but Massmouth and Massmouth2 have much better scripts than LSTD. Not just the way they're used, but also looking through the script lumps.



Hmm, last time I checked Massmouth 1 had almost no scripts at all. The longest script lump excluding the credits sequence was 1.8 kb. Together they are 12 kb. LTSD's shortest script lump is 7.5 kb and they are altogether 168 kb. Even if you consider a certain redundancy this is 10 times as much as MassMouth.

Share this post


Link to post

Uh, the mass of a script doesn't tell you anything about it. In fact, I was looking at one of Ultimate Doomer's scripts last night and it was about 50 lines long, and I rewrote it into 6 lines. Cyb is much better at programming and scripting than Ultimate Doomer is, that's all.

Share this post


Link to post
Graf Zahl said:

A really good scripting demo would be 007LTSD because there the scripting enhances the gameplay, it doesn't define it.

rofl, have you looked at the LTSD scripts? it doesn't even use loops. and yes, it has 5 minute timers in it.

Share this post


Link to post

Just for a few examples...

LTSD:

Light_ChangeToValue (148, 180);
Light_ChangeToValue (150, 180);
Light_ChangeToValue (152, 180);
Light_ChangeToValue (154, 180);
Light_ChangeToValue (156, 180);
Light_ChangeToValue (157, 180);
Light_ChangeToValue (158, 180);
After retagging the sectors:
for (int a=148; a<159; a++)
 Light_ChangeToValue (a, 180);
There are 10 scripts identical to this one except for the tids. You could easily pass arguments and make this into one script.
script 13 (void)
{
Thing_Remove (72);
Ceiling_RaiseInstant (62, 0, 16);
}
Here's an example of a "timer script" in LTSD.
print(s:"\cg 0:50...");
delay(350);
print(s:"\cg 0:40...");
delay(350);
print(s:"\cg 0:30...");
delay(350);
printbold(s:"\cg 0:20...");
delay(350);
print(s:"\cg 0:10...");
Here's an example of something I wrote for ZooM:
script 122 (VOID)
{
 Delay(1);
 tic++;
 if (tic == 35)
 {
  sec++;
  tic = 0;
 }
 if (sec == 60)
 {
  min++;
  sec = 0;
 }
 HudmessageBold(s:nums[min],s:":",s:nums[sec],s:":",s:nums[tic*100/35];0,2,9,0.5,0.1,0);
 restart;
}
This may LOOK longer, but this script will keep track of minutes, seconds, and 35ths of a second (tics), and then print it at the top of the screen neatly. This script is totally independant, and will go as high/low as needed. UD's script has to be reprogrammed to meet the values you wish to enter (2:00, 2:30, 6:00, etc).

Take a look at the script lump for E4M6, starting with this line.
setlinespecial (111, 237, 111, 0, 1);
All the following "SetLineSpecial" lines can be replaced with this:
for (int a=111; a<135; a++)
 SetLineSpecial(a,237,a,0,1);
No... bigger isn't better. =)

Share this post


Link to post
Graf Zahl said:

DDF/EDF would also be nice if there was someone who'd use it efficiently (and that does not include weapons mods). Personally, I play Doom to fight Doom's monsters. Too many TC's have the problem that they take away the look and feel of the game, use totally ugly graphics replacements or just contain bad maps. (And that's not EDGE specific. There are tons of TC's made with Dehacked that fit this criteria)


The idea of a TC is usually to add new things.

Nanami said:

stuff


The scripting in LTSD is very basic, admittedly. However, I have seen much more complicated scripts used less effectively. I have some scripts in Rust that use tangles of equations and constant monitoring for your buddies to jump up onto ledges behind you and over pits etc, but it still doesn't make it any more fun or better than LTSD. Graf's original point was, I think, the way LTSD's scripting supplemented the gameplay. I played LTSD through with no knowledge of scripting - a casual player's perspective on it - and had a great time. No matter how basic the scripting these inner workings are not apparent as you are playing, and the way they were implemented in gameplay terms was very effective.

Share this post


Link to post
ToXiCFLUFF said:

Graf's original point was, I think, the way LTSD's scripting supplemented the gameplay.

I know of his intent, but his claim was that the WEIGHT of the scripts was what made it better, which is untrue.

Anyway, I can agree that Massmouth had at least somewhat "primitive" scripting, but Massmouth2 has some of the best I've seen (it has multiple endings even).

Share this post


Link to post
Nanami said:

that the WEIGHT of the scripts was what made it better, which is untrue.[B]


I'd certainly agree there. Short, efficient (reusable if possible) code is definitely best. I usually find I rewrite any slightly more complex chunk 3 times or more before the final incarnation.

Share this post


Link to post

Uh, what's the point of bashing The Ultimate Doomer's scripting skills?

Anyway, I am an old-school Doomer, and I would much rather see some really kick-ass acrhitechture and tons of new enemies than some adimttedly neato scripts. Sorry, but awesome architecture like in Crossing Acheron and amazing new stuff like in the Aliens TC and Aliens Doom 3 is what has always captured my imagination and impressed me more than scripting. I'm not denying the usefullness of scripting (I plan to do some real neeat shit with it myself), it's just far less important in my book. And besides, by your logic, that means that Legacy is the best port.

Finally, sorry about bashing Massmouth 2, cyb. I know you put a lot of work into it; it just didn't quite work for me.

Share this post


Link to post
Nanami said:

I know of his intent, but his claim was that the WEIGHT of the scripts was what made it better, which is untrue.

Anyway, I can agree that Massmouth had at least somewhat "primitive" scripting, but Massmouth2 has some of the best I've seen (it has multiple endings even).



I never said anything against MM2's scripts. In terms of scripting complexity this is surely impressive but I prefer something less intrusive (like LTSD) I specifically mentioned MM1! The fact that I didn't particularly like the style of either of them is irrelevant for this discussion.

Share this post


Link to post
Nanami said:

Just for a few examples...

LTSD:

Light_ChangeToValue (148, 180);
Light_ChangeToValue (150, 180);
Light_ChangeToValue (152, 180);
Light_ChangeToValue (154, 180);
Light_ChangeToValue (156, 180);
Light_ChangeToValue (157, 180);
Light_ChangeToValue (158, 180);
After retagging the sectors:
for (int a=148; a<159; a++)
 Light_ChangeToValue (a, 180);
There are 10 scripts identical to this one except for the tids. You could easily pass arguments and make this into one script.
script 13 (void)
{
Thing_Remove (72);
Ceiling_RaiseInstant (62, 0, 16);
}
Here's an example of a "timer script" in LTSD.
print(s:"\cg 0:50...");
delay(350);
print(s:"\cg 0:40...");
delay(350);
print(s:"\cg 0:30...");
delay(350);
printbold(s:"\cg 0:20...");
delay(350);
print(s:"\cg 0:10...");
Here's an example of something I wrote for ZooM:
script 122 (VOID)
{
 Delay(1);
 tic++;
 if (tic == 35)
 {
  sec++;
  tic = 0;
 }
 if (sec == 60)
 {
  min++;
  sec = 0;
 }
 HudmessageBold(s:nums[min],s:":",s:nums[sec],s:":",s:nums[tic*100/35];0,2,9,0.5,0.1,0);
 restart;
}
This may LOOK longer, but this script will keep track of minutes, seconds, and 35ths of a second (tics), and then print it at the top of the screen neatly. This script is totally independant, and will go as high/low as needed. UD's script has to be reprogrammed to meet the values you wish to enter (2:00, 2:30, 6:00, etc).

Take a look at the script lump for E4M6, starting with this line.
setlinespecial (111, 237, 111, 0, 1);
All the following "SetLineSpecial" lines can be replaced with this:
for (int a=111; a<135; a++)
 SetLineSpecial(a,237,a,0,1);
No... bigger isn't better. =)



Well smarter isn't better also! The ends justify the means and even I as a professional programmer tend to use the quick'n dirty approach if it suits me. I don't waste the time to invent complex algorithms if I know I won't reuse the stuff.

Share this post


Link to post

UD's scripting skills don't really matter - what does is that he puts out awesome maps.

As for my logic making Legacy the best port.... how'd you figure? I went with it for my projects because I needed a combination of decent graphics and scripting. Zdoom's scripting is overall more powerful.

Share this post


Link to post
Grimm said:

Uh, what's the point of bashing The Ultimate Doomer's scripting skills?

I wasn't bashing UD, I was using his code because his wad was brought up.

If it makes any difference, the RTC-3057 demo has messy code as well. ;)

Share this post


Link to post

heh, I was working on massm.wad in mid to late 99, when I knew absolutly no (or maybe a slight amount) programming. In fact I didn't even construct the maps in native zdoom format, I made them in waded in doom format and then added scripts which are largly cosmetic. In fact, with a few minor exceptions, it's probably possible to get massm1 to run with boom with little difficulty if you port the maps from hexen format. at the time when I made it, though, it was considered to be extremly script heavy, if for no other reason than zdoom wasn't as developed back then as it is today.

Graf Zahl said:
well, I like ZDoom but Massmouth 2 is certainly not the kind of WAD that should be used as an example.


haha awesome, you just made my day

I do agree though, I think LTSD is an excellent example of how minor scripts can enhance some standard doom gameplay. it was never my intent to make either massmouth wad behave or even remind you of doom at all though, so mission accomplished?

Share this post


Link to post
Cyb said:

I do agree though, I think LTSD is an excellent example of how minor scripts can enhance some standard doom gameplay. it was never my intent to make either massmouth wad behave or even remind you of doom at all though, so mission accomplished?



I know. That's exactly what I meant. If we want to point out a WAD that uses scripts to enhance Doom's gameplay a TC is hardly a good example, right? ;-)

Share this post


Link to post
Nanami said:

Uh, the mass of a script doesn't tell you anything about it. In fact, I was looking at one of Ultimate Doomer's scripts last night and it was about 50 lines long, and I rewrote it into 6 lines. Cyb is much better at programming and scripting than Ultimate Doomer is, that's all.


But, Nanami, I've seen a couple of your scripts that rival Lee Killough's best obfuscated C entries ^_^

Share this post


Link to post
Quasar said:

But, Nanami, I've seen a couple of your scripts that rival Lee Killough's best obfuscated C entries ^_^

Pardon my saying so, but who?

Share this post


Link to post
Nanami said:

Pardon my saying so, but who?

A God of Doom, the coder variety. He did MBF (I think), BSP (I think), and a bunch of other stuff.

EDIT: DAMN YOU BALDY

Share this post


Link to post

Lee is a great guy and he inspired me to start programming. But, he is (in)famous for leaving us gems like these (these are actual code segments from Eternity, I'm not making this up):

  for (ud=rg=sw=cm=sc=tnt=plut=0, header.numlumps = LONG(header.numlumps);
       header.numlumps && fread(&lump, sizeof lump, 1, fp); header.numlumps--)
    *n=='E' && n[2]=='M' && !n[4] ?
      n[1]=='4' ? ++ud : n[1]!='1' ? rg += n[1]=='3' || n[1]=='2' : ++sw :
    *n=='M' && n[1]=='A' && n[2]=='P' && !n[5] ?
      ++cm, sc += n[3]=='3' && (n[4]=='1' || n[4]=='2') :
    *n=='C' && n[1]=='A' && n[2]=='V' && !n[7] ? ++tnt :
    *n=='M' && n[1]=='C' && !n[3] && ++plut;
  return (y -= viewy, (x -= viewx) || y) ?
    x >= 0 ?
      y >= 0 ? 
        (x > y) ? tantoangle[SlopeDiv(y,x)] :                      // octant 0 
                ANG90-1-tantoangle[SlopeDiv(x,y)] :                // octant 1
        x > (y = -y) ? -tantoangle[SlopeDiv(y,x)] :                // octant 8
                       ANG270+tantoangle[SlopeDiv(x,y)] :          // octant 7
      y >= 0 ? (x = -x) > y ? ANG180-1-tantoangle[SlopeDiv(y,x)] : // octant 3
                            ANG90 + tantoangle[SlopeDiv(x,y)] :    // octant 2
        (x = -x) > (y = -y) ? ANG180+tantoangle[ SlopeDiv(y,x)] :  // octant 4
                              ANG270-1-tantoangle[SlopeDiv(x,y)] : // octant 5
    0;

Share this post


Link to post
Quasar said:

Lee is a great guy and he inspired me to start programming. But, he is (in)famous for leaving us gems like these (these are actual code segments from Eternity, I'm not making this up):

  for (ud=rg=sw=cm=sc=tnt=plut=0, header.numlumps = LONG(header.numlumps);
       header.numlumps && fread(&lump, sizeof lump, 1, fp); header.numlumps--)
    *n=='E' && n[2]=='M' && !n[4] ?
      n[1]=='4' ? ++ud : n[1]!='1' ? rg += n[1]=='3' || n[1]=='2' : ++sw :
    *n=='M' && n[1]=='A' && n[2]=='P' && !n[5] ?
      ++cm, sc += n[3]=='3' && (n[4]=='1' || n[4]=='2') :
    *n=='C' && n[1]=='A' && n[2]=='V' && !n[7] ? ++tnt :
    *n=='M' && n[1]=='C' && !n[3] && ++plut;
  return (y -= viewy, (x -= viewx) || y) ?
    x >= 0 ?
      y >= 0 ? 
        (x > y) ? tantoangle[SlopeDiv(y,x)] :                      // octant 0 
                ANG90-1-tantoangle[SlopeDiv(x,y)] :                // octant 1
        x > (y = -y) ? -tantoangle[SlopeDiv(y,x)] :                // octant 8
                       ANG270+tantoangle[SlopeDiv(x,y)] :          // octant 7
      y >= 0 ? (x = -x) > y ? ANG180-1-tantoangle[SlopeDiv(y,x)] : // octant 3
                            ANG90 + tantoangle[SlopeDiv(x,y)] :    // octant 2
        (x = -x) > (y = -y) ? ANG180+tantoangle[ SlopeDiv(y,x)] :  // octant 4
                              ANG270-1-tantoangle[SlopeDiv(x,y)] : // octant 5
    0;

Heh, Lee is my hero!

Share this post


Link to post
Quasar said:

Lee is a great guy and he inspired me to start programming. But, he is (in)famous for leaving us gems like these (these are actual code segments from Eternity, I'm not making this up):

  for (ud=rg=sw=cm=sc=tnt=plut=0, header.numlumps = LONG(header.numlumps);
       header.numlumps && fread(&lump, sizeof lump, 1, fp); header.numlumps--)
    *n=='E' && n[2]=='M' && !n[4] ?
      n[1]=='4' ? ++ud : n[1]!='1' ? rg += n[1]=='3' || n[1]=='2' : ++sw :
    *n=='M' && n[1]=='A' && n[2]=='P' && !n[5] ?
      ++cm, sc += n[3]=='3' && (n[4]=='1' || n[4]=='2') :
    *n=='C' && n[1]=='A' && n[2]=='V' && !n[7] ? ++tnt :
    *n=='M' && n[1]=='C' && !n[3] && ++plut;
  return (y -= viewy, (x -= viewx) || y) ?
    x >= 0 ?
      y >= 0 ? 
        (x > y) ? tantoangle[SlopeDiv(y,x)] :                      // octant 0 
                ANG90-1-tantoangle[SlopeDiv(x,y)] :                // octant 1
        x > (y = -y) ? -tantoangle[SlopeDiv(y,x)] :                // octant 8
                       ANG270+tantoangle[SlopeDiv(x,y)] :          // octant 7
      y >= 0 ? (x = -x) > y ? ANG180-1-tantoangle[SlopeDiv(y,x)] : // octant 3
                            ANG90 + tantoangle[SlopeDiv(x,y)] :    // octant 2
        (x = -x) > (y = -y) ? ANG180+tantoangle[ SlopeDiv(y,x)] :  // octant 4
                              ANG270-1-tantoangle[SlopeDiv(x,y)] : // octant 5
    0;




My favorite is still this:

   if(!(actor->flags & MF_FRIEND && P_LookForTargets(actor, false)) &&
      !((targ) &&  // haleyjd: removed assignment here
        targ->flags & MF_SHOOTABLE &&
        (P_SetTarget(&actor->target, targ),
         !(actor->flags & MF_AMBUSH) || P_CheckSight(actor, targ))) &&
      (actor->flags & MF_FRIEND || !P_LookForTargets(actor, false)))
         return;
It took me half a day to rewrite this in a way I could read that worked the same. And that for 7 lines of code...

Share this post


Link to post
chilvence said:

Eh...... what does that do? Or are you still trying to decrypt it :)?




The first code fragment checks for a few lump names in a wad to identify it.
The second one calculates the global angle of a line between 2 points and is just an ultra-compressed version of id's code.

Just for reference here's ZDoom's version of it which is
a) significantly more readable
b) creates much better code because some stuff that is repeated 8 times in Lee's version has been moved in front of the main body.

angle_t R_PointToAngle2 (fixed_t x1, fixed_t y1, fixed_t x, fixed_t y)
{
	x -= x1;
	y -= y1;

	if ((x | y) == 0)
	{
		return 0;
	}

	fixed_t ax = abs (x);
	fixed_t ay = abs (y);
	int div;
	angle_t angle;

	if (ax > ay)
	{
		swap (ax, ay);
	}
	div = SlopeDiv (ax, ay);
	angle = tantoangle[div];

	if (x >= 0)
	{
		if (y >= 0)
		{
			if (x > y)
			{ // octant 0
				return angle;
			}
			else
			{ // octant 1
				return ANG90 - 1 - angle;
			}
		}
		else // y < 0
		{
			if (x > -y)
			{ // octant 8
				return (angle_t)-(SDWORD)angle;
			}
			else
			{ // octant 7
				return ANG270 + angle;
			}
		}
	}
	else // x < 0
	{
		if (y >= 0)
		{
			if (-x > y)
			{ // octant 3
				return ANG180 - 1 - angle;
			}
			else
			{ // octant 2
				return ANG90 + angle;
			}
		}
		else // y < 0
		{
			if (x < y)
			{ // octant 4
				return ANG180 + angle;
			}
			else
			{ // octant 5
				return ANG270 - 1 - angle;
			}
		}
	}
}

Share this post


Link to post

Well I've heard the name but didn't really know who he was... Anyway, back to this:

Quasar said:

But, Nanami, I've seen a couple of your scripts that rival Lee Killough's best obfuscated C entries ^_^

Is that a good thing or a bad thing? =P

Share this post


Link to post

Can a mod take all the off topic zdoom coding posts and put them in a new thread or something? This started as an EDGE thread, and now look at it!

No offense or anything to you guys's coding skills.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×