I made a Minecraft mod!

After 10 years of not touching Java I somehow made a Minecraft mod. The reason? I wanted to see if I could turn on my IoT living room light with a switch inside Minecraft. Great success!

The mod is called Breakoutbox and is available on my github page: https://github.com/rheide/breakoutbox.

Breakoutbox is a very basic mod that lets you 'break out of Minecraft' by calling external scripts on the serverside. Once you're out, anything's possible. Controlling IoT lights as mentioned above, pulling in cryptocurrency prices into your Minecraft world, pushing a button to make a Tweet, you name it. And building all those things is a hell of a lot easier in an ad-hoc external script than it is to publish a dedicated Minecraft mod every time. Anything and everything, all of the time.

It was interesting to experience the Java ecosystem again after such a long time away. Some observations:

  • The build system for Minecraft mods is really nice. The Forge MDK (mod development kit) comes with good documentation to get you started, and a gradle build file that makes it super easy to compile a mod jar or run a dev Minecraft server.
  • That said, the Minecraft code itself is closed-source, so from there on you're walking through decompiled, de-obfuscated bytecode, guessing at what things are ok to call, hoping the arguments you've provided make sense. This could've been an absolute nightmare, but thanks to the fact that Java is a strongly typed language, and community efforts at deobfuscating the code every time a new release comes out, it's surprisingly not that painful.
  • It's so difficult/terse to do simple things in Java, compared to Python. The Java standard library featureset is still a joke. No json or yaml parser in the standard lib? Bah.
  • I gave up trying to figure out how to bundle a third party library with my jar. Couldn't figure out if it's just not standard practice or if I then had to burden everyone who downloads the mod with also figuring out how to download the dependency. Either way seemed bad.
  • It's veerrry easy to get Minecraft to misbehave. The redstone behavior has a 'contract' in that running a redstone command should finish quickly, e.g. in less than .1 second. External scripts can easily take any amount of time, and I had to guard against that. I found it quite interesting how easily I could get a 'professional' game to break just by adding a few lines of code in a tiny jar file.
  • I managed to get around the long-running script issue by queueing the tasks in the Minecraft server object's internal threadpool, but I wasted hours trying to figure out why it wouldn't just work from my own threadpool. I had created a separate threadpool for my own tasks, but somehow the commands never executed if I ran them from my own threadpool. Queueing them in the threadpool that was kept in the server object fixed things. Without looking at the actual source code, which is impossible, it's very difficult to say why. My guess is that the internal threadpool had some kind of hooks attached to it that updated the game state at the end of each task, whereas with my own pool stuff just disappeared into nowhere and was ignored by the game loop. But who knows.

Anyway, it was a fun little exercise. It was a project I started in spite of wanting to finish other projects I had already started. I had no particular need for it, but having it available on github in the form of a downloadable jar that anyone can stick into their Minecraft server, and source code available for anyone who feels like forking it, does feel good. I will endeavor to finish more things this year.

(I think I finally have an idea in my head to reintroduce comments to this blog without incurring massive maintenance or financial costs. More to come.)

Posted in Games , Tech | Tagged , ,

Quality versus quantity

My soreness about No Man's Sky has led me down an interesting path. I was (and still am) incredibly disappointed in the game because I wanted it to be the successor to Freelancer, which it really wasn't. NMS wasn't really much of anything. I wouldn't even call it a space game, since there's literally nothing to do in space, it's just hopping from planet to planet. Anyway, my frustration with the game has led me to thinking about how I would build a proper space game, and I've been writing down a lot of ideas since my previous post. Then I learned more about Star Citizen and realized that it will have about 90% of all the ideas I've written down. I'm bloody amazed by that. Star Citizen is going to be epic.

The reason I think Star Citizen is going to be amazing is something I realized as I was preparing to build my own space game. After having written down all my ideas I realized that I am pretty much capable of implementing all of them. "All I need to do is pick a suitable 3d engine and learn how to use it. Easy peasy". Of course, before I even got to that stage I realized that the basic setup I was envisioning would take me years to develop by myself, even if I quit my full-time job. But I can see quite clearly the reasoning that goes into building a space game: it would take me crazy amounts of time to do this all by myself, so that is a problem that needs to be solved.

Procedural generation is one of the ways to solve that. Even as a one-man team you'll be able to generate crazy amounts of 'content'. The problem with that is, as No Man's Sky quite sadly demonstrated, that the content will become utterly boring and repetitive, no matter how good your algorithms are. One of the key features I wanted in my own space game is that there are factions and factions within factions, and standings between factions, and a galaxy whose factions keep changing. NMS has none of that: it's just one bland galactic plane of a little bit of everything everywhere but not anything specific anywhere specific. Better procedural algorithms can fix this. They can add more structure, more variety, more realism. But in the end, once you 'get' the algorithm, the game is over for you. You will find nothing new.

