Duke4.net Forums: Shadow Warrior - "New Episode" - Duke4.net Forums

Jump to content

  • 44 Pages +
  • « First
  • 15
  • 16
  • 17
  • 18
  • 19
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

Shadow Warrior - "New Episode"

User is offline   Lunick 

#481

View PostMark., on 14 June 2017 - 02:41 AM, said:

I'm confused now. I was under the impression that ICD's SW is his own project and that Hendricks will be working on VoidSW. So why is Hendricks worried about having to support ( bug fix ) ICD's project? Or does Hendricks mean he doesn't like the way something is being handled by using the phrase "not support it"?

When the exe is run, it says VoidSW so I guess the base was Hendricks' code.
0

User is offline   Mark 

#482

Ohhh...I never noticed that. I thought ICD was freelancing. :P
0

#483

I am freelancing :P. I thought it was common knowledge that I used whatever code that is in the eduke32 svn as a base for what I'm doing. I do hope to get my code merged back into eduke32 main at somepoint, and I'm sure I will fight with Hendricks on what goes in and what doesn't :P. So lets get to the meat of this argument and that is the scripting system.

View PostHendricks266, on 13 June 2017 - 09:06 PM, said:

You can't simultaneously slap together a public-facing scripting API in dire need of proper speccing while encouraging modders to make stuff with it. I recommend labeling your Lua API a proof of concept or public experiment, because there's no way I'm supporting huge lists of hardcoded constant IDs. (They're not the only problem.)

There are absolutely no shortcuts to doing this right, and your experience in AAA development has not prepared you for the task.


Here is how I'm approaching the problem. If I was going to hand off development of a game using this codebase to non engineering types what kind of shit would they need? For my 3rd episode mod what kind of stuff do I need to complete the task? I'm moving names.h/names2.h out to lua so I don't have duplicate data in scripts and in code. If I want to have some code like this:

SpawnSprite(MEDKIT)


I don't want to have MEDKIT defined in code and in script. That is sloppy and leads to people making bad mistakes. The constants are already there Evan, I'm just copying them out to Lua, changing syntax, and hooking up everything in code.

I would love to flush out the script system, do you have any insights on how you see scripting in SW?
1

User is offline   Forge 

  • Speaker of the Outhouse

#484

View PostHendricks266, on 13 June 2017 - 09:06 PM, said:

your experience in AAA development has not prepared you for the task.

how else is he supposed to get experience?
some people need to stick their hand on a burner to find out what 'hot' is.
1

User is offline   Forge 

  • Speaker of the Outhouse

#485

View PostHendricks266, on 13 June 2017 - 01:39 PM, said:

Isn't there a similar bug also in the original game where the bosses in Wanton Destruction don't spawn on the lower difficulty levels?

played wanton (original on dosbox) for a couple maps on tiny grasshopper - the serpent god appears

This post has been edited by Forge: 14 June 2017 - 07:33 AM

0

User is offline   Hank 

#486

View Posticecoldduke, on 14 June 2017 - 05:18 AM, said:

I don't want to have MEDKIT defined in code and in script.

Posted Image
Speaking of medical kits, they are ready for an inevitable long and tough fight. Hospital care, doctors and nurses are extra.
1

#487

View PostHank, on 14 June 2017 - 08:20 AM, said:

Posted Image
Speaking of medical kits, they are ready for an inevitable long and tough fight. Hospital care, doctors and nurses are extra.

Thats a really sexy medkit :P.

This post has been edited by icecoldduke: 14 June 2017 - 10:41 AM

0

User is offline   Hank 

#488

View Posticecoldduke, on 14 June 2017 - 10:40 AM, said:

Thats a really sexy medkit :P.

This is not my work! Just trying to loosen the tension between hard core programmers. :P

This post has been edited by Hank: 14 June 2017 - 11:30 AM

0

User is offline   Hendricks266 

  • Weaponized Autism

  #489

View PostLunick, on 14 June 2017 - 03:06 AM, said:

When the exe is run, it says VoidSW

This needs to change.
0

User is offline   Master O 

#490

View PostHendricks266, on 14 June 2017 - 12:36 PM, said:

This needs to change.


I propose it be renamed to "Hendricks266.exe."
2

User is offline   Danukem 

  • Duke Plus Developer

#491

View PostMaster O, on 14 June 2017 - 01:15 PM, said:

I propose it be renamed to "Hendricks266.exe."


Posted Image
2

User is offline   Lunick 

#492

View PostHendricks266, on 14 June 2017 - 12:36 PM, said:

This needs to change.

I should say, it used to say VoidSW. It just says Shadow Warrior now.
0

