Why (most) High Level Languages are Slow (article)



  • Right; and that tower defense game was made in Gamebryo, so its impossible that Gamebryo could stress a video card.

    Excellent logic there, Mr. Spock.


  • Discourse touched me in a no-no place

    @flabdablet said:

    Related phenomenon: building your designs by thinking only about the interfaces of the abstractions from the next layer down, and not really caring much about their performance, can result in code that has Schlemiel the Painter baked in at so many levels that nothing short of a complete re-architecting is going to be enough to get rid of it.

    The neat thing comes when you do that and it appears that you've written something horrible, but then you've actually left sufficient semantic information in there that a good optimiser manages to strip out the awfulness and generate good code out of the end anyway. That's pretty awesome when you can manage it, and proof that formal semantics actually does matter a lot in practical code.



  • I've tinkered with the idea.

    Then again, before my new external drive arrived yesterday, I had very little free space.
    Now that I've moved 400GB of old files (MSDN CD/DVD images, GOG game downloads, PDF files of comics, etc...), I actually have free space to store video.



  • You pointed me to a 2D game that was built on an engine that was supposed to stress GPUs, but it doesn't stress it any more than old, previous-generation 3D games.

    Also, I can stress a CPU just by calculating pi, so I don't really get your point.



  • My point as you well know was that not all game engines/developers consider photorealism a goal.

    UbiArt engine is state of the art, yet nothing made in it so far is remotely close to photorealism.



  • I am pretty sure this conversation will feel meaningless when in a couple of years, once VR has settled down as the way forward for videogames, we forget about 2D games, in the same way we forgot about mute movies with a dude playing the piano as background music.

    I like 2D games, and I've enjoyed them a bunch, even nowadays. But as everything moves forward they will eventually go the way of the dodo. The fact that Ubisoft has an engine that has used to produce 2 games in the last 5 years (when they've made a bigger number of 3D games in the meantime) means nothing in the bigger picture.



  • @dstopia said:

    we will forget about 2D games

    Not a chance in hell, they've made a massive comeback to the point where even the AAA developers make them.


  • Discourse touched me in a no-no place

    @dstopia said:

    we forget about 2D games

    Just like we're forgetting about 2D cinema now that 3D production and projection techniques have been widely available for years.


  • FoxDev

    @dstopia said:

    we forget about 2D games

    Haven't people been saying that for the last, what, 20 years? Yet more are being released every day…



  • 3D cinema is a gimmick. VR isn't.



  • @dstopia said:

    in the same way we forgot about mute movies with a dude playing the piano as background music.

    I watch those all the time.

    Buster Keaton is the best ever.



  • I've played quite a good game about this, called Ever17. reaching the final ending was quite interesting. It almost makes me interested in this genre of games.

    Anyway, I was using Mono for a while on my first solo project out of Uni (I've told you people before ofc), but with OpenTK and Mono, you can do quite a lot. I'd be using that for my game now if I wanted to write my own game UI system. I'd be using WPF if it supported Monogame/XNA with UI controls on top. Settled for Windows Store, since it somehow does support Monogame. Go figure.



  • @Keith said:

    Ultimecia only appeared towards the end of the game, so wasn't really much of a concern for most of it. Sephiroth is one step ahead of you throughout and a constant threat. Ultimecia did have some awesome music though.

    It's similar to what happened in FFIV with the primary antagonist switching a couple times over the course of the game.

    I like The Legendary Beast and The Castle.

    @Keith said:

    I think her story would have been much more interesting if Square hadn't flat out refuted this theory. They could at least have left it open for interpretation.

    I sensed that that was going to be about R=U before even clicking the link. In fairness, she didn't get much time in the spotlight, which is the same problem Zemus had in IV.

    While I don't agree with R=U, it is an interesting premise, because it's consistent with the major themes of the game: succession of witches, love, and relationships in spite of ephemeral life.



  • @Arantor said:

    You have heard of Unity 3D right?

    Nope.



  • And just for fun it's an old version of Mono which they can't update for some licensing reason so they're doing all kinds of weird fuckery and translating at compile time to something else, at least that was how it was last summer.



  • @KillaCoder said:

    Yes. The AI, pathfinding, graphics, lighting, collision detection, physics, terrain destruction and pretty much any other feature you'd care to implement would be more complex and advanced in 3D than 2D.

    Because, again, YOU NEED TO BE AWARE OF AN ENTIRE NEW DIMENSION

    I just want to point out that pathfinding in a 2D platformer is WAY more complex than pathfinding in a 3D environment.



  • That depends. Pathfinding in an mmo without jumping is simple. pathfinding in a rather vertical fps such as Warsow would be substantially harder. As with most things, it depends.



  • @Magus said:

    That depends. Pathfinding in an mmo without jumping is simple. pathfinding in a rather vertical fps such as Warsow would be substantially harder. As with most things, it depends.

    Yeah, it could get harder, but by and large most characters in an FPS just walk everywhere. In fact, most games are using an engine which has built-in pathfinding and they can literally click the "make the pathfinding data for me" button.


  • FoxDev

    Someone has to write the pathfinding algo though…



  • Is that more complicated than an algorithm that makes Marissa use Final Spark after bouncing an enemy off a wall? I'm terrified of the part where I have to make AI for my game.


  • FoxDev

    Well, the pathfinding algo has to find all navigable paths in an arbitrary 3D space, and may have to do so for several different actors, so yeah, I'd say it's going to be reasonably complex



  • Generally speaking, though, it's a 2D space, with occasional checks for object heights. For a fighter, distance becomes the main thing, but you also need to be able to deal with what type of thing is coming at you.

    Is it a homing projectile?
    Can it be grazed, or only blocked?
    Is blocking it even a good idea, considering the damage and my current hp and mp?
    Can I do a full dodge?
    Will that bring me in range of my attacks?
    Which ones?
    Has the enemy placed a trap?
    Does that matter right now?
    Can I get a hit in and make enemy projectiles disappear?
    Can I fly any farther, or is my mana out?

    Now, admittedly, most fighters don't have all these concerns, and there are far more I haven't thought of. But mine will. And no one has written it for me. Closest you can get is MUGEN, and I wouldn't try making a real game out of that.


  • FoxDev

    @Magus said:

    For a fighter

    Like Tekken? In that case, the pathfinding's pretty much non-existent; your arena will just be a flat square, will it not?



  • In Tekken, it may as well be a line. In my game and it's inspiration, Hisoutensoku, it's a square, except that there tend to be a lot of projectiles flying around everywhere that have to be dealt with. So again, it depends.


  • FoxDev

    But being a square, pathfinding becomes a non-issue. Originally, I thought you were talking about design in general; now I know it's more specific.

    Pathfinding won't really help with projectiles; you'll need something entirely different for that. At the absolute minimum, you'll need to define an FOV angle for your fighters, and maybe, depending on the size of the arena, a visible distance too. That will give you a cone or wedge in which your actors can 'see' the projectiles, and then take appropriate action.

    I don't envy working on that AI 😜



  • @RaceProUK said:

    But being a square, pathfinding becomes a non-issue. Originally, I thought you were talking about design in general; now I know it's more specific.

    The standard military shooter is no different in this regard.

    As for my AI, both players tend to see the same field, but a human can remember that the projectile the enemy just fired boomerangs, but probably won't remember the first few times it's used in a match. A lot of mindgames go into playing a character who can make a projectile that rises from the floor when it gets under an enemy, and which can come from either side, depending on what button you press.



  • @RaceProUK said:

    Well, the pathfinding algo has to find all navigable paths in an arbitrary 3D space, and may have to do so for several different actors, so yeah, I'd say it's going to be reasonably complex

    If there's a navmesh, 3D isn't any harder than 2D.

    If there's no navmesh (for example, if you change the world in real-time) then you're in a world of hurt.

    Note the dragons in Skyrim don't fly, but actually "walk" along the navmesh at a high altitude. And the places they can "roost" are pre-marked on the map. That's why all "flying" mods in Skyrim (and presumably Gamebryo games in general) are bullshit,

    The real shame is Saint's Row IV, which runs on an engine that fully supports flying entities and is a superhero-themed game, somehow doesn't implement flight as one of the superpowers. WTF?



  • @blakeyrat said:

    If there's a navmesh, 3D isn't any harder than 2D.

    Anyone ever played Star Trek Voyager: Elite Force? It was a Quake III Arena clone, and the navmeshes were so bad all the bots would get stuck in ladders and pile up until you had no one left to shoot. Until you reached the right ladder, then you'd get like 12 kills in 2.5 seconds.

    /off-topic anecdote



  • @mott555 said:

    Anyone ever played Star Trek Voyager: Elite Force?

    Yes.

    @mott555 said:

    It was a Quake III Arena clone,

    Haha no. It used the Quake III engine though.

    Also if you picked the female Starfleet officer as your character, they were too lazy to write two romance subplots so you were a lesbian.

    (However, you could choose a female player character, which makes that shitty old game more progressive than most games in 2015. Go figure.)



  • @blakeyrat said:

    Haha no. It used the Quake III engine though.

    It had a multiplayer mode which was pretty much Quake III Arena gameplay with Star Trek models and scenery instead. I don't know if I ever played the single-player missions.



  • @mott555 said:

    It had a multiplayer mode which was pretty much Quake III Arena gameplay with Star Trek models and scenery instead.

    Did anybody ever play the multiplayer? It was a total afterthought. That's like buying Battlefield 4 and only playing the single-player missions.

    @mott555 said:

    I don't know if I ever played the single-player missions.

    ... seriously? Ok well then.


  • Discourse touched me in a no-no place

    @blakeyrat said:

    The real shame is Saint's Row IV, which runs on an engine that fully supports flying entities and is a superhero-themed game, somehow doesn't implement flight as one of the superpowers. WTF?

    The jump-into-the-air-and-glide was that good in that game that actual outright player flight was unnecessary.



  • Lies.



  • @blakeyrat said:

    Frozen movie poster and you think, "oh a new movie from the guys who made Shrek?"

    :wtf:

    The style on Shrek was a bit more realistic than the style for Frozen. Look at the faces.


  • FoxDev

    Also, Shrek was Dreamworks, Frozen was Pixar?



  • @RaceProUK said:

    Shrek was Dreamworks

    Yes.

    @RaceProUK said:

    Frozen was Pixar

    No. Walt Disney Animation.



  • No Frozen was Disney.

    But it looks like a Dreamworks picture, that's my point.



  • I'd say it looks more Pixar than Dreamworks.



  • @Masaaki_Hosoi said:

    I just want to point out that pathfinding in a 2D platformer is WAY more complex than pathfinding in a 3D environment.

    I don't see how it possibly can be. Maybe I'm just an idiot (it's happened before!). But how are say, a dozen Halo enemies (including flying bugs) who are swarming in and around a multistory bunker with ramps, ladders, branching corridors, trenches etc, less complex pathfinding than a dozen Koopa Troopas marching left and right in Mario?

    I don't make games, but the bullshit detector IS going off. If I'm utterly wrong, I'd love to know how/why.



  • @blakeyrat said:

    If there's a navmesh, 3D isn't any harder than 2D.

    (Googles navmesh)

    @blakeyrat said:

    Note the dragons in Skyrim don't fly, but actually "walk" along the navmesh at a high altitude. And the places they can "roost" are pre-marked on the map.

    Yeah, they are pretty blatantly not moving freely in 3D space, I knew that much. There are flying enemies in games (such as Halo) where they ARE moving freely in 3D space though. Surely that's more difficult than patrolling 2D enemies?



  • @KillaCoder said:

    I don't see how it possibly can be. Maybe I'm just an idiot (it's happened before!). But how are say, a dozen Halo enemies (including flying bugs) who are swarming in and around a multistory bunker with ramps, ladders, branching corridors, trenches etc, less complex pathfinding than a dozen Koopa Troopas marching left and right in Mario?

    I don't make games, but the bullshit detector IS going off. If I'm utterly wrong, I'd love to know how/why.

    The main problem is in generating the navigation representation. Generally, a game like Halo uses navmeshes. Pretty much every game engine uses I think Detour these days, which basically voxelizes the entire level's geometry and from there it uses some simple heuristics to determine where it thinks agents are allowed to walk (based on agent radius, slope angle, and a handful of others). It IS complicated, but there's plenty of resources on the subject (well, and middleware, so you don't even have to bother writing it yourself).
    I'll disregard the ramps, branching corriders, and trenches, because how complicated the level is doesn't make any difference to how complex the pathfinding algorithm is (it's all just bog-standard A*). As for ladders, those are generally marked manually by the level designer as off mesh links. The pathfinder will return that link as part of its pathfinding results, and it's the responsibility of the AI to determine how to traverse it (this allows for different kinds of links, such as teleporters, ladders, moving platforms, whatever). Still doesn't make a big difference to the pathfinding algorithm itself.

    As for a platformer, the biggest hurdle is jumping. Jumping is, obviously, crucial in a platformer, and so you'd need to figure out how to automatically calculate, from any given position, where a character could possibly jump to. It's more difficult than it sounds.

    EDIT: Especially because platformers, at least the good ones, have the concept of momentum, so where you can jump to depends on how fast you're going when you jump.

    IIRC, the developers of Awesomenauts ended up eventually just going for manually placed waypoints, which worked because the levels were small, but this would probably be a huge time sink for larger levels.

    That said, pathfinding is rarely ever actually necessary in a platformer - usually, it's full of enemies that just walk back and forth all day.



  • Thank you for the lengthy answer.

    I still don't really understand how the 2D is more complex than the 3D though. Is the answer just "there are tools to do all the complicated 3D work for you"? If so, couldn't someone just make similar tools for 2D games? Wouldn't that stuff about momentum apply to 3D games too?



  • @KillaCoder said:

    Wouldn't that stuff about momentum apply to 3D games too?

    In theory, perhaps, but in practice not really. Most AI pretty much exclusively walks everywhere, rarely if ever jumping, and characters can generally stop on a dime. Now, trying to calculate where an AI could jump to in a 3D FPS... that would be tricky.

    EDIT: Unless you just manually annotate your level with off mesh links marked so that AIs know to jump across the gap.

    EDIT 2: Not saying the pathfinder for a platformer is anywhere near impossible, btw. In fact, just for fun, here's an example of an actual A* pathfinder applied to Mario. EDIT 3 Although I guess it doesn't actually pathfind the level so much as pathfind the game state... so maybe it's more like a highly specific version of GOAP.

    Infinite Mario AI - Long Level – 01:11
    — Robin Baumgarten



  • @blakeyrat said:

    If there's no navmesh (for example, if you change the world in real-time) then you're in a world of hurt.

    I just assumed they meant the algorithm to generate the nav meshes.

    Not sure about the Quake engine ones, but Source is... somewhat deficient at generating nav meshes on its own. You really need to tweak the hell out of them if you plan on using them.

    Back when I still a TF2 server, my group liked spawning the Horseless Headless Horsemann on Harvest Event (the original Halloween map). The Horseless Headless Horsemann is an AI construct that is on neither team and uses a nav mesh to navigate around the map. Unlike players, it can't jump, so there are some map areas it can't reach.

    However, this map didn't have its own nav mesh1.

    For whatever reason, nav generate would never generate a navigation mesh for the top of the side sheds, despite them having a ramp (textured to look like a ladder) to their roofs. This persisted even if you use nav_mark_walkable before nav_generate.

    Which means that the AI bot that randomly chooses a nearby target to attack would either stand there or run around the building without ever running up the obvious ramp (textured like a ladder).

    Fixing this made me realize how annoying manually creating a navigation mesh really is, as you had to manually create jump down points from these roofs... and the manually editor tried to create them as two-way connections every time I did.

    For more fun in TF2, try playing KOTH Nucleus with bots and watch them all jump into the center pit because the nav mesh says that's a walkable area...

    1 People familiar with this map are probably wondering how the ghost works without a nav mesh. Really simple: The ghost is actually a train and not an AI entity. When you see it appear and move down a hall, it's just transversing the appropriate path_tracks.



  • @powerlord said:

    Not sure about the Quake engine ones, but Source is... somewhat deficient at generating nav meshes on its own. You really need to tweak the hell out of them if you plan on using them.

    In legacy Quake and in QFusion, you have to enable nav mode on the unpacked version of a map in dev mode, which drops pathing nodes as you jump around. I don't know anything past Q3, though.



  • I guess Source does it differently. Which I guess isn't a surprise, as Source's navmesh system is based on the work either Rogue Entertainment or Gearbox software did for Counter-Strike: Condition Zero.

    In Source, nav editing is done using the game client, but it requires sv_cheats 1 and nav_edit 1 to do it (so you can't do it on an actual server) and works by flood filling out from spawn points.

    Now, this is how automatic generation works. Source also supports manually creating areas, it's just a pain to have to do it.


Log in to reply