Monday, June 30, 2014

ESO Update 2

I'm a little behind with my ESO news.  I know it's not the hot new thing anymore, that title belongs to WildStar.  But I am still quite interested in what goes on with it though.  It feels like Update 2 came pretty quickly after Craglorn's release.  Although, I'm not the best judge of time anymore.  As you get older, it feels like it passes quicker.  The patch notes for this update are pretty hefty.

Crypt of Hearts.  They released a veteran version of this dungeon.  While neat, it is of no interest to me.  I barely have time for solo content much less the group content.  This makes the second update in a row where the focus has been group content.

Lighting.  I won't pretend to understand how they did it, but they made improvements to how windows and lighting from them works.  The screenshots they provided look excellent, so it should provide some improved ambiance.




Weapons and Armor.  You can now pick up weapons and armor throughout the world from racks and other placements.  I'm not quite sure why they did this, as they don't seem very useful.  They are not worth anything, they are low quality, and they don't give you much of anything when you deconstruct them.

Bug Fixes.  There are a huge amount of bug fixes and balance changes included with this patch.

It was a decent patch, especially considering the turnaround time.   I do wonder what they have on tap for Update 3 though.  Hopefully it will include some non-group content.

Friday, June 27, 2014

They Got Me

I'm usually pretty prudent (read: cheap) when it comes to buying things.  Sure, there are exceptions but for the most part I don't go crazy.  Steam sales never pried too much cash out of my wallet.  In fact, I was thinking I'd get through the whole summer sale without a purchase.

That was until yesterday.  Kerbal Space Program was on sale for $16.  KSP is a game I have watched from afar for a while.  I loved reading about people developing their space program and exploring the solar system.  I was always hesitant to jump in though.  This sale was just the push I needed.

Now I just need to make some time and play the game.  Still, it is nice to know it is there waiting for me.  It's an extraordinarily deep game, so I'll really need to set aside a decent chunk of time to get started.  I may give WildStar a whirl first though so I can see where I stand with it.




Thursday, June 26, 2014

Dropping MongoDB for Redis

Up until now,I have been using the NoSQL database MongoDB for Project Venice.  It is very neat and easy to use.  It is almost perfect for my needs.  However, the more I thought about it, the more I was bothered by one feature MongoDB lacks:  transactions.  This is kind of a deal breaker for the game prototype I am developing.

Let's look at the scenario of a player buying an item off of a marketplace.  There are 2 main things that need to happen:

1)  Check and deduct item inventory
2)  Check and deduct player funds

This would involve two MongoDB documents.  While each of the two can be done atomically, they can't both be done together.  So stuff could happen in between.  This would be a bad thing and lead towards all sorts of problems.  MongoDB just does not support atomic operations across documents.

I started to research alternatives.  A traditional relational database ( mysql, postgresql ) would do the trick but I didn't really want to go that route.  This prototype is about learning new things, so I wanted to stick with NoSQL.  Redis and FoundationDB ended up being the two I seriously looked at.

FoundationDB has full ACID/transaction support but looked pretty daunting.  Redis, on the other hand, has transaction support ( but no rollback ) and looked very simple to use.  Keeping with the KISS philosophy, I went with Redis.  Implementing it was very simple and did not take long.  So now Project Venice is full on Redis-fied.  

Redis also has the advantage of being memory resident, so it is very quick.  The drawback is that it needs a lot of RAM.  I'm not anywhere close to needing to worry about that though.

Tuesday, June 24, 2014

Window to the World

My first milestone for Project Venice was to make a chat system.  With that complete, it is time to make my next goal.  Project Venice is heavily data driven and makes use of HTML to interact with that data.  An entirely form based game isn't going to cut it in 2014.    So, there will be a 'window to the world'. 

With this feature, you'll be able see the solar systems (only one in the prototype) and ships.   I am going to use Unity for this part of the project.  I was tempted to go HTML5, but Unity is better (quicker) to prototype with.  Basically, the Unity web app will use Socket.IO (web sockets) to get data from the server.  So all of the locations in the solar system will be displayed in the Unity window.  It'll be an isometric view, so think birds-eye but at an angle.  

Not only will locations be view-able, but you'll be able to see starship traffic between them.  This traffic will all be caused by player activities.  The main goal of this feature is to let players have a visible effect on the game world.  So if a new trade route develops, you'll be able to see traffic increase between the locations.   We need to crawl before we walk, so the goal here is to just have planets showing up and for the app to be integrated into the webpage.

Monday, June 23, 2014

Almost, WildStar. Almost.

Over the weekend we were out running some errands.  One of our stops was Target.  As per usual, I made my way to the electronics section to hang out while the wife did some shopping. I had no plans to buy anything, but you never know.  So I was looking through their selection of PC games, and much to my surprise I came across WildStar.

Sure, I can buy WildStar anytime online.  But there is something about holding a box in my hand.  I guess it reminds me of the old days when you could only buy PC games in a store.  So there I was, WildStar in hand all set to give in to the impulse buy.