#493

View PostLunick, on 14 June 2017 - 02:12 PM, said:

I should say, it used to say VoidSW. It just says Shadow Warrior now.

If you go into taskmgr it says voidSW. I haven't changed the branding of the exe from the code I got from the eduke32 svn. Per Hendricks request I will change the branding.
0

User is offline   Forge 

  • Speaker of the Outhouse

#494

it's better than it was before, but it still behaves as if the player has parkinson's disease in this vault room

http://www.mediafire...6-38-21-241.mp4
0

User is offline   Hank 

#495

This is in regards to the editor:
3D mode does not update texture's scale. So you need to be in game to see if a given textures looks right or not.

Also, does anyone have all the key commands applicable for Shadow Warrior editor? Then I will have more comments.
0

User is offline   Master O 

#496

View PostTrooper Dan, on 14 June 2017 - 01:21 PM, said:

Posted Image


Simply joking. Hendricks said the name of the exe had to change, so I made a joking suggestion.

TrooperDan.exe works, too.

This post has been edited by Master O: 14 June 2017 - 04:28 PM

1

#497

View PostHank, on 14 June 2017 - 03:55 PM, said:

This is in regards to the editor:
3D mode does not update texture's scale. So you need to be in game to see if a given textures looks right or not.

Also, does anyone have all the key commands applicable for Shadow Warrior editor? Then I will have more comments.

With the exception of tag editing, everything else works the same as mapster.
0

User is offline   Hank 

#498

View Posticecoldduke, on 14 June 2017 - 05:36 PM, said:

With the exception of tag editing, everything else works the same as mapster.

Ah hah! I missed the new polymer check box.

The textures do not get updated in polymer mode, in normal mode (polymer unchecked) everything works.

Also, the file description still reads VoidSW. My proposal is to change it to FullSW, the antonyms.
0

User is offline   Forge 

  • Speaker of the Outhouse

#499

yellow key displays additional odd behavior other than being 1-sided
it also doesn't insert into the lock as the other keys do

http://www.mediafire...9-16-21-870.mp4
0

User is offline   Forge 

  • Speaker of the Outhouse

#500

View PostHank, on 14 June 2017 - 06:05 PM, said:

Also, the file description still reads VoidSW. My proposal is to change it to FullSW, the antonyms.

i like ICDSW
i see 'D' SW

because we know the 'D" fills the void.
0

User is offline   Hank 

#501

View PostForge, on 14 June 2017 - 06:22 PM, said:

i like ICDSW
i see 'D' SW

because we know the 'D" fills the void.

I was not being sardonic.
I still hope that the Eduke32 team will help ICD during his project, and thus will get a full workable Shadow Warrior section in return; for all of us hobby game stuff doers. :P
0

User is offline   Forge 

  • Speaker of the Outhouse

#502

View PostHank, on 14 June 2017 - 06:43 PM, said:

I was not being sardonic.

I only deserve half credit for being 'sardonic'.
If you want to waste your time, scroll back though this thread and you can find posts where I was calling this project the icdsw port - to differentiate when I was talking about the game behavior aspects of this port, redux, or dos-based shadow warrior ports.

I like the cut of your jib, though

This post has been edited by Forge: 14 June 2017 - 07:33 PM

1

#503

Some more progress, I exported the weapon tables to user.lua.
1

#504

I took a brief look at the source code and I would like to point out that there are some questionable choices with your implementation of Lua.

I noticed that in order to include scripts, you use a preprocessing pass that looks for #include directives. This is a very bad thing for a number of reasons.
  • The hash character has syntactic purpose in Lua, it is used to retrieve the length of a table. The way you currently handle things (string substitution) will break any Lua code that uses this functionality on a variable named 'include'. The same issue goes for any other directives you add while the hash character is used to denote them. If you absolutely must add a preprocessing pass (which you don't if you just want to include scripts), use a character like @ instead of # (and write a proper preprocessor for this, instead of performing string substitution).
  • Lua has a function called 'require' that is used specifically for the purpose of including scripts. You can override it to provide your own functionality, too. If you don't like the name 'require' you can even alias it to 'include'. Using require works like so:
    require "swdata/scripts/user.lua"


I'd recommend dealing with these issues long before you plan to make a public release including Lua scripting.
4

#505

*removed*

This post has been edited by icecoldduke: 15 June 2017 - 05:09 AM

0

#506

In the latest CL I am now using require :P.

Any more questionable lua choices that you saw ZombieKiller?

This post has been edited by icecoldduke: 15 June 2017 - 05:10 AM

0

#507

View Posticecoldduke, on 15 June 2017 - 04:52 AM, said:

In the latest CL I have removed the shitty attempt at creating a preprocessor and I am now using require(the issue I had before was I forgot the script language automatically appends .lua when loading scripts via require :/).

Any more questionable lua choices that you saw ZombieKiller?

I didn't really look much further after seeing the issues I previously mentioned. As for the auto-appending of .lua, that can be configured via setting the package.path variable. It is a string containing a list of semi-colon separated paths. In each path, a ? would be replaced by the value used with the require() function. For example, if you set package.path to "swdata/?;swdata/?.lua;?;?.lua", then require will look for the script under swdata (with or without .lua appended), and then search in the root if it didn't find it there.

Alternatively you can replace the require() function entirely with your own (which you would have to do if you used a virtual filesystem for packaging mods into zip files or some other format, for example).

This post has been edited by TheZombieKiller: 15 June 2017 - 05:14 AM

2

#508

Thanks for the info. Its been a long time since I've used the base LUA implementation(every project I've been on thats used Lua has heavily modified the implementation in one or way or another), if you find anything else that I've done thats retarded please let me know :P.