Star Citizen does not have this issue, because the team of Star Citizen has lots and lots of money. They get to hire lots of people and they get to handcraft their content. Each of their star systems is meticulously designed; its history written and rewritten until it is perfect. There is a storyline, there is custom, unique content. It's the exact opposite direction of No Man's Sky. It's quality versus quantity.

The quality-vs-quantity thing has always been an issue with games. I remember the Grand Prix series, of which 2 was brilliant, 3 kinda showed Crammond's inability to keep up, and 4 came out in a time where the competition had larger teams and managed to release a much more polished product. A more recent example is Kunos and his netKar series, followed up by Assetto Corsa. netKar was a kickass sim in its day, but you could clearly see its limitations for having been built by one man. netKar Pro started out with the engine sounds synthesised rather than sampled, which is surely a faster way to do it, but nowhere near as immersive as having the actual engine sound as recorded, which is what they did for Assetto Corsa. The cars in Assetto Corsa are incredibly well made, with as much detail crammed in as they could. A manual process that could only be done by a larger team.

In retrospect, No Man's Sky focused on all the wrong things. It focused on procedural generation as its main gimmick, which it should never be for any game. It should be used to assist in making the game more immersive, but if you take it away the game still needs to be a game. No Man's Sky is just nothing without it. NMS also focused on being able to take off from a planet and flying into space. It's a cool gimmick, but it was implemented poorly and, to be honest, I couldn't care less about it. It's the liveliness of space and each of the planets that immerses me. With no backstory it's just not interesting.

I'm still kind of interested in building my own space game. I suspect that when Star Citizen comes out it'll satisfy most of my space needs, but there's still things that I'd like that Star Citizen doesn't have, or do differently. The ship monetization in particular is a thing I definitely do not like about Star Citizen. Also, in SC the factions seem pretty unchanging and static. I wonder if there'll be player actions that can influence the balance of the galaxy, other than predefined events by the developers. When it comes to the perfect space game we're still not quite there yet.

Posted in Games

No Man's Sky

I came very close to calling this post 'Why I hate No Man', continuing the trend I set last time with the Interstellar post. But let's not.

Freelancer is one of my absolute favorite games of all time. The free flying through space, the storyline, the super-detailed universe, I loved all of it. All I could wish for was that there was more. Once the storyline ended there wasn't that much left to do, really, except for getting the best possible ships and visiting all the systems. I really, really hoped that No Man's Sky would be the successor I was looking for. Sadly, it's not. At least, not yet.

I've been playing NMS quite heavily since it came out. Maxed out the ship, maxed out the multitool upgrades, maxed out the exosuit. Exploring new planets is a pretty neat gimmick in the beginning, but it quickly turns into a resource-finding grind. That said, I thoroughly enjoyed spending a few real-life days on a beautiful planet full of different kinds of animals while focusing on getting better ships, mining and getting new technology. I genuinely felt sad about leaving it, knowing I'd be heading to the center of the universe and would never see that planet again.

..but that feeling quickly turns into utter numbness once you realize that every single fucking planet is the same. Sure, the color scheme changes and your near-to-death-ness slider depletes a bit quicker on some planets compared to others, but funcionally they're the exact same. Animals are either ignorable or killable, buildings look the same everywhere and there's only a very limited set of 'gimmicks' (crashed ships, learning words, discovering technology) to run through before you're done. Mining resources could have been interesting, were it not that all the expensive resources cost roughly the same and all the cheap resources can be found everywhere, on every single planet, all the time, never more than a 2 minute walk away. It's the same for all the fucking alien outposts on every single planet. NMS tries to establish a lore in the form of the sentinels, the ever-present space police, which supposedly protect the planets from change, colonization, etc. by the 3 major races. Yet somehow the 3 major races establish bases by the buttload, once again on every single planet, once again always within a 2 minute walk. That stuff needs some serious attention by the developers, cause it makes no sense, not from a realism point of view, not from a lore point of view and not from a common sense point of view.