I just could not pull the trigger though.  The $60 price tag just felt like too much, plus it would be my third subscription fee if I stuck around.  I was just not confident that I would get my monies worth.  I also remembered that WildStar offered guest passes.  Getting my hands on one of those might just scratch the WildStar itch.


Friday, June 20, 2014

ESO vs WildStar

ESO and WildStar are the two new hot games.  I'm currently only playing ESO, but I still pay attention to what is going on with WildStar.  Just this week, WildStar announced their first content patch, The Strain.  Its a good time to compare the kind of updates each game is putting out.

ESO.  Craglorn is already live, and the Crypt of Hearts has been announced.  Both introduce new group content to the game.  Craglorn included a new zone for groups to explore and ESO's first trial (raid).  It also bumped up the veteran rank to 12.  The Crypt of Hearts is introducing a veteran version of an existing dungeon.

WildStar.  The Strain will introduce two new zones.  These zones have solo and group content with no level increase.  They also include new 20 player group content.  PvP considerations were also made when building these zones.

And the winner is...  WildStar!  Unlike ESO, WildStar is introducing content for all types of players.  If I played WildStar, there would be something for me.  Also, the Veteran level creep in ESO is a bit concerning, so I am happy to see WildStar not going there just yet.

Thursday, June 19, 2014

Chat it up!

With Project Venice, I am setting concrete goals for myself in order to keep the project moving.  The eventual goal is a playable prototype.  My first milestone was to create a working chat system.  This involves people to be able to log in, and send messages to each other.  It sounds simple, but I had to create an account system, and get client to server communications working.  So a lot of base work for future systems had to be put in place.

To handle the chat system, I leveraged Pusher.  Pusher is a web sockets Publish/Subscribe system which makes it very easy to handle real-time communications.  Clients subscribe to the global chat channel, and on the server side I send messages to the channel and everyone gets them. Very easy.  I could have had clients send messages directly to each other, but that has its drawbacks.  I need to sanitize what is sent, so going through the server is a necessity.  Don't need folks sending XSS and other such nastiness. 

I also implemented a Title system.  Everyone starts out with the title 'Citizen.'  You can change your title, if you had more than one.  Right now the title is just used in the chat system.  That's another reason I need to go through the server, so I can add title information.  

You can check it out (and test it) here:  http://venice.duckdns.org/signin  There probably won't be anyone to chat back, but if you see your message in the window, it worked. 
 


Tuesday, June 17, 2014

Lots of Money

I was working building out some Project Venice data structures, specifically money, when it occurred to me that an Integer value would not be enough.  It would only allow players to have ~2 billion bucks (  2,147,483,647 exactly).  While that is more than enough for the prototype, I figured I better solve that issue now by moving to 64bit integers.  That will give us a max value of 9,223,372,036,854,775,808.  I think that should be enough :) 

Javascript does not really support 64bit numbers, which will make doing things like addition and subtracting difficult.   By default, mongoose ( the ORM adapter I am using for MongoDb ) also does not support a 64bit integer data type  Luckily, there is a workaround with mongoose-long.  So I went ahead and added that to my package.json file then did a npm install ( or you can do npm install mongoose-long).

Next, I adjusted my database schema and added:   money:mongoose.Schema.Types.Long

Now you can pass in really large numbers to the money field, hooray!  We're not quite done yet though.  The Long datatype is actually made up of a few fields and looks like this:  money: { _bsontype: 'Long', low_: 1942892530, high_: 2874 }.  That's not very useful, so we need to use toString() on it to get it to display as a readable number again.

If you are not using Mongoose, I'd suggest node-bigint.  It is pretty to use:  

var m = '1000000000000';
var lotsofmoney = bigint(m).add(10).toString();

With these options, Project Venice now supports a whole lot of money.  What will you do with it all?  Well, that will be the fun part :)

Monday, June 16, 2014

Bite-Sized Gaming

These days, finding the time to game is becoming more and more difficult.  Between work, projects, and family, gaming just gets lost in the mix.  That is unacceptable!  I will find a way to play games regularly again, even if it is not as much as it used to be.

I think the answer lies with how I work on my projects.  I pick one small task to accomplish each day, and no more than that.  I think I need to apply the same philosophy to my game playing. I am going to pick a small task, like doing a quest, and just try and accomplish that.

ESO is still my main game, so I will apply this new plan to it.  I'm just going to try and do one quest, or explore one area per day.  I will still progress at a glacial pace, but it is something.  Speaking of bite-sized gaming, it is also one of the core ideas behind Project Venice, but more on that later :)

Thursday, June 12, 2014

Farewell Rivs

Yesterday, some horrible news came across my Twitter feed.  Fellow blogger, Rivs (River), had apparently passed away.  He was only 41 years old.  Rivs was a fixture on my blog feed for as long as I can remember.  He started the Way of the Chosen long ago to cover Warhammer Online.  Then he moved to A High Latency Life to cover just about anything he wanted.

We talked many times through comments and a lot via Twitter.  He was always friendly and willing to help.  I still hope that this is all some elaborate joke, as he did have an interesting sense of humor.  I'm afraid that is just wishful thinking though.

Rivs, thanks for everything, you will be missed.