tag:blogger.com,1999:blog-83569821849980344452008-08-19T22:33:51.567+01:00mhquakemhquakenoreply@blogger.comBlogger82125tag:blogger.com,1999:blog-8356982184998034445.post-74062072939248691012008-08-17T20:51:00.002+01:002008-08-17T20:58:48.882+01:00The death of features....It's killing me to do this, but it looks as though I'll probably have to remove torch coronas. They were one nifty bit of graphical gloss that really added to the atmosphere, but I've run a few test maps with lots of torches in the scene, and they really do murder the framerate. I might see if I can concoct another way to do them (in fact I already have one in mind) that doesn't involve some ofmhquakenoreply@blogger.comtag:blogger.com,1999:blog-8356982184998034445.post-9334329415394248592008-08-15T02:04:00.003+01:002008-08-15T02:15:20.102+01:00Demos Menu FinishedIt's been a while since we had a "Menu of the Day"... In other news... I've changed the autogenerated save game name from a GUID to a date/time, so I can sort them in reverse order giving you the most recent save on the top. They're still not sorted by last write time though, just by creation time, so I need to fix that. Always busy, oh well...mhquakenoreply@blogger.comtag:blogger.com,1999:blog-8356982184998034445.post-65288347648426851432008-08-13T23:35:00.002+01:002008-08-13T23:45:42.068+01:00Latest UpdatesSome days I get loads of things done, some days I don't. Other days are weird, either I write loads of code with no real result, or I write very little code with a very good result to show for it. Today was one of the latter; the main thing I did was rewrite my file searcher function as a class, which really really cleaned up a lot of ugly code as well as removed certain (fairly high) hard mhquakenoreply@blogger.comtag:blogger.com,1999:blog-8356982184998034445.post-18169132632059722702008-08-12T22:29:00.002+01:002008-08-12T22:38:27.692+01:00More tidying upJust one small refinement on the maps menu - I've added a check for an info_player_* entity in each map before it's added to the menu, so that item boxes won't get added. Because I create the maps menu dynamically (so I can adjust it if the game changes) this has added a delay to the first load of the menu. On some systems this might be unacceptable, so I've also done a pre-load of the menu. mhquakenoreply@blogger.comtag:blogger.com,1999:blog-8356982184998034445.post-62401763821846427702008-08-11T21:32:00.003+01:002008-08-11T23:10:15.181+01:00Visual Studio 2008 - The Horror Lives OnThere's definitely something bizarre happening with either the compiler, the linker or the CRT. A new bug has now surfaced, causing a "map" command to crash the engine when issued during the startup demo loop. At this stage I consider it a waste of my time to work any further in this version; I'm reverting back to 2003 (where even using the very same project options doesn't have any trouble at mhquakenoreply@blogger.comtag:blogger.com,1999:blog-8356982184998034445.post-75713341795236066652008-08-10T21:14:00.002+01:002008-08-10T21:30:54.145+01:00Visual Studio 2008 - Now WorkingMHQuake is now working under Visual Studio 2008. The last thing I did was load progs into a temporary buffer, then malloc a permanent home for it and memcpy it in. Now, it's obvious that so far as memory is concerned, progs is a wildcard. I haven't investigated fully yet, but my own inclination is to leave things this way. I could very well invest a lot of time and effort into tracking down mhquakenoreply@blogger.comtag:blogger.com,1999:blog-8356982184998034445.post-53492756656496374552008-08-08T20:45:00.002+01:002008-08-08T21:06:19.958+01:00Visual Studio 2008Most Visual Studio 2008 problems have now been sorted. I'd switched DirectInput to unbuffered some time back, which has completely resolved the threading issues. What's remaining is a PF_VarString crash. I've definitely confirmed that this is coming from the entered/left the game (with frags) broadcast messages, originating in CL_Disconnect, going through Host_ShutdownServer and mhquakenoreply@blogger.comtag:blogger.com,1999:blog-8356982184998034445.post-89244201119471621712008-08-06T22:03:00.003+01:002008-08-06T22:15:47.052+01:00Scratching the ItchI wouldn't claim by any means to be one of the "great hackers" out there, but I can definitely understand and relate to whoever it was wrote about them feeling a need to "scratch the itch". For me it's been menus recently, and I certainly got the itch bad while doing LAN tests yesterday. Those old multi-player menus looked really ugly and clunky when sitting beside my new ones, so I dug in and mhquakenoreply@blogger.comtag:blogger.com,1999:blog-8356982184998034445.post-77461953797155444672008-08-05T18:16:00.002+01:002008-08-05T18:28:23.810+01:00Play TestsOK, I said I was taking a break, but one of the objectives in writing this engine is to create a Quake that I would like to play, and so today I played some Quake. First thing I did was set up a LAN and verify basic connectivity using a GLQuake to GLQuake test, which worked a charm. Then it went MHQuake to GLQuake, and finally MHQuake to MHQuake. Glad to say it all worked very well. Some mhquakenoreply@blogger.comtag:blogger.com,1999:blog-8356982184998034445.post-82416263907778401982008-08-03T18:26:00.004+01:002008-08-03T18:35:00.182+01:00Taking a breakI'm going to be taking a break from MHQuake for a week or two. This is pretty much of my own choice - I feel that I've accomplished a lot and taken the codebase somewhere good over the past month, so it's time to devote some time and energy to Real Life. There's books to be read, people to go drinking with, a whole lot of stuff to catch up on, and a whole lot of fresh air and sunshine to enjoy!mhquakenoreply@blogger.comtag:blogger.com,1999:blog-8356982184998034445.post-6583806790199845232008-08-02T23:55:00.002+01:002008-08-03T00:34:55.713+01:00UpdatesHaven't done too much these past few days, as I've been caught up in Real Life again (nothing bad or catastrophic, just going out and having fun with friends), but I did manage to add in the Point Parameters based round particles, and a few other things. If memory serves, square particles are still the default for the "Traditional Mode" toggle in the menus, but they can always be set to round mhquakenoreply@blogger.comtag:blogger.com,1999:blog-8356982184998034445.post-73767802649631332312008-08-01T21:05:00.003+01:002008-08-01T21:10:39.602+01:00Classic Particles!One of the easiest reversions ever, classic particles (and I do mean classic - they're even square!) have returned. I've had to switch off some particle based effects for them, in particular gun barrel smoke and impact smoke, as they really looked bad. Depending on if enough people holler for it (and people - you will have to holler - if I can't hear you I won't know if you want it) I might addmhquakenoreply@blogger.comtag:blogger.com,1999:blog-8356982184998034445.post-54531802096034629742008-07-30T23:16:00.003+01:002008-07-31T00:15:35.945+01:00Arch-Traditionalists Rejoice! I don't have a 320 x 200 version of it; sorry. I've also just squashed what must be one of the more obscure Quake bugs. I have no recollection of ever seeing any references to it anywhere, ever. The server sends a blank centerstring to the client in some places (e.g. the Nailgun room in E1M1), so the fix is as simple as adding a check for if (!str[0]) return; to the start of SCR_CenterPrint.mhquakenoreply@blogger.comtag:blogger.com,1999:blog-8356982184998034445.post-67128224101348200382008-07-29T21:24:00.003+01:002008-07-30T00:14:36.075+01:00Internal hard limits are badThe following internal hard limits have now been removed: Lightmaps.Particles.Textures.Client-side visible entities (cl_visedicts). Max alias skin size.Max alias verts.Max alias tris.Max alias frames.More to come.mhquakenoreply@blogger.comtag:blogger.com,1999:blog-8356982184998034445.post-229654449105922402008-07-28T23:45:00.004+01:002008-07-29T00:01:45.054+01:00Menus of the day!It might not be actually a daily thing, but I like what I've done with menus, so here's a sample or two to keep things going... mhquakenoreply@blogger.comtag:blogger.com,1999:blog-8356982184998034445.post-43547006265921851842008-07-28T22:28:00.004+01:002008-07-28T22:42:53.532+01:00A small change to texture loadingThis one might make some folks unhappy... We all know that there are beautiful texture packs out there, with 1024 x 1024 representations of textures which were originally 64 x 64. And we all download them, load them up, and marvel at the exquisite detail we're getting while running at 10 FPS. Then we either go looking for a smaller texture pack, or we make our own by shrinking these down to mhquakenoreply@blogger.comtag:blogger.com,1999:blog-8356982184998034445.post-47052346999409317812008-07-27T21:40:00.004+01:002008-07-27T21:48:02.162+01:00The return of Joystick support!One of the nicest things about DirectInput is that it uses largely the same code for all devices. This means that once you have the basic code done for one device, it's utterly trivial to add in the extra you need for another. One day, MHQuake may support steering wheels, Wii-style controllers, and so on, all with about 20 extra lines of code each. Anyway, one of the first things I removed mhquakenoreply@blogger.comtag:blogger.com,1999:blog-8356982184998034445.post-23993882238384465192008-07-27T01:06:00.004+01:002008-07-27T01:33:31.045+01:00More fun and joyI've had a great time troubleshooting the old Intel lock up problem, caused by the driver going into an infinite loop. I'd long suspected that the command buffer was overflowing, and have peppered a few calls to "glFinish" around the code, which not only fixes it, but also seems to confirm my suspicions. So now I detect if we have an Intel card on the premises at startup, and enable a "degradedmhquakenoreply@blogger.comtag:blogger.com,1999:blog-8356982184998034445.post-46783707337825901652008-07-25T21:55:00.005+01:002008-07-25T22:02:20.105+01:00i am teh ninja c0d3rz. ph34r my sk11lz!I've struggled a bit getting a modal messagebox working, but it's almost there now. A nice new construct for me - an array of function pointers! typedef void (*m_print_func_t) (int, int, char *); m_print_func_t M_PrintFunc[2] = {M_PrintWhite, M_Print}; ------------------------ M_PrintFunc[this->ActiveButton] (184, ypos + 20, "Yes"); M_PrintFunc[!this->ActiveButton] (240, ypos + 20, "No");mhquakenoreply@blogger.comtag:blogger.com,1999:blog-8356982184998034445.post-1120165683064919552008-07-24T00:29:00.003+01:002008-07-24T00:44:43.474+01:00Fun with Visual Studio 2005/2008I've been developing on Visual Studio 2003 for now, but had intended to switch over to 2005 or 2008 at some point in time. Simply because they're nicer environments, they have some neat productivity enhancements, and they have free (as in beer) Express versions which enable anyone to dabble. Way to go, Microsoft! One thing that had put me off was the Intellisense support. Bottom line is that mhquakenoreply@blogger.comtag:blogger.com,1999:blog-8356982184998034445.post-2426969182556393932008-07-23T18:49:00.002+01:002008-07-23T19:02:05.624+01:00Some small thingsI've removed the hard-coded limit on the number of particles. You can now have several billion if you want, although your PC will probably crash before you get to that point. I've had great fun with the video menu again. Bottom line was that I was trying to be too fancy with what I had, so I went back and simplified it totally, and at the same time managed to make it more flexible and mhquakenoreply@blogger.comtag:blogger.com,1999:blog-8356982184998034445.post-76418241492750664272008-07-21T23:46:00.003+01:002008-07-21T23:54:52.495+01:00Total Startup ChangeMHQuake startup has been totally changed. This was a sensible thing that had been on my mind for a while, but now it's done. There are 4 phases to startup: Bringing on all baseline stuff. This mainly involves bringing on all Cvars and Cmds, as well as all items that are always required irrespective of the game selected.Bring on the filesystem, then exec quake.rc in a special "cvars only" mode mhquakenoreply@blogger.comtag:blogger.com,1999:blog-8356982184998034445.post-12238274286452406642008-07-19T17:16:00.002+01:002008-07-19T17:18:40.718+01:00So you want to load a map?mhquakenoreply@blogger.comtag:blogger.com,1999:blog-8356982184998034445.post-26756761204850441792008-07-16T02:06:00.001+01:002008-07-16T02:11:24.431+01:00The Joys of DirectInputJust two things for now: The changeover to C++ has been a total eye-opener. I did promise that I wasn't going to use any wacko C++ features, but I've already got multiple inheritance in the input subsystem (the DirectInput mouse class inherits from a CDIDevice and a CBasicMouse). The big surprise is how clean the code is. DirectInput is really rather nice to use under these conditions. mhquakenoreply@blogger.comtag:blogger.com,1999:blog-8356982184998034445.post-37166646786372615952008-07-14T20:46:00.002+01:002008-07-14T20:55:55.866+01:00Direct X FunSome things I've discovered: You need a co-operative level of DISCL_FOREGROUND | DISCL_EXCLUSIVE or you'll still receive WM_MOUSEWHEEL messages from Windows. This was tremendous fun to debug. I bet there's some silly backwards-compatibility reason for it too, like a lot of Direct X 3 programmers relied on it.If you have a function that returns a HWND, don't pass it as the first parameter to mhquakenoreply@blogger.com