This post has been edited by icecoldduke: 15 June 2017 - 07:45 AM

1

#509

This one's more of a curiosity if anything. How come level information is stored like this:
-- Game Maps listed out invididually(LevelName, SongName, Description, BestTime ParTime)
level_0_info =	{"title.map",      "theme.mid", " ", " ", " "  }
level_1_info =  {"$bullet.map",    "e1l01.mid", "Seppuku Station", "0 : 55", "5 : 00"  }
level_2_info =  {"$dozer.map",     "e1l03.mid", "Zilla Construction", "4 : 59", "8 : 00"  }
level_3_info =  {"$shrine.map",    "e1l02.mid", "Master Leep's Temple", "3 : 16", "10 : 00"  }
level_4_info =  {"$woods.map",     "e1l04.mid", "Dark Woods of the Serpent", "7 : 06", "16 : 00"  }
level_5_info =  {"$whirl.map",     "yokoha03.mid", "Rising Son", "5 : 30", "10 : 00"   }
level_6_info =  {"$tank.map",      "nippon34.mid", "Killing Fields", "1 : 46", "4 : 00"   }
level_7_info =  {"$boat.map",      "execut11.mid", "Hara-Kiri Harbor", "1 : 56", "4 : 00"   }
level_8_info =  {"$garden.map",    "execut11.mid", "Zilla's Villa", "1 : 06", "2 : 00"   }
level_9_info =  {"$outpost.map",   "sanai.mid",    "Monastery", "1 : 23", "3 : 00"      }
level_10_info =  {"$hidtemp.map",   "kotec2.mid",   "Raider of the Lost Wang", "2 : 05", "4 : 10"     }
level_11_info =  {"$plax1.map",     "kotec2.mid",   "Sumo Sky Palace", "6 : 32", "12 : 00"     }
level_12_info =  {"$bath.map",      "yokoha03.mid", "Bath House", "10 : 00", "10 : 00"   }
level_13_info =  {"$airport.map",   "nippon34.mid", "Unfriendly Skies", "2 : 59", "6 : 00"   }
level_14_info =  {"$refiner.map",   "kotoki12.mid", "Crude Oil", "2 : 40", "5 : 00"   }
level_15_info =  {"$newmine.map",   "hoshia02.mid", "Coolie Mines", "2 : 48", "6 : 00"   }
level_16_info =  {"$subbase.map",   "hoshia02.mid", "Subpen 7", "2 : 02", "4 : 00"   }
level_17_info =  {"$rock.map",      "kotoki12.mid", "The Great Escape", "3 : 18", "6 : 00"   }
level_18_info =  {"$yamato.map",    "sanai.mid",    "Floating Fortress", "11 : 38", "20 : 00"      }
level_19_info =  {"$seabase.map",   "kotec2.mid",   "Water Torture", "5 : 07", "10 : 00"     }
level_20_info =  {"$volcano.map",   "kotec2.mid",   "Stone Rain", "9 : 15", "20 : 00"     }
level_21_info =  {"$shore.map",     "kotec2.mid",   "Shanghai Shipwreck", "3 : 58", "8 : 00"     }
level_22_info =  {"$auto.map",      "kotec2.mid",   "Auto Maul", "4 : 07", "8 : 00"     }
level_23_info =  {"tank.map",       "kotec2.mid",   "Heavy Metal (DM only)", "10 : 00", "10 : 00"     }
level_24_info =  {"$dmwoods.map",   "kotec2.mid",   "Ripper Valley (DM only)", "10 : 00", "10 : 00"     }
level_25_info =  {"$dmshrin.map",   "kotec2.mid",   "House of Wang (DM only)", "10 : 00", "10 : 00"     }
level_26_info =  {"$rush.map",      "kotec2.mid",   "Lo Wang Rally (DM only)", "10 : 00", "10 : 00"     }
level_27_info =  {"shotgun.map",    "kotec2.mid",   "Ruins of the Ronin (CTF)", "10 : 00", "10 : 00"     }
level_28_info =  {"$dmdrop.map",    "kotec2.mid",   "Killing Fields (CTF)", "10 : 00", "10 : 00"     }


