Jump to content

Raz0r

Members
  • Posts

    1,135
  • Joined

  • Last visited

Everything posted by Raz0r

  1. You can look at existing plugins here or the source code here. There used to be some basic documentation but most of it is irrelevant now or missing.
  2. Raz0r

    FPS Issue

    Nah bro SDL2 is a virus, trust me
  3. I probably broke something. Try with base/ja+ client?
  4. You didn't specify a value for numBlades, thus it thinks the next word is supposed to be a number and it freaks out. The rest looks fine.
  5. Put this in japlus/lua/cl/chatbot/plugin.lua local chatbot = RegisterPlugin( "ChatBot", "1.0" ) local function SplitChatMessage( msg ) local splitMsg = JPUtil.explode( string.format( "%c", 0x19 ), msg ) local len = #splitMsg if len == 2 then -- for regular messages, only one escape character local name = string.sub( splitMsg[1], 1, string.len(splitMsg[1])-2 ) -- strip the ^7 at the end local message = string.sub( splitMsg[2], 3 ) -- strip the ': ' before each message return name, message elseif len == 4 then -- for JA+ admin messages... local name = string.sub( splitMsg[2], 2, string.len(splitMsg[2])-2 ) -- strip the '(' at the start and ^7 at the end local message = string.sub( splitMsg[4], 4 ) -- strip the ': ^3' at the start return name, message end end AddListener( "JPLUA_EVENT_CHATMSGRECV", function( msg ) local sender, message = SplitChatMessage( msg ) local ply = GetPlayer( sender ) if ply and ply:IsBot() then -- ... do something with 'message' local reply = 'some response' SendServerCommand( 'say ' .. reply ) end return msg end )and go from there =]
  6. It can be done in the JA++ client with Lua, or by modifying the source code if you're more familiar with C.
  7. Show your .sab etc files. They must be badly formatted, so it's reading past the end of the file looking for a closing brace or something.
  8. Raz0r

    FPS Issue

    I thought they were limited to 8, 16 and 24. Meh, the menus are years out of date.
  9. Raz0r

    FPS Issue

    You may need to set com_affinity on command-line, or restart JA after changing it. Not sure.
  10. I always felt there was a serious lack of availability for educational material (books, programs, etc) If you were so inclined, you could give a boost to Open Access
  11. Raz0r

    FPS Issue

    In the OpenJK forum, when they said they're using OpenJK? =p
  12. Raz0r

    OpenJK Launcher?

    Ugh. KISS - Keep It Simple, Stupid. Play SP / MP - Automatically load mod - Set custom resolution - ??? Check for updates Visit site/forums Exit
  13. Raz0r

    OpenJK Launcher?

    The world needs more package managers. I think the most important thing is automatic updater (with option to not check for updates/manually)
  14. The correlation between snaps and sv_fps is that each server frame (happens every 1000/sv_fps times per second) a snapshot is generated. Using a snaps value higher than the sv_fps has no effect, so when you're using snaps 40 on a sv_fps 20 server, you'll get 20 snapshots/second. When you move to a sv_fps 40 server, you'll recieve 40 snapshots/second. A snapshot contains things like positional and state information (what weapon an entity has, etc). The more frequent the snapshot updates are, the smoother you will see people move because you'll have more sample points to interpolate between. Visualise this as if you mark a spot on the map twice per second as you're moving along. Other people only see those spots and position you between them based on how long it's been since the spot was placed. (i.e. spot 1 placed at 500ms, spot 2 placed at 1000ms. If they're at 1250ms, they'll attempt to predict where you are based on how far you could have moved at your current speed from spot 2, 250ms into the future) Because frametimes are measured in milliseconds, sv_fps has the same limitation as com_maxFPS, where you can only reach certain frametimes/framerates. There is an inherent link between framerate and frametime. Framerate being how many updates per second, and frametime being how long (in milliseconds) between each frame, so a framerate of 1000 means 1ms frametime. That is to say frametime = 1000(ms) / desired-framerate. If you wanted a framerate of 30 (sv_fps) that would mean a frametime of >>> 1000.0 / 30 = 33.333333333333336 Because the frametime is stored in an integer, the game would update every 33ms, which means that every frame you're accumulating an error of .333msec. Every ~third frame (.333 * 3) you would potentially run two frames - the first having a 33ms frametime, the second having a 1ms frametime - or it could be a 34msec frametime. The main issue here is that it's inconsistent. Remember what I said about each server frame generating a snapshot, and people guessing your position based on those snapshots. If you had a consistent frametime like 25, 50 (sv_fps 40, 20) the snapshots would be at a consistently smooth rate. An issue of using a "non-standard" framerate (i.e. not sv_fps 20) is that some calculations (e.g. applying saber damage with sv_fps 20) are not tied to the frametime, so they'll run consistently on every frame. This is the same issue that some games have (but at a smaller scale, where only some things are affected) Another related issue is things that happen more frequently than 50msecs. This is noticeable in Quake where the LG hit sound should play more frequently, and you'll see the plasma bolts faster than on sv_fps 20. Did I miss anything? I only skimmed over the post.
  15. We could look at Semantic Versioning, but I'm not sure what constitutes a "public API", we could probably replace that with major changes. JA++ doesn't use versions, it uses git revisions, which are equally as relevant as version numbers.
  16. The behaviour for extracting DLLs is the same is retail JA. We introduced proper user profile support on all OSes (not just *nix) so people no longer have to run the game as admin. There are a few ways around this when developing: Compile with the portable switch, or run with +set fs_homepath "."Build your DLLs and PK3s into whatever fs_homepath is set toSplit everything up: +set fs_homepath "<generic-writable-directory>" +set fs_cdpath "<mod-working-directory>" +set fs_game "mymod" This will assume the current directory is your install directory, i.e. read-only folder containing just base/assets*.pk3 and you can install mods etc to the generic fs_homepath directory which you treat as a writable GameData folder. So there's no bug or issue, you're just using a method that incidentally worked well with retail JA. I recommend leaving the cwd/base directory entirely clean with just assets*.pk3, using fs_homepath to store your long-time mods/configs/screenshots, and using fs_cdpath (game will only read from there) for your work-in-progress assets and DLLs As an added bonus, I have my fs_homepath on Dropbox so I can play with the same profile on all computers.
  17. Sure, but the hit indicator is not localised to the world, it's a stereo sound purely for feedback, not effect.
  18. Not necessary at all. It's been added by a few people and doesn't suit the game. Same with the accompanying hit sounds.
  19. Raz0r

    Entities

    Technically, not linear. Each entity has to access each other entity multiple times per frame. Depending on what they're accessing it for (collision etc) it could be quite an exponential performance hit. This is usually a minimal issue if the entity/player slot is not in use.
  20. Raz0r

    Entities

    Yes, but MP has 32 reserved client slots. (1024-2) + 31 = 1053
  21. It means the current working directory needs to contain OpenAL32.dll
  22. Steam has nothing to do with the master server, and the question was about whether Steam/Valve could modify the version of the game they distribute to point to the JKHub master server.
  23. Steam have no authority over the code of the game. Raven have no reason to outsource the master server functionality to yet another third party. Wouldn't solve the issue for non-steam players.
×
×
  • Create New...