I forgot to push these earlier

The list in todo.txt are a list of tasks that will be needed to complete the login/user accounts overhaul, and will hopefully make the server a persistent system.

Once the server is persistent (via the database) I can start on the combat system.

I just found a shirt I bought about 2 years ago, and it doesn’t fit me anymore. I can’t lose weight right now, I’ve got so much else on my plate. But why am I gaining so much? I officially hate my life again.

I’ve spent two nights straight coding, but it doesn’t feel like I’ve done enough. I think I might be pushing myself too hard, but I might not be pushing hard enough. I just dumped my list of TODO tags into a file, and pruned the least necessary ones. But I also need to move on, to implement the combat system, somehow. I don’t even have the first clue about how to do it.

I might create a structure in the server called “CombatEntry”, which has a list of participating players, and some monster data, etc. Then the server can process these by incrementing the ATB gauge for each participant, while the client calculates it independently. Then, when the players choose an action, the message is sent off to the server, but it isn’t executed until their gauge is full.

For this I’ll need to implement collisions with the combat portals, which in turn requires collisions with the maps, which requires the mas actually having something to collide with (probably just a square of bricks or something).

Theres so much in the existing code that needs to be cleaned up, but there’s also so much more I still need to do. I want to finish this game by the end of the year, but I just feel terrible. I don’t know what to do, and I can’t think or focus right now.

I’m tired, so I’ll let this commit message speak for itself:

Fixed a horrible region coordinate bug

Coordinates are supposed to be stored by their x & y, but the sizes of the
tile sheets were getting mixed in as well. When trying to store a region
at (0, 20), it was being stored at (0, 260).

Another visual bug inside the tile sheet's rendering function masked this
issue until now.

Another thing to note is that I've removed an incredibly complex system
for updating the client's map. The new system may seem complex at first,
but it is straight forward compared to what it replaced.

I've also fixed a few logarithmic lagging points in the code.

Oh that pisses me off, it wasn’t being stored at 260, it was 640. God damn.

Anyway, you can get to the repo above, and the newly patched release is here:

release 0.2.1

As always, you can find the latest Windows build in this dropbox link:

Tortuga.rar

kr-studios:

I’ve got this weird feeling like I’ve been storing the regions wrong…

OMG, my code contains a series of horrendously terrible bugs which work on concert to make everything look just fine. What the fuck?

I’ve just added a player counter for the server list, and the lobby rejects attempts to connect to incompatible servers. I determine if a server is incompatible via the region sizes, but I can extend this later for various mods.

The current working branch is here.

Oh, did I mention that when I reach alpha, I’ll start using the uplink developer’s license?

Apparently my client & editor programs are using singletons for their controller objects? It feels like this list of TODOs is getting longer the more I work.

kr-studios:

OK, so my 3 item tables (for mundane items, consumables and equipment) have these fields:

  • uid (for SQL internals)
  • itemID (for server/game internals)
  • stackSize (except equipment, which cannot be stacked)
  • owner (references the owner’s uid)

Also, the player records also reference equipment they own (I’ll have to verify this) for each equipment slot (weapon, armour, etc.) The server proper will have to verify that everything is OK with the server, or at least I’ll need to be careful that nothing gets mixed up. I’m certain there’s probably a better way using SQL itself, but I’m very noobish.

Any advice is appreciated. I’ll be pushing this new branch in a moment.

Here is the commit, and here is the branch. I forgot to mention that I’ve also adjusted the SQL script function, to take the callback that is then passed to sqlite3_exec(), and handles the error message well(by throwing an exception).

OK, so my 3 item tables (for mundane items, consumables and equipment) have these fields:

  • uid (for SQL internals)
  • itemID (for server/game internals)
  • stackSize (except equipment, which cannot be stacked)
  • owner (references the owner’s uid)

Also, the player records also reference equipment they own (I’ll have to verify this) for each equipment slot (weapon, armour, etc.) The server proper will have to verify that everything is OK with the server, or at least I’ll need to be careful that nothing gets mixed up. I’m certain there’s probably a better way using SQL itself, but I’m very noobish.

Any advice is appreciated. I’ll be pushing this new branch in a moment.

birth timestamp NOT NULL DEFAULT (datetime()),

OK, so the issue was the parentheses around the datetime function: I need them otherwise it complains. I realized why I created the items in the database file ages ago: it was to allow a one-to-many realtionship between the item type and the players. This isn’t what I want now, so instead I’ll hardcode/script the items (when I get to them) and the database will just store their index.

I want to do an overhaul of the game’s login system. The current system is extremely… basic. In fact, the username/handle and avatar is selected via the config file, which is just friggin’ terrible. 

The current  system is like this:

  • C/S: ping/pong for finding servers (only lan, could use a catalogue at some point)
  • C: send the connect request
  • S: send the connect response (with client index)
  • C: send the player create command (including name, avatar, etc.)
  • S: send the new player’s data to everyone (not good with the paged maps)
  • C: send a sync request (all server data)
  • C: request nearby regions
  • S: send all server data
  • S: send requested regions, creating them if needed

This is extremely bad. What I’d like to do is to have the players type their character’s names when they join the server. Problem is, they also need a password. Now… I’m not experienced with security, so I’m a bit worried about this. 

In addition to this, I also have a few other bits and pieces marked by TODO tags that need fixing, and I want to move onto the combat system at some point. I’m really unsure what to do…

Oh, I wanted to say as well, if a character with a certain name already exists, then the player is using their previous character. So the database is finally being used for something.

I just read the SQL startup script, which creates the database, and I’ve just realized that the item types are supposedly stored in the database, rather than being hard coded? I’m not certain if that’s the best approach there. I’m not even certain how to hook the lua scripts into them yet. Amazingly I still understand what the SQL script is doing.

OK, might as well start on something.