Instead of like this?:

-- Game maps listed out invididually
levels =
{
    --       Level Name,     Song Name,      Description,                 Best Time  Par Time
    [ 0] = { "title.map",    "theme.mid",    " ",                         " ",       " "       },
    [ 1] = { "$bullet.map",  "e1l01.mid",    "Seppuku Station",           "0 : 55",  "5 : 00"  },
    [ 2] = { "$dozer.map",   "e1l03.mid",    "Zilla Construction",        "4 : 59",  "8 : 00"  },
    [ 3] = { "$shrine.map",  "e1l02.mid",    "Master Leep's Temple",      "3 : 16",  "10 : 00" },
    [ 4] = { "$woods.map",   "e1l04.mid",    "Dark Woods of the Serpent", "7 : 06",  "16 : 00" },
    [ 5] = { "$whirl.map",   "yokoha03.mid", "Rising Son",                "5 : 30",  "10 : 00" },
    [ 6] = { "$tank.map",    "nippon34.mid", "Killing Fields",            "1 : 46",  "4 : 00"  },
    [ 7] = { "$boat.map",    "execut11.mid", "Hara-Kiri Harbor",          "1 : 56",  "4 : 00"  },
    [ 8] = { "$garden.map",  "execut11.mid", "Zilla's Villa",             "1 : 06",  "2 : 00"  },
    [ 9] = { "$outpost.map", "sanai.mid",    "Monastery",                 "1 : 23",  "3 : 00"  },
    [10] = { "$hidtemp.map", "kotec2.mid",   "Raider of the Lost Wang",   "2 : 05",  "4 : 10"  },
    [11] = { "$plax1.map",   "kotec2.mid",   "Sumo Sky Palace",           "6 : 32",  "12 : 00" },
    [12] = { "$bath.map",    "yokoha03.mid", "Bath House",                "10 : 00", "10 : 00" },
    [13] = { "$airport.map", "nippon34.mid", "Unfriendly Skies",          "2 : 59",  "6 : 00"  },
    [14] = { "$refiner.map", "kotokil2.mid", "Crude Oil",                 "2 : 40",  "5 : 00"  },
    [15] = { "$newmine.map", "hoshia02.mid", "Coolie Mines",              "2 : 48",  "6 : 00"  },
    [16] = { "$subbase.map", "hoshia02.mid", "Subpen 7",                  "2 : 02",  "4 : 00"  },
    [17] = { "$rock.map",    "kotokil2.mid", "The Great Escape",          "3 : 18",  "6 : 00"  },
    [18] = { "$yamato.map",  "sanai.mid",    "Floating Fortress",         "11 : 38", "20 : 00" },
    [19] = { "$seabase.map", "kotec2.mid",   "Water Torture",             "5 : 07",  "10 : 00" },
    [20] = { "$volcano.map", "kotec2.mid",   "Stone Rain",                "9 : 15",  "20 : 00" },
    [21] = { "$shore.map",   "kotec2.mid",   "Shanghai Shipwreck",        "3 : 58",  "8 : 00"  },
    [22] = { "$auto.map",    "kotec2.mid",   "Auto Maul",                 "4 : 07",  "8 : 00"  },
    [23] = { "tank.map",     "kotec2.mid",   "Heavy Metal (DM only)",     "10 : 00", "10 : 00" },
    [24] = { "$dmwoods.map", "kotec2.mid",   "Ripper Valley (DM only)",   "10 : 00", "10 : 00" },
    [25] = { "$dmshrin.map", "kotec2.mid",   "House of Wang (DM only)",   "10 : 00", "10 : 00" },
    [26] = { "$rush.map",    "kotec2.mid",   "Lo Wang Rally (DM only)",   "10 : 00", "10 : 00" },
    [27] = { "shotgun.map",  "kotec2.mid",   "Ruins of the Ronin (CTF)",  "10 : 00", "10 : 00" },
    [28] = { "$dmdrop.map",  "kotec2.mid",   "Killing Fields (CTF)",      "10 : 00", "10 : 00" },
}


