Duke4.net Forums: Trooper Dan - Viewing Profile - Duke4.net Forums

Jump to content

Hide message Show message
Welcome to the Duke4.net Forums!

Register an account now to get access to all board features. After you've registered and logged in, you'll be able to create topics, post replies, send and receive private messages, disable the viewing of ads and more!

Reputation: 2554 My posts turn threads into gold
Super Moderator
Active Posts:
7,322 (1.8 per day)
Most Active In:
Everything EDuke32 (3395 posts)
28-January 07
Profile Views:
Last Active:
User is online 32 minutes ago
Viewing Board Index

My Information

Member Title:
Duke Plus Developer
Age Unknown
Birthday Unknown
Male Male

Contact Information

Click here to e-mail me
MSN  deeper-thought@hotmail.com
Website URL:
Website URL  http://fissile.duke4.net/index.html

Latest Visitors

Topics I've Started

  1. Compiler bug?

    10 March 2018 - 01:52 PM

    Apparently if you define a sound as having a number > 4095, you get a compiler error that you have exceeded 4096 sounds. I discovered this because I accidentally defined a sound with an extra digit:

    define SQUISHED4 9899
    definesound SQUISHED4 moresounds/squished4.ogg 0 128 16 0 0

    So even though my project has < 1000 sounds, it wouldn't let me compile because of the particular number I picked. I imagine this could be very misleading if you were actually pretty close to the 4096 limit, but you had skipped some numbers when defining sounds. In that case you might think you had actually gone over the limit.
  2. Old maps broken by new channel limitation

    05 March 2018 - 11:23 PM


    See post linked above
  3. Black Panther

    18 February 2018 - 12:36 AM

    Today I saw the Black Panther at an Imax theater. This is a pretty decent film for its genre (superhero action movie) but it is not nearly as good as you have been told it is. Visually it is a feast for the eyes. The action scenes are well-executed and mildly entertaining, although sometimes frustrating to watch due to tight shots and too many cuts. In fairness, the action scenes would have been considered astonishing back when I grew up, in the days before high quality CG and and video games. But those days are gone, and we are harder to impress. The acting is good. It's fine; they are good actors who act like they are supposed to act. But none of the performances are particularly memorable. The story is..ok. Black Panther has a very safe, by-the-numbers script without a lot of surprises. The film lacks the cast chemistry and humor that typifies other MCU films. The contrast between Black Panther and the recent Thor Ragnarok in this respect could not be greater -- Ragnarok is a successful comedy with occasional touches of drama, whereas Black Panther takes itself completely seriously from beginning to end. The film does have a message. It's a bland, politically correct but relatively inoffensive message about how it's good to help oppressed people by being nice to them and giving them good stuff. According to the film, the other two options regarding oppressed people are (1) ignoring them and (2) handing them guns and hoping for the best. By the time this message became clear, I was too bored with the narrative to muster any annoyance at the obvious straw men and assumptions supporting the film's ideological bias.

    My score: 6.5 / 10
  4. Enemy Coding Tutorial

    31 January 2018 - 02:23 AM

    Hey everyone, for many years I have thought about making a coding tutorial for enemies in Duke 3D, but never did it. The time is now! I will make this tutorial as I code the Cyber-Enforcer boss with sprites by sebabdukeboss20. I chose this one because I feel that the enemy will be pretty standard without a lot of weird stuff, which makes it good tutorial fodder. If I were doing this without the tutorial, the process would be pretty quick, but since I am doing it this way it will be a much more drawn out process. I anticipate that writing the tuturial will take much longer than the actual coding. Feel free to reply in this thread and ask questions.

    Tutorial Scope
    This tutorial will show how to code an enemy for EDuke32 in the CON scripting language by walking through a series of general steps that build up a typical enemy from scratch.
    We already have a wiki that documents all the CON commands with some examples of how to use them, so I'm not going to dwell on how to use individual commands. However, aspiring CON coders (maybe as many as a dozen in the last 10 years!) sometimes get overwhelmed with the giant list of commands and don't know where to start.

    I assume that you have a basic working knowledge of EDuke32 and Duke Nukem 3D: you know what a CON file is, you know what Mapster is, you know what a tile number is, and various other basic facts (trying to list them all would be a project in itself).
    I assume that the art for your enemy is already accessible in game. This means that you can go into Mapster and you can view the tiles for the enemy. I also assume that the tiles have been arranged properly for coding. This means that there is a series of animations with various frames and angles, and they are in an order corresponding to some viewtype useable by the action command. In most cases this will be viewtype 5, which is used by pigcop, lizman, etc.
    I assume that you have the ability to open up CON files, create them and edit them using the editor of your choice.

    Ok let's go!


    Your enemy is going to be an "actor", and the actor is identified with the tile number you define it on. A definition is just a label that you can use in place of a number. In most cases it makes sense to define your enemy as the first tile of its walking animation. If you plan to have a stayput version of the enemy, it is traditionally defined on the very next tile (see the DEFS.CON from the base game). If there are other actors associated with your new enemy and they are not yet defined in the game, then you should define them as well. It's also a good idea to define the health amount(s) for your new enemy -- you could just type in the numbers directly in the actor declaration, but using labels makes it easier for people to edit.

    In my case I have this to start with:

    define LIZBOSS 5185
    define LIZMINE 5246
    define LIZBOSSSTRENGTH 5000

    Depending on how your files are organized, you might want your definitions for different types of things to be in different files. In the base game, you will find the tile number definitions in DEFS.CON, and you will find enemy strength amounts in USER.CON.

    An important note about hitboxes: The hitbox dimensions of your enemy will be determined by the dimensions of tile that you define it on. The cyber-enforcer tile 5185 has dimensions 116x115, which makes the hitbox essentially a square. The square will be bigger or smaller depending on how large or small the enemy is in game (xrepeat and yrepeat values), but those dimensions will not change depending on the animation displayed. If there is an animation where the enemy is lying down, it will have exactly the same hitbox as when it was standing up. This has important implications that will warrant more discussion, but for now let's move on.

    There are special flags we can set on our tiles to globally change how those tiles behave. This is done via the spriteflags command. These flags should be set after the definitions but before the actor code. Here is what I am using for the cyber enforcer:

    spriteflags LIZBOSS 5251072


    The action command has two distinct uses. When used outside of an actor declaration, it defines an animation. When used inside an actor declaration, it causes the actor to initiate the animation of the same name that had been defined earlier. The first thing I do when starting to code an enemy is define all of its animations. The next thing I do is write a simple block of code that will enable me to easily view them all in game. This step is crucial, because I want to make sure that all of the animations are correct before going forward. Any flaws in the frames, animation definitions, speed and offsets will become obvious. If you skip this step and go straight to making the enemy move around, shoot etc., then it will be harder to notice and correct animation problems.

    Here is the code that I made for my animation test:

    action ALIZBOSSWALKING     	0   4  5  1  22
    action ALIZBOSSRUNNING     	0   4  5  1  14
    action ALIZBOSSSTARTSHOOT	20  1  5  1  20
    action ALIZBOSSSHOOTING		25  2  5  1  5
    action ALIZBOSSFLY      	35  1  5  1  10
    action ALIZBOSSFALL      	35  1  5  1  10
    action ALIZBOSSSTAND     	40  1  5  1  10
    action ALIZBOSSSQUAT     	45  1  5  1  60
    action ALIZSQUATDONE		50  1  5  1  30
    action ALIZBOSSFROZEN     	50  1  5  1  10
    action ALIZBOSSFLINTCH 		55  1  1  1  10
    action ALIZBOSSDYING     	55  6  1  1  20
    action ALIZBOSSLYINGDEAD   	60  1  1  1  10
    ifaction 0
    	ifspritepal 0 sizeat 96 80 else sizeat 48 40
    ifhitspace ifcount 10
    	ifaction ALIZBOSSSHOOTING action ALIZBOSSFLY else
    	ifaction ALIZBOSSFLY action ALIZBOSSSTAND else
    	ifaction ALIZBOSSSTAND action ALIZBOSSSQUAT else
    	ifaction ALIZBOSSSQUAT action ALIZSQUATDONE else

    At the top we have the action declarations which define the animations. Below that is the actor declaration and code, followed by enda to signify the end of the actor's code.
    The first block after the useractor declaration detects when the actor has no assigned animation (action) and assigns it the walking animation. The next block will cycle from one animation to the next if the player presses the action key and it has been 10 tics since the last press. With this done, you can place the enemy sprite in a map or spawn it from the console in game, then walk around it and inspect how the animations look. The result can be seen in the video below.

    What I found is that JBlade had already done a good job of setting offsets on the tiles, which is why you don't see the cyber enforcer wiggling oddly left, right, up or down. I did find a few pink pixels in the lying dead frame, which I then fixed (if you look carefully you can see the pink pixels in the video).

    A few notes about defining actions: It is normal to have multiple actions which use exactly the same frames of animation. Typically, walking and running are identical except for the final parameter of the action, which determines animation speed (the lower the number, the less lag between frames). It is also normal to have multiple actions which are identical in every way except for having different names. This is handy because they can be used when you assign them and check them. "ifaction ALIZBOSSFLY" will have a different value than "ifaction ALIZBOSSFALL" even though what the actions display is identical. As a rule of thumb, if an animation is going to be used for more than one purpose, then go ahead and define it multiple times with different actions corresponding to the different purposes. If it turns out you didn't use them all, you can always delete them later.
  5. Sebabdukeboss20 Enemies Ready for EDuke32 Projects

    28 January 2018 - 04:38 PM

    PIGCOP BOSS and CYBER ENFORCER BOSS version .90 .92, February 3, 2018
    sprites by sebabdukeboss20, code by Dan Gaskill
    thanks to JBlade for extracting and arranging sprites


    Instructions: Dump all included files into a virgin vanilla Duke 3D folder with the most recent version of EDuke32 in it. The included EDUKE.CON will load the code for the new boss. All the code for it is actually in the PIGBOSS.CON file, and you are free to copy it and modify it into whatever project you want. Obviously, you need to pay attention to things like the path in the sound definitions and the CON load order if you move shit around. The code is mostly standalone, but it does use state standard_jibs, so it has to load after that. This boss supports standard Duke 3D features such as being freezable, shrinkable, and respawning on DIG difficulty. EDIT: minor update, now works properly with expander

    The PIGBOSS is tile 5120. Pal 0 is big and tough, other pal variants are smaller and less tough. I did not make it end the game when you kill it, since in most cases that is not desirable (a trivial addition if anyone wanted that though). Tile 5121 will make it stayput in a sector. It will work that way but it is is not optimized for that.

    I will update this post later with more notes. In the meantime, a caution: While I will fix reported bugs, I can verify that the boss works with the most recent Eduke32. Since this is intended for creators to use in their projects, it is assumed you have a basic knowledge of how to put something in the game. I will not be sympathetic to people posting about how they can't get it to work if they are not following directions and seem to have no knowledge of how the game works, and I may even delete such posts.


    Some Notes on the Pigcop Boss

    This is a relatively barebones version because it is made to be compatible with vanilla Duke 3D or ported to other projects. Extra bells and whistles may not be desirable in a given project, or they may require putting code in various places (such as the player, the hud or other enemies) that would complicate porting the enemy. One obvious example would be giving the pigcop boss a shout that buffed nearby pigcops and/or had a status effect on the player. Another example would be giving the boss some pathfinding AI. On the cosmetic side, it would be nice to have some effects sprites (e.g. for when he hits the ground) -- but the project it is ported to might already have good sprites or systems in place for stuff like that. One feature I did want to include, though, but ended up leaving out was having it fire a modified mortar from one of its barrels. The reason I didn't is, no matter what offset I put on the projectile definition, I could not get the projectile to spawn on the correct side of the boss sprite, despite following the directions in the wiki on PROJ_OFFSET. I know a hackish way around this, but it was too hackish for this project.

    From a gameplay coding standpoint, what makes the pigcop boss interesting is that the sprites have not only a firing animation, but also melee, roar, taunt and stomp. I ended up not using the stomp, but if it were added I would recommend putting it in as a random variation on the taunt. If you are coding an enemy you have to think about the enemy in terms of both presentation and gameplay. If an enemy looks amazing with varied animations, but the player is able to cheese it and kill it without the enemy being able to do much, then all that work on animations is wasted. Likewise, if you code an attack for the enemy, but the player is never going to be in a situation where the enemy would use it, then it was a waste of effort. In the case of the pigcop boss, this presents something of a problem because: (1) taunt and roar animations make the boss helpless, possibly giving the player quick kill opportunities, and (2) the player will generally try to avoid getting near the boss on general principle, making it unlikely that the melee can be used. My solutions were (1) give the boss damage resistance during the taunt and roar animations, and (2) make the boss sprint towards the player and use the melee offensively. Then it was just a question of balancing the elements properly, so the boss still threatens with a normal gun attack, and taunts/roars enough but not too much. The knockback effect on the melee is based on a force push that I coded for Duke Forces. It makes the attack seem powerful, but also it moves the player away to allow for a reset so the boss doesn't spam melee.


Page 1 of 1
  1. Photo 27 May 2012 - 06:52
    Can you please release just the AI part of DukePlus so we can run it with the latest eDuke? Thanks!
  2. Photo 19 Aug 2011 - 20:12
    tanks for the support dan! here is "daniel"! (from the msn) =)
  3. Photo 11 Jul 2011 - 11:45
    I can give beta-testing a shot. I have no distractions, just the limitation on how long my back can hold out.
Page 1 of 1

All copyrights and trademarks are property of their respective owners. Yes, our forum uses cookies. © 2017 Voidpoint, LLC

Enter your sign in name and password

Sign in options