Forum posts

An engine has absolutely no bearing on a games quality
It does, depending on the kind of game and what you're trying to create. What made Crysis special? Do old FPS games feel immersive anymore, now that we've been spoiled by more realistic graphics? One of my absolute favourites is Deus Ex. Maybe the second best game I've ever played (Life is Strange is special to me). But I'd like it a lot more if it wasn't so damn ugly and bug-ridden. And not half of the ugliness can be blamed on the artists or even the programmers. The core technology is outdated: look at the lighting, the physics. And if you've played it, you know the Unreal AI isn't a good fit for that kind of game. The game suffers because of these things. That it's still such a great game according to so many people is an achievement, but it could probably be even better if made with today's modern tools. But of course, that's just speculation.
Oskar Potatis Oskar Potatis🦔
I'm going to have to disagree with you. While you can certainly make a fantastic game in any decent game engine that's flexible enough, the limitations of some engines simply don't let your realize certain visions. You can't make something like GTA in the GoldSrc engine or even the Source engine without jumping through hoops that take -a lot- of time away from the creative process.
Oskar Potatis Oskar Potatis🦔
Posted 5 years ago2019-01-01 20:15:04 UTC
in Post your screenshots! WIP thread Post #341533
Don't be sorry! I don't understand it, but you do whatever makes you happy 🙂
Oskar Potatis Oskar Potatis🦔
Posted 5 years ago2019-01-01 17:47:28 UTC
in Post your screenshots! WIP thread Post #341531
The geometry looks great, but some of the textures are very pixelly
Oskar Potatis Oskar Potatis🦔
Thanks for sharing! Good read
Oskar Potatis Oskar Potatis🦔
Posted 5 years ago2018-12-29 09:17:11 UTC
in getting number of sprite frames on server Post #341520
Can you provide a piece of example code? It would save whoever decides to look into this some time
Oskar Potatis Oskar Potatis🦔
Posted 5 years ago2018-12-29 08:54:34 UTC
in when to EXPORT an entity method Post #341519
After having a quick look at it, it seems the engine looks up the names of DLL functions (and for this to work the functions need to be listed in the DLL exports table, which Half-Life achieves with the EXPORT macro) when pointers to those functions need to be (re)stored for the purposes of save files. The names of the functions, rather than the actual function pointers, are written to save files. So I'm guessing you only need to worry about EXPORT when you need to be able to (re)store a pointer to a function (i.e. anywhere you use DEFINE_FIELD with the FIELD_FUNCTION argument). The current think, touch, use and blocked functions of entities are good examples: https://github.com/ValveSoftware/halflife/blob/5d761709a31ce1e71488f2668321de05f791b405/dmc/dlls/cbase.cpp#L584

EXPORT is also used to enable the engine to find some functions it needs to call and knows to expect under certain names like HUD_Init and V_CalcRefdef.
It seems like things compile without the EXPORT but I guess save-games will screw up without it
I haven't tested, but from my quick glance at the code I agree
Oskar Potatis Oskar Potatis🦔
Posted 5 years ago2018-12-27 17:16:55 UTC
in Competition 35: Vanilla Half-Life Post #341494
That's really nice of you, Leslie
Oskar Potatis Oskar Potatis🦔
Posted 5 years ago2018-12-24 13:17:20 UTC
in The Ballet of the Bots Post #341486
Does Botman's original code produce the same behaviour?
Oskar Potatis Oskar Potatis🦔
This post was made on a thread that has been deleted.
Posted 5 years ago2018-12-17 02:45:45 UTC
in VHLT source code cleaned up Post #341463
I wonder if anyone's ever explored the idea of using a rendering engine like the one in Blender to generate light maps for old games
Oskar Potatis Oskar Potatis🦔
Posted 5 years ago2018-12-15 11:55:23 UTC
in Now Playing: ... Post #341458
The Voidz - Virtue (album): YouTube, Spotify
Oskar Potatis Oskar Potatis🦔
Best of luck to him. I think a better use of time might be to encourage people to share their source files, since the root of this problem is cultural, not technological.
Oskar Potatis Oskar Potatis🦔
Posted 5 years ago2018-12-10 16:24:24 UTC
in VHLT source code cleaned up Post #341418
Sorry, Solokiller, that article is useless. It's common in high-performance C++ projects to use custom allocators, and the cost of deallocation wasn't measured. A more complicated allocation can make the deallocation cheaper and vice versa since a common goal of a memory allocation scheme is to avoid memory fragmentation and that requires a lot of work. C# is of course garbage collected and the cost of cleaning up and reorganizing needs to be taken into account. Most implementations of the standard C++ operator new are designed to be thread-safe and conservative - so there's likely a big overhead from locking every time you call new - which is something a custom allocator can minimize by being greedy and preallocating large amounts of memory. The costs of dealing with dynamic memory are paid for at different points in the lifetime of the program: with (non-garbage-collected (yes, C++ can be garbage collected according to the standard, no idea why anyone would want that though)) C++ it's very predictable - you only pay when you allocate and deallocate; with C# you leave a lot of the work to the garbage collector. There have been a few interesting CppCon talks on allocators.