During the game's development we were promised a lot of things that did not make it into the final game, but that doesn't matter that much to me as long as the game we end up with is fun to play, or at least has potential to be turned into something better by way of patches. I'm a bit dubious about NMS in this respect. The procedural universe is pretty awesome, but the devs seem to have spent a lot of time on just the procedural bits of it and completely forgot about the gameplay. NMS also seems to have been dumbed down severely (for PS4 users perhaps?). I absolutely hate the way the ships fly. You can't crash into anything, you can't fly at a specific altitude over a planet, it's just a bloody elevator. Ground floor, sky floor, space floor. If you try to point your ship at something that might pose the slighttest risk of a crash, the game takes over for you and prevents it. So much for feeling free in your own ship. It doesn't help either that all of the (beautiful procedurally-generated) ships handle exactly the same. Space pirate attacks are always exactly the same. Trading ships always warp in exactly the same and do exactly nothing (compare that to Freelancer where they were always moving from one place to the other and you could hail them and they'd tell you where they came from, what they were transporting and where they were going). So much of the game is just unfinished, unpolished or uninteresting. It frustrates me because it could have been so much more. Seriously, procedural generation is a great backdrop for a storyline, but the storyline is paper-thin. Where are the characters? Where are the factions? Freelancer was a million times better in that respect. But I bet it's a lot easier to turn NMS into Freelancer than it is to turn Freelancer into NMS.

Three things can happen to No Man's Sky in the future: 1. the devs are so stressed out from their (amazing!) effort to release a fantastically complex game that they call it quits and move on to the next adventure. I would absolutely not blame them for this. 2. The devs keep simplifying the game even more to appeal to the mass audience and keep adding features that no one wants. I'd say this is likely, but I would like to see 3. the devs, finally released from the stress of releasing a massively-hyped game, feel free again to focus on what they originally wanted the game to be. I bet this would require massive changes, and the longer they wait with this the more it will piss off the fanbase of the current game. But screw that. The game could be a lot better. I hope they take up the challenge.

 

Posted in Games | Tagged ,

Path of Exile .... NO.

Path of Exile is tedious. There's no variation, there's no relaxation. The only thing you do is level up your character, your weapons, your gems, your skills. If GTA is the LSD of games then surely Path of Exile is the heroin. Despite that, I do quite enjoy Path of Exile, much like I'm sure I would enjoy heroin. But in the end all you can think of is the next fix.. to collect enough currency to construct the perfect weapon, to do enough farming to get items and to level up, bleh bleh bleh.

And the worst thing, the thing that PoE just slams in your face, is when you've finished Act 3. There's a palace level in Act 3 that's truly beautiful, truly different from all the other levels, which are quite repetitive. So there you are, having finished act 3, hoping for a bit more variation in act 4, BUT NO, it takes you back to fucking act 1! And the second time through it's more difficult. Heroin. Truly heroin.

No, I'm done with Path of Exile. There is no fun. The initial thrill of mastering the passive skill tree and figuring out the gem system keeps you going, but after that it just becomes an endless grinding experience.

 

Posted in Games

Gran Turismo 5 makes me unhappy

Yes, I bought the game. In the store. People who know me know how rarely I play games, let alone buy one. But seeing as I was staying at my friend's place and he owns a PS3, I thought I might as well use the opportunity to play some Gran Turismo.

That was not a good idea. I have seldom encountered a game that makes me this unhappy. The most disappointing bit of the game is: everything. Everything's the bloody same as GT4. The same sounds effects, the same structure, the same cars, the same physics. Yes, there are new cars, but the game makes you play with the old ones about 90% of the time. Yes, the physics improved (a lot, even) compared to GT4, but it's still so completely different from every other racing game and simulator that it's still closer to GT4 than anything else. It still feels like shit.

I do like some parts of the game. After all, there's so many cars and so many tracks to choose from that there's bound to be something I like. I quite like driving around the Nordschleife in a Ferrari 430, just like I used to do in netKar back in the day. NetKar had way crappier graphics, no opponents and the track model was terrible. But I enjoyed that more than GT5.

GT5 just doesn't feel real. It doesn't even try to feel real, especially once you get to racing the really fast cars. It just loses all connection with reality, and it's not enjoyable as a game either. I expect a fast car to handle like a car, not like a fucking brick with a spoiler. The car either turns mega-abruptly and then magically straightens out or it doesn't turn at all and you crash. I've never driven a really fast car before, but I've played plenty of racing games and sims, and they're all quite similar to each other, and quite different from the GT series.

The controls don't help either. There's no way you can adequately control the throttle levels with a PS3 controller. This is a bit awkward, as the game's physics really don't make me feel like driving it with a steering wheel, yet driving it with a controller is nigh-on impossible. I ended up turning on some driving aids which made driving the really fast cars slightly more tolerable, but still very far away from being fun.

