8Dromeda Twitter Disable Tracking

8Dromeda Blog

[All Posts] [<< >>] [2015-02-23]

Implementing things #2 (days 3-5)

While playtesting, I noticed that there's no proper check for when someone tries to log in with the same name simultaneously from two windows. I did a quick fix that will turn out to not be that good later. I also noticed that the damage indicator in entity information is not live-updated and fixed that too.

On the IRC channel a player had noticed that one can shoot the entities owned by a trader and then sell them back to the trader, as their ownership information will be lost. It's now retained instead.

I noticed it's hard to communicate positions in the world and added a coordinate indicator in the overworld view. I noticed that the ship moves when using the arrow keys in the chat input, and fixed that.

The interplanetary hub still wasn't buying the indigen-based ores that I added for the indigo biome. Added those to the list.

WASD keys support. Some server-side position checks. Lava damage. Disabled spawning the player inside scrapped entities.

I noticed that when an entity is destroyed, everything inside them was deleted. What a waste of interesting loot! I changed it so that instead a random part of the cargo is left intact.

Having played quite a lot by now, I became annoyed by the fact that I could only show either help, chat, cargo or the dashboard on the sidebar at a time. I call these toolviews. I wanted to keep both the cargo and the dashboard visible at all times, so I made a system for toggling them individually instead of switching between them. Next I found out that CSS2 absolutely sucks for automatically dividing vertical space between things that need to have headers and scrollbars inside them, and the end result only worked in Chrome.

The next thing was probably not worth the effort, but what I decided to do was to make the point-and-click driving system work again with the new style of ship controls. It took like six hours and is still fiddly. If you see me touching it ever again, remind me that I'm an idiot.

So, when attempting to use the awful point-and-click thing on a phone, I was yet-again reminded that the pre-resized images use a wrong colorspace for the conversion which makes them look very dim on many browsers outside the most common desktop ones, and found out that the conversion had been explicitly done in the RGB colorspace. Switching it to sRGB fixed most of the images, but not all of them. Whatever, it's playable. Now, of course the toolviews were broken on the mobile browser too.

I reworked the toolviews to be sized using Javascript. It ended up very robust and it's now compatible with everything that I care about.

I noticed that when viewing a rock's information, the rock image is not shown in the detail box, and made that happen. This appplies to all entities with a "simple" visual.

So, while playing on a touchscreen device is absolutely awful and you shouldn't do it, I still want it to work on a basic level. The gameview click handling code didn't, because a touchscreen browser won't emit a mouse movement event before it emits a click event, which Danagen Industries needed in order to function. It's rather badly designed, but in the end fixing the issue was a matter of invoking the method that draws mouse-hover information just at the click event before actually handling the click. So if you're one of those people who will play a desktop game on mobile no matter how awful it is to play, I've got you covered. Please enjoy.

More boring UI stuff: A player had issues unfocusing the chat input, so I made it so that if you click the gameview, it will surely get unfocused.

"Uh oh, looks like the server is a bit crashy today. Try logging in again in a few minutes if it disconnects" is what I tweeted when I noticed the login name check at the beginning of this blog post causes a crash sometimes.

I fixed the crash and reworked the connection and login handling to be less hacky.

A player (well, the only active player I have in addition to myself. You could be the second, or third! This is your chance!) noticed that selecting entities as targets for anything was broken. It broke when I was modifying the gameview click handling earlier. Trivial fix for a stupid bug.

After many minor fixes, I set out to figure out what the hell was wrong with players spawning inside pretty much anything, but mostly inside the landing capsule that they picked up after crafting their first ship. In which case there is no way to get out except /deleteme, becase you're locked up inside the ship... oh well let me explain.

What happens is that a player creates a ship, gets inside it, picks up the capsule and then the server is restarted. The server starts again and oops, in the database the player is marked to still be driving the landing capsule. And this was because a wrong hand-written parameter was being supplied to the event being emitted by the player's driven ship's custom setter method, leading to the database not knowing that the player switched the driven entity. So...

- ValuesModifiedEvent(m_sysname, {"last_driven_e_"}, e)); + ValuesModifiedEvent(m_sysname, {"last_driven_e_"}, c->getEntity()));

I also modified the database system to log a warning if a similar situation occurs in the future. Good coder me!

Next up: Validated and case-insensitively matched player names. I added login name validation which only allows names containing the characters [A-Za-z0-9_-], and will search the account in a case-insensitive manner. It's important to not have special characters in names because players, moderators and admins have to be able to distinguish them from each other no matter from what country they are from. This should serve us quite well into the future.

This time playtesting with LASERS!!! I find that when you shoot someone, and the someone's cargo hold extensions will be damaged and lose their capacity, and the non-fitting items drop on the ground, most of them were free to pick up by the attacker. I want attacking to not be that annoying towards the one being attacked, so I made that kind of drops to automatically copy the parent's owner information.

Money these days is the basis of both, co-operating and fucking others up, so the game needs that. And what you do with money to accomplish your goals is to move it around. And so far in Danagen Industries there hasn't been a way to do that. How stupid is that? It's idiotic. So what I decided was that there has to be a way to convert money into money items, and convert money items back to money. This way transferring money is no different than transporting anything else and that's how you design systems efficiently. Implementing took about 1.5 hours, if you wonder.

I died halfway through making this and halfway through writing this. I hope you did too. But there's more! MORE!? Yes! No! Bbgrklh! Mnnnffhnn'½!

I said there will be crafting so that's what there will be.

There was already some crafting but you couldn't really do anything with it when playing further from the beginning.

In crafting, there needs to be some kind of general steps or stages. The stages I ended up making is:

  1. you can mine or otherwise get ore,
  2. ore can be crafted into resources, based on their mineral content,
  3. resources can be crafted into components,
  4. components can be crafted into functional things.

Resources didn't exist so I implemented them, and altered the crafting system to make them work to some extent.

Then I had to come up with an actual mineral setup for ores and create some recipes so that you can create the same items that you spawn with, so that in the end you can make the same ships out of raw materials. It's clunky and difficult to discover what can be made from what.

Yes, you can do that now.

Holy shit I'm exhausted.

Definitely taking a day off now.

(As usual, the game is running at play3.soilnar.net.)

All Posts