Making something like this in C# is fine of course, use whatever you prefer. Ease of development is a good reason to pick one language over the other and C++ can be painful. As you know design usually matters much, much more than choice of language when it comes to performance. I'm excited to see the results of your work!
Oskar Potatis Oskar Potatis🦔
Posted 5 years ago2018-12-01 14:31:49 UTC
in Is there a way to fire random events? Post #341369
A laser with multiple same-name targets is a common method: https://twhl.info/wiki/page/Tutorial%3A_Random_entity_triggering
Oskar Potatis Oskar Potatis🦔
Posted 5 years ago2018-11-25 12:10:11 UTC
in Disabling Spectator modes Post #341315
Looks to me like you should put that code back in and focus on Observer_HandleButtons
Oskar Potatis Oskar Potatis🦔
Posted 5 years ago2018-11-24 04:42:37 UTC
in Competition 35: Vanilla Half-Life Post #341305
I know I didn't enter, but can you let me win anyway so I get the oxy? I promise to share
Oskar Potatis Oskar Potatis🦔
Posted 5 years ago2018-11-14 13:05:07 UTC
in 3DS Half-Life Post #341243
What's the point? I wouldn't want to play an FPS with the 3DS's controls.
Oskar Potatis Oskar Potatis🦔
I'm pretty sure that would require programming.
Oskar Potatis Oskar Potatis🦔
Posted 5 years ago2018-11-04 23:41:52 UTC
in Competition 35: Vanilla Half-Life Post #341188
Hello there, Sirlion! Looks like the judges have a difficult job ahead of them with all these promising entries.
Oskar Potatis Oskar Potatis🦔
Posted 5 years ago2018-11-04 17:14:50 UTC
in Safe Entity Threshold Post #341184
TIL. Solokiller knows the engine better than probably anyone on this site.
Oskar Potatis Oskar Potatis🦔
Posted 5 years ago2018-11-04 05:25:13 UTC
in Safe Entity Threshold Post #341172
The default limit is 900 and can be changed by the server owner by adding
commandargs "-num_edicts 3072"
(the number can be changed to something lower or higher) to liblist.gam. I don't think texlights count.
Oskar Potatis Oskar Potatis🦔
Posted 5 years ago2018-10-27 15:20:32 UTC
in Sledge (Hammer Alternative) Alpha Build Post #341087
I don't know what you're trying to say, MuchoFranco. Could you rephrase that, please?
Oskar Potatis Oskar Potatis🦔
Posted 5 years ago2018-10-25 20:25:07 UTC
in SharpLife - Dot Net Core based modding p Post #341079
A lot of apps use a web engine for their GUI (I do NOT suggest this for your project) and I think a big part of the attraction is the access to all the CSS units and properties which make it easy to produce UIs that scale for any resolution and aspect ratio. Units like vw, vh, (r)em, and percentages. Maybe they can serve as inspiration somehow?
Oskar Potatis Oskar Potatis🦔
Posted 5 years ago2018-10-17 23:20:52 UTC
in TWHL4 Discussion / Bug Reports Post #341052
I think it could be a good idea to display some of the latest Discord messages on the website. New visitors might be more inclined to stick around if they know there's more activity than just what they see on the site. I've written some quick example code for fetching the latest messages from a channel using RestCord:
<?php

