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: 2256 My posts turn threads into gold
Super Moderator
Active Posts:
7,112 (1.79 per day)
Most Active In:
Everything EDuke32 (3270 posts)
28-January 07
Profile Views:
Last Active:
User is offline Today, 02:12 PM

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. Messed up compiler warnings

    14 October 2017 - 01:01 AM

    I'm noticing lately that sometimes the compiler warnings are messed up. I think this has been happening with errors, too, but I don't have an example for those. Here's an example for a warning:

    what it says in the log:
    BOTCONTROL.CON: In state `turnwaitcode':
    BOTCONTROL.CON:3528: warning: malformed `gettextureceiling' branch

    The actual code:

    state turnwaitcode
    	ife botturnwait TURNWAIT // bot just entered a new sector
    		getangle tempang xcoord ycoord
    		getincangle botang tempang botgoalang
    		// don't wait to turn if it's a small amount
    		ifg botang -512 ifl botang 512 set botturnwait 2
    			set temp currwalldist
    			shiftr temp 10
    			ifl temp 2 set temp 2
    			ifg temp TURNWAIT set temp TURNWAIT
    			ifl forwscandist 2048 div temp 2
    			set botturnwait temp
    			// al botturnwait
    		ifl botturnwait 2 set botturnwait 2
    	ifg botturnwait 0 sub botturnwait 1
    	ife facewall 0

    The problem is on the very last line of the state. It's a malformed line (a fragment which accidentally got left in), but it has nothing to do with gettextureceiling.

    I can post other examples when I find them if that would be helpful.
  2. Sector locking

    30 September 2017 - 11:28 PM

    I need to be able to monitor moving sectors which contain ACTIVATOR or ACTIVATORLOCKED and determine whether the sector will operate when the player presses space. I figure that there must be a member, either in the sector itself or in the locking sprite which can tell me whether the sector is currently usable, but so far I haven't found anything. For example, I monitored an ACTIVATOR before and after the button press that activates its sector, and could not detect any changes in the ACTIVATOR sprite.

    Please help!
  3. DukeThought

    17 September 2017 - 03:50 AM

    For a long time I have mused about making a bot for Duke 3D that is capable of playing the game well enough to beat real levels without cheating. Starting on September 4 I finally got around to working on it, and I have been making slow and steady progress a little each day in my spare time. The bot works by manipulating an actual player actor -- either player 1 in single player, or player 2 in coop. It will have applications for both real and fake multiplayer. Eventually, I may remake my "Duke Nukem Arena" mod using the bot as the foundation. The bot has access to complete information about the game world, but otherwise is not allowed to cheat or do anything that a human player could not do.

    This is a big project and I expect it will be a long time before my bot is capable of completing a significant number of real game levels (i.e. levels made by and for humans). As of this writing, the bot is a useful coop companion but isn't smart enough to complete levels. However, I have made good progress on several fronts and I plan to report about it in this thread. This is both my own record of progress and an opportunity for discussion with interested members of the community.


    For years I was known in the community as "DeeperThought", which was inspired by the fictional computer Deep Thought, so naming my bot DukeThought seems appropriate.

    Duke 3D levels have many features to confound bots. I want my bot to be able to complete unmodified versions of maps without any prior knowledge of them: no waypoints placed in them ahead of time or anything similar will be allowed. This makes my job very, very difficult. Even a relatively simple level like E1L1 presents great challenges. Failure is an option. If I fail, I'll still have a good bot for coop and other purposes.

    Progress so far:
    My bot can follow the player around pretty well. He can also fight competently. He knows how to select, aim and fire weapons, and will make appropriate choices depending on the situation. He also knows how to move towards nearby items to pick them up, and can prioritize them according to need. He can also use the medkit.

    Now I am beginning to work on the hard part: level navigation. Following the player around is simply a matter of tracing the player's steps, and has zero implications for the bot completing a level by himself. This weekend I gave him a recursive path finding algorithm and successfully tested it to make him navigate to goal sectors across simple mazes. This is just the first step of a long journey with many pitfalls. There's a myriad of obstacles in real levels which will make it a nightmare for the bot to figure out how to complete them. Doors, elevators, keycards, switches, cracks in walls, teleporters/water, and jumping puzzles are just a few.
  4. Trying to start fake Coop Game

    04 September 2017 - 05:46 PM

    I want to try coding a coop player AI that works by manipulating the input of an actual player (not a useractor that mimics a player).

    I thought I would start with the built-in fake multiplayer, just to get a game going with a bot in it. Looking at the console commands, it would seem that these commands are the ones I want:

    -q2 // two players total
    -a // use fake multiplayer

    Starting the game with those commands, I can get as far as configuring the game settings and launching the game, but then it gets stuck on the "waiting for votes" screen. Unfortunately, the bot never votes and I don't know how to skip past that screen and get into the game.

    Please help!

    EDIT: I can force the game to start in a specific episode or map by adding that to the command line. Not the ideal solution, since I want to be able to choose without editing the command line. But more importantly, the player is instantly squished when starting every time. Is this a known issue with the newest build?
  5. Polymin: A hack to increase framerate in polymer

    07 June 2017 - 01:54 AM

    This mod is a "mutator" -- you can include the code and add it to the regular CONs, or to modified CONs, and it will do its thing.


    To install, what you want to do is put the file "polymin.CON" in the folder that contains your other CON files, then open one of them up, and near the top add "include polymin.CON"

    First of all, results are mixed. In some cases, using this code will substantially increase framerate by introducing some pop-in to the game. In other cases, you get the pop-in without any significant benefit. In some rare cases, it may even give you reduced performance while introducing glitches. A notable success that I had was when adding it to Mark's Medevil TC (based on WGR2). My framerate went from an average of 16 to an average of 35, with the only drawback being some pop-in.

    Polymin is an "optimization" in the same way that sawing your family's legs off so that they can all fit in a compact car for the road trip is an optimization. What it does is collapse sectors that you "don't need" at the moment. It also restores them when they are needed, though. So unlike on that roadtrip, your family will have working legs at the end. Probably.

    Here are some defined values at the top of file that you can mess with:

    define SECTBUFFERDIST 4096
    define VIEWCUTDIST 16384
    define SECTINC 512 // sectors processed for culling/restoring per-tic
    define LAGTIME 3 // consecutive tics of low framerate before sector culling begins
    define FPSTARGET 36 // framerate target

    SECTBUFFERDIST is the amount of distance beyond where you are standing and beyond where you are looking before sectors will be collapsed. VIEWCUTDIST is something like the maximum distance your hitscans can go before my code says "you've looked far enough, if the framerate is low then sectors will be cut from that distance on". The other values are explained in the comments above.

    Other notes: The code will do nothing unless polymer is the renderer. The code will do nothing until the framerate drops below FPSTARGET. This code does nothing to alter polymer lights. However, lights will automatically stop working in collapsed sectors (and start working again when sectors are restored). If you used this code in combination with code that culled/restored lights or changed/restored lights from spotlights to pointlights, you would probably get additional benefits.

    Unfortunately, there are some visual glitches that go beyond pop-in. Not too many, from what I have seen, but I am aware of them. When it comes to bugs, I am more concerned about gameplay stuff (like sector effects getting broken). If you come across anything like that, please let me know. If anyone wants to share any success stories, please do -- I would like to think that this code is useful.


    include DEFS.CON
    include USER.CON
    include polymin.CON


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