And then there's all the stupid trials and licenses and events the game makes you do. Do I really have to do a Nascar event for 5 fucking times to complete game? I don't care about Nascar. I quite liked the go-karting events though, because they are so far away from driving a real go-kart that it becomes fun again. Over the top and down the mountain.

I should also give a special honorable mention to the Top Gear challenges. I love watching Top Gear, it's an awesome show. So why are the Top Gear challenges in-game some of the most boring, tedious and stupid races in the entire game? Each and every one of those races is like GT5 attempting to parody itself. They're complete uninteresting and feel like a complete waste of time.

I haven't mentioned the technical quality yet. I complained before about having to wait ages to  download hundreds of megabytes of updates, and then having to wait even longer for the damn game to install itself to the hard drive. And for what? After you install it it's still crappy ass slow. Loading races takes ages. Hell, even loading menus takes ages. Why?!?! How shit of a programmer do you have to be to make a menu load slowly? If mobile phone apps can do it then so can the PS3, dammit. And why do I have to register for the fucking playstation network in order to access stupid online events that could just as well have been offline events because you play them offline against AI opponents... It took them years to make this game yet they never fixed the menu layout and the general game flow. This game is as out-of-time as Duke Nukem Forever. Shame.

I would not recommend this game to anyone. People who like arcade racing games will have a lot more fun with the Need for Speed series or whatever the Xbox has these days. Racing sim fanatics will of course stick to the PC, which has a great range of sims in netKar Pro, LFS and rFactor, and lots of other sims too that are quite excellent. I honestly can't think of any reason for people to play GT5, unless you like torturing yourself. Do yourself a favor and put it in the microwave.

Posted in Games | Tagged ,

Online Gaming

This is a rare post for me, as I don't often play games any more, let alone blog about them, but recently I've become quite addicted to a space game called Freelancer, and one if it's modifications, called the Discovery mod. I started playing it because I played the single player game a long time ago, and finding out about Discovery made me want to discover all the cool stuff that was added to the game. So I figured, why not try it online? That was a big mistake, because I've been addicted ever since.

The game is freeroam and goalless, just like the GTA series, except in space. Basically you can just fly around in a tiny little spaceship and attack other ships, dock on planets and starbases and buy better ships and better equipment. How you play the game is entirely up to you. The game is comprised of many different factions, like police, pirates, trade companies, tech companies etc. Based on the faction you choose you will be hostile with some and allied with others, which limits the areas of space you can go to, but also gives you benefits like access to hidden areas and better spaceships. All in all it's fairly standard RPG stuff, except without elves, dwarfs and air.

Why is it so addictive? I think it's the leveling-up system. I just wanted to play around and try out some new spaceships, but before I can afford those I have to make money. To make money I need to either kill NPC characters, which takes a long time, or find a better way. Two good ways to make money in the game are to trade commodities from one area of space to another and to mine asteroid fields to collect and sell the raw materials. I chose to trade. Initially I didn't earn a lot of money from trading because my ship was too small, so I decided to spend money on a larger freighter ship first before getting the fighter that I wanted to play with. Then I started reading information online about where the best trade routes were. Then I wanted an even better ship which required a faction membership, so I started to read about the various factions, their enemies and allies and the kind of ships that you're allowed to have if you're a member. The Freelancer universe is huge, and there's dozens of factions that either hate or love or meh each other, and once you get caught up in that you'll never get out..

I finally got the fighter that I wanted, which I used to explore, finding new places that weren't in the original game. Because the area of space is so huge it's quite rare to encounter other humans, yet I had some interesting encounters. And surprisingly nonviolent. In one case I happened across an asteroid field in the middle of nowhere, and someone else was mining there. I helped him out and he showed me how to access a hidden area. In another instance I took a wrong turn and ended up in an area full of enemies. I noticed another player near me who was on my side, so I ran to him and let him shoot all the bad guys for me. Then he died and I looted his stuff. (Actually that happened twice). The most awesome moment was when about 10 different players gathered together to fight one huge enemy, which reminded me of my high school days playing Serious Sam with my friends.

The multiplayer aspect definitely makes the game a lot more enjoyable. It also makes you think that your time is better spent playing the game online instead of offline, when in fact both choices waste an equal amount of time.

Anyway, what I'm trying to say is that I've gained a new insight into the addiction of online games. If I wasn't so busy in real life I can see myself becoming totally addicted to this. Fortunately I have some pressing issues to attend to that will force me away from the game for a while, but my characters will still be there later when I find more time. Online gaming is fun, but I must control myself.

 

 

Posted in Daily Life , Games | Tagged ,