// Step 0: Install RestCord (Composer: restcord/restcord)
// Step 1: Go to https://discordapp.com/developers/applications/ and register a new application
// Step 2: Create a bot for that application
// Step 3: Go to https://discordapp.com/oauth2/authorize?&client_id=502232355797204994&scope=bot&permissions=66560 (replace 502232355797204994 with your application's client id) and make the bot join the relevant server
// Step 4: Update the definitions below

define("BOT_TOKEN", "NTAyMjMyMzU1Nzk3MjA0OTk0.DqlD6w.uOnSIKcM7N0oG6srQN8vUBqsM3Q");
define("DISCORD_SERVER_ID", 502229064434712585);
define("CHANNEL_ID", null); // <- Define for one request fewer (since we don't have too look up the ID from the name)
define("CHANNEL_NAME", "general");
define("CHANNEL_TYPE", 0); // 0 for text channel (see https://discordapp.com/developers/docs/resources/channel#channel-object-channel-types)

require_once __DIR__ . "/vendor/autoload.php";

use RestCord\DiscordClient;
use Psr\Log\LoggerInterface;

class SilentLoggerReplaceWithSomethingBetterOrUseTheDefaultLogger implements LoggerInterface {
	public function emergency($message, array $context = array()) {}
	public function alert($message, array $context = array()) {}
	public function critical($message, array $context = array()) {}
	public function error($message, array $context = array()) {}
	public function warning($message, array $context = array()) {}
	public function notice($message, array $context = array()) {}
	public function info($message, array $context = array()) {}
	public function debug($message, array $context = array()) {}
	public function log($level, $message, array $context = array()) {}
};


$discordClient = new DiscordClient(["token" => BOT_TOKEN, "logger" => new SilentLoggerReplaceWithSomethingBetterOrUseTheDefaultLogger()]);


$channelId = CHANNEL_ID;
if($channelId === null) {
	$guildChannels = $discordClient->guild->getGuildChannels(["guild.id" => DISCORD_SERVER_ID]);
	foreach($guildChannels as $channel) {
		if($channel->name === CHANNEL_NAME && $channel->type === CHANNEL_TYPE) {
			$channelId = $channel->id;
			break;
		}
	}
	if($channelId === null) {
		exit("Channel not found.\n");
	}
}
echo "Channel ID: " . $channelId . "\n";

$messages = $discordClient->channel->getChannelMessages(["channel.id" => $channelId, "limit" => 5]);

echo "Messages:\n";
foreach($messages as $msg) {
	$time = new DateTime($msg["timestamp"], new DateTimeZone("UTC"));
	$author = $msg["author"]["username"];
	$content = $msg["content"];
	echo $time->format("Y-m-d H:i:s") . " " . $author . " wrote:\n" . $content . "\n\n\n";
}

?>
I'd offer to help with this beyond just this example code if you're interested in implementing this, but, you know, I'm lazy.