This would allow you to eliminate the numGameLevels variable, since you could use #levels to get the length of the levels table.
(Although it'd probably be better to begin with 1 instead of 0 or omit the explicit indexes entirely, as Lua indexes are 1-based instead of 0-based)

Similarly, episodes could be defined like this

episodes =
{
    [1] =
    {
        name = "^Enter the wang",
        subtitle = "Four levels (Shareware Version)",
        startlevel = 1
    },
    
    [2] =
    {
        name = "^Code of honor",
        subtitle = "Eighteen levels (Full Version Only)",
        startlevel = 5
    },
}


This post has been edited by TheZombieKiller: 15 June 2017 - 08:36 AM

2

#510

I have been moving data out of header files directly into Lua. For big data dumps using Lua tables would be a pain in the ass because there are so many entries. Heres a example.

Take a look at the original digi.h, untouched digi.h. (https://github.com/j...ster/src/digi.h)

Original digi.h
// NULL Entry used to detect a sound's presence in sprite attrib structs.
DIGI_ENTRY("NULL.VOC",      DIGI_NULL,              0,      0,                    0,      0, 0, DIST_NORMAL, VF_NORMAL )

// SWORD
DIGI_ENTRY("SWRDSTR1.VOC",  DIGI_SWORDSWOOSH,       1,      PRI_HI_PLAYERWEAP,    -200,   200, 0, DIST_NORMAL, VF_NORMAL )

// SHURIKEN
DIGI_ENTRY("THROW.VOC",     DIGI_STAR,              2,      PRI_HI_PLAYERWEAP, -100,    100, 0, DIST_NORMAL, VF_NORMAL )
DIGI_ENTRY("STRCLNK.VOC",   DIGI_STARCLINK,         3,      PRI_PLAYERAMBIENT,    0,      0, 0, DIST_NORMAL, VF_NORMAL )
//DIGI_ENTRY("STRWIZ.VOC",    DIGI_STARWIZ,           4,      PRI_LOW_PLAYERWEAP,   0,      0, 0, DIST_NORMAL, VF_LOOP )
DIGI_ENTRY("NULL.VOC",      DIGI_NULL_STARWIZ,      4,      PRI_LOW_PLAYERWEAP,   0,      0, 0, DIST_NORMAL, VF_LOOP )

...


Now look and see how I transposed that monolithic data table over to Lua.

-- Sound entries
addsoundentry("NULL.VOC",      DIGI_NULL,          0,                    0,      0, 0, DIST_NORMAL, VF_NORMAL)

-- SWORD
addsoundentry("SWRDSTR1.VOC",  DIGI_SWORDSWOOSH,   PRI_HI_PLAYERWEAP,    -200,   200, 0, DIST_NORMAL, VF_NORMAL)

-- SHURIKEN
addsoundentry("THROW.VOC",     DIGI_STAR,          PRI_HI_PLAYERWEAP, -100,    100, 0, DIST_NORMAL, VF_NORMAL)
addsoundentry("STRCLNK.VOC",   DIGI_STARCLINK,     PRI_PLAYERAMBIENT,    0,      0, 0, DIST_NORMAL, VF_NORMAL)
--addsoundentry("STRWIZ.VOC",    DIGI_STARWIZ,       PRI_LOW_PLAYERWEAP,   0,      0, 0, DIST_NORMAL, VF_LOOP )
addsoundentry("NULL.VOC",      DIGI_NULL_STARWIZ,  PRI_LOW_PLAYERWEAP,   0,      0, 0, DIST_NORMAL, VF_LOOP)

-- UZI
addsoundentry("UZIFIRE1.VOC",  DIGI_UZIFIRE,       PRI_HI_PLAYERWEAP,    0,      0, 0, DIST_NORMAL, VF_NORMAL)

...


A lot of Shadow Warriors data is defined in a similar manner, which is why I choose this approach. For smaller data types such as episodes and levels I agree using tables are better. Originally I felt if I used tables then some data entries would feel out of place then other data entires(because tables look a fuck ton more organized, and converting monolithic macro tables to lua tables would be way too time consuming). What do you think?

This post has been edited by icecoldduke: 15 June 2017 - 09:28 AM

1

Share this topic:


  • 44 Pages +
  • « First
  • 15
  • 16
  • 17
  • 18
  • 19
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic


All copyrights and trademarks not owned by Voidpoint, LLC are the sole property of their respective owners. Play Ion Fury! ;) © Voidpoint, LLC

Enter your sign in name and password


Sign in options