PS. The code formatting using backticks isn't working properly
Oskar Potatis Oskar Potatis🦔
Posted 5 years ago2018-09-22 01:15:38 UTC
in Hassassins killing each other Post #340931
Posted 5 years ago2018-09-20 03:04:00 UTC
in Post your screenshots! WIP thread Post #340920
That's really beautiful. I think it's a wonderful idea
Oskar Potatis Oskar Potatis🦔
Posted 5 years ago2018-09-16 15:40:09 UTC
in Cs 1.6 - Spawn with dif. weapons each round Post #340895
Here's an idea, the first that comes to my mind:
If you want, say, 4 different weapon rounds, create 4 different game_counters with the same name, with the limit set to 4, with the Reset on fire flag checked, with different targets, and with different initial values. So the first one would have these properties:
Name: c
Target: give_players_knives
Initial value: 0
Limit: 4
[Reset on fire]
The second one would be:
Name: c
Target: give_players_mp5s
Initial value: 1
Limit: 4
[Reset on fire]
And so on...
And then make sure "c" is triggered at the start of each round.
Untested.
Oskar Potatis Oskar Potatis🦔
Posted 5 years ago2018-08-01 16:32:56 UTC
in Map won't compile properly Post #340364
It can be helpful for others trying to figure it out to post the compile log (the text the compilers spew out when you compile your map), the .bsp, the .map, and/or the .rmf, plus any resources needed to run the map (models, sprites, wads). Or a screenshot. Are the entities and buildings just invisible, or are they also physically not there (can you walk through where they're supposed to be)?
Oskar Potatis Oskar Potatis🦔
A new version has been published and it should be rolling out to your browser within 24h. Here are the changes:
  • Using this extension no longer keeps your account on the top of the active users list (added request header X-Requested-With: XMLHttpRequest)
  • Earlier limit of 4 shouts reduced to 2.
  • Some changes to the timing of requests. Should be a little friendlier to the server (and your connection if you're on modem or on mobile or maybe just a Canadian polar bear) when there hasn't been activity in a while.
Oskar Potatis Oskar Potatis🦔
Seriously? I'm sorry! I have the memory of a jellyfish. It was TJB
Oskar Potatis Oskar Potatis🦔
I thought I removed those lines. Never release when you're in a hurry...

Edit:
A new, fixed version was uploaded an hour ago.
@Jessie, I haven't been able to recreate your full-screen problems on either Firefox or Chrome.
Oskar Potatis Oskar Potatis🦔
Thanks for your suggestions. The actual notification system is built into the browsers, so I'm limited in what I can do.

Concerning the heading, I could prefix the title with "TWHL: ". Would that be an okay solution?
Concerning your second point, I think that that is excellent idea and it shouldn't be too difficult to implement.
Concerning your third point, I'm not sure if it's worth the effort because I doubt that users would install the extensions in strict SFW environments. But I'll give it more consideration when I have more free time or if one more person asks for it.

Note to self: "They seem to show up most of the time after I close a YouTube video from fullscreen, that might be the cause of it." <- see what I can do about that

Edit: Implemented point 1 and also, whenever there are 5 or more new shouts, you get just one notification.
Oskar Potatis Oskar Potatis🦔
Posted 5 years ago2018-06-03 22:11:02 UTC
in [Idea] TWHL Shoutbox desktop application Post #339799
It would be a massive amount of work I'm afraid. I think a more realistic idea would be to improve the mobile experience of the website. The source code is available here: https://github.com/LogicAndTrick/twhl . I would be surprised if Penguinboy doesn't welcome good contributions.
Oskar Potatis Oskar Potatis🦔
Posted 5 years ago2018-06-03 14:30:20 UTC
in What font is this? Post #339794
It's definitely a typewriter font.
Oskar Potatis Oskar Potatis🦔
New version uploaded, should be available within a few minutes.
Changes:
  • No longer displays shouts older than two hours (configurable) on startup
Oskar Potatis Oskar Potatis🦔
Posted 5 years ago2018-06-03 10:49:35 UTC
in TWHL4 Discussion / Bug Reports Post #339786
@ninja defuse: bottom right
Oskar Potatis Oskar Potatis🦔
Posted 5 years ago2018-06-02 22:55:23 UTC
in TWHL4 Discussion / Bug Reports Post #339780
@Penguinboy: Members would be a logical place, yes. I also think it would fit okay below the wiki edits on the front page.
Oskar Potatis Oskar Potatis🦔
Those are good suggestions. I thought about the first one, but though it might require too much work to create an UI. After a quick Googling, I've changed my mind - it seems pretty easy to create a settings UI. Using the user's avatar in the notification is something I hadn't considered. I'll get to it!

Edit: An update has been released containing implementations of Penguinboy's suggestions. If you want your shouts to be ignored, you have to go to the Extensions control panel and use the extension options panel to enter your username (Chrome: More tools > Extensions > TWHL Shoutbox Notifications > DETAILS > Extension options) (Firefox: Ctrl+Shift+A > Extensions > TWHL Shoutbox Notifications > Options).
Oskar Potatis Oskar Potatis🦔
Posted 5 years ago2018-06-02 18:04:43 UTC
in TWHL4 Discussion / Bug Reports Post #339775
Thanks for all the hard work you have put into the website over the years!

I miss the list of recently active users.
Oskar Potatis Oskar Potatis🦔
Would you like your web browser to alert you when someone shouts in TWHL's shoutbox, even when you're not on TWHL? I created a browser extension for that purpose.
Firefox version
Chrome version
Oskar Potatis Oskar Potatis🦔
This post was made on a thread that has been deleted.
Posted 5 years ago2018-05-19 23:15:59 UTC
in Best Half-Life Chapter Tournament Post #339663
It's almost unfair to compare other chapters to easily the longest chapter in the game, but the gargantuan Surface Tension is too dam good and as a consequence gets my vote.
Oskar Potatis Oskar Potatis🦔
Posted 5 years ago2018-05-19 01:33:43 UTC
in Best Half-Life Chapter Tournament Post #339654
Exploring Anomalous Materials was very exciting when I played Half-Life for the first time back in 1999.
Oskar Potatis Oskar Potatis🦔
Posted 5 years ago2018-05-08 18:05:28 UTC
in Half-Life RPG (one for the coders) Post #339526
I figured you'd chip in, SK :) That's a no to that idea :(
Oskar Potatis Oskar Potatis🦔
Posted 5 years ago2018-05-08 17:59:08 UTC
in Half-Life RPG (one for the coders) Post #339523
I haven't kept up with the development of Sven Co-op but I think this might be relatively simple to implement using ActionScript if you don't want to work with Half-Life's messy DLL code.
Oskar Potatis Oskar Potatis🦔
Posted 5 years ago2018-05-03 11:52:03 UTC
in Best Half-Life Chapter Tournament Post #339486
ST, but both are great.
Oskar Potatis Oskar Potatis🦔
Posted 5 years ago2018-04-30 19:04:30 UTC
in Best Half-Life Chapter Tournament Post #339469
I'm not sure what to think of Residue Processing, but it definitely sticks out from the rest. It plays very differently from nearby chapters and it's good to have some variation. Unforeseen Consequences is a very good start of the game and I think that's my choice.
Oskar Potatis Oskar Potatis🦔
Posted 5 years ago2018-04-11 17:30:05 UTC
in Your all time favourites Post #339292
Food & Drink
Snack: Crisps with a good dip
Meal: Macaroni salad with Quorn, tomato and leek
Hot beverage: Tie between hot chocolate and coffee. Or the two mixed together.
Cold beverage: Ice water, optionally with some lemon juice
Alcoholic beverage: Weihenstephaner wheat beer

Entertainment
Movie: RoboCop
TV show: Firefly, though the best TV show episode I've ever seen is definitely Buffy the Vampire Slayer's The Body, which deals with the topic of death in an absolutely brilliant way. Coincidentally, the same man is behind both shows.
Youtube channel: Tom Scott. Educational and entertaining.
Videogame: Life is Strange. So many tears...
Book: Not much of a reader either, but the stories about Sherlock Holmes are entertaining. If comics count, then anything by Don Rosa.
Band/Artist: I have no strong feelings about any artist or band, but I like Coldplay, and The Strokes.
Track: Lynyrd Skynyrd - Free Bird

General
Colour: Burgundy / wine red
Season: Late spring, with all the green and the lovely weather
Animal (domestic): Cat
Animal (wild): Red panda, rabbit, hare
Hobby: Eating new things, playing local multiplayer games
Physical activity: Sex
Day out: A nice long bike ride in the countryside
Foreign country/culture: Tough one. Maybe the UK or Germany. Kyoto in Japan is amazingly beautiful, but haven't seen much outside it. Really looking forward to visiting Taiwan in December
Oskar Potatis Oskar Potatis🦔
Posted 6 years ago2017-12-21 19:06:39 UTC
in Old HL1 mapping tutorial sites? Post #338460
The Snarkpit. Of course it goes without saying that the people there are not as clever or good looking as your average TWHLer.
Oskar Potatis Oskar Potatis🦔