Wednesday, August 31, 2016

Sub Rosa Alpha 26 Traffic Test

I put a new build of Sub Rosa in the beta branch, it's just a race mode test of the traffic simulation and netcode so don't expect too much.  All of the buildings are placeholders, and a lot of the rendering is still be rewritten.  The password is yerbamateisgood if you want to check it out.  (Windows only right now)

Monday, August 15, 2016

Sub Rosa plan 8/15/16

I realize I haven't done a blog post in a while, so here's some of the things we've been working on this year.  There's more features being developed, but I try not to talk about things until they're implemented, or at least mostly planned out.

Character Models

Fi Silva has been making some really cool character models, so we can have a lot of variations in clothes and accessories.  It took a while to convert the engine from procedurally generating box people to loading .fbx models with bones, but now that the system is in we can easily load in new models.  Customizable characters is important to the game, players will be able to choose the basic look of their character (it won't be random like in Rust or previous versions).  Clothing and accessories will be bought in-game, so the richer you are the fancier the suit you can wear.

Traffic Simulation

Traffic might seem boring or unimportant, but for Sub Rosa it will create some of the more interesting situations.  For example, imagine having to tail another car, staying close enough to identify it among the traffic, but far enough to remain undetected.  Or just a standard car chase, having to weave through traffic, drive the wrong way on a one-way street.  The new traffic simulation can handle thousands of cars, all simulated on the server so every player sees the same thing.  Here's a video that probably is boring though:

City Editor

The old city editor was pretty limited, the new one is now all done in 3D, so things like hills, tunnels, subways and freeways are now possible.  The new city will be much larger also, so there will be different areas, opening up a lot of gameplay possibilities.

Building Editor

One of the main limitations with the old building format was the windows, there was only a few different sizes to choose from, and they couldn't share an edge with a doorway.  It took a lot of thought to figure out the best system for this, but it now supports multiple windows per edge, different types of doors, interior windows and mullions.  That's right kids, mullions.


One of the biggest changes is converting to OpenGL 3.3 core, which should help with performance and compatibility.  I held off on using newer OpenGL versions since I didn't want to make it incompatible with older PCs, but at this point every video card made in the last 8 years or so supports 3.3.

I've also been adding reflections for windows, cars and mirrors, as well as improvements to the atmospheric scattering and lighting.  I'll also be adding HDR support and MSAA soon.



Fixed a bug with the differential simulation.

Next Version

Alpha 26 should be ready for testing in the next couple weeks, it will first go on the beta branch in Steam, all current players will be able to play.

Tuesday, October 6, 2015

Sub Rosa Alpha 25

Dedicated servers:

New account system - based on Steam ID
Admin ban system - admin can ban players for an amount of time (real-time minutes)
Car selling - put the key in your right hand to sell
Lunch - buy a burger at lunch or max HP will drop
Billboards - players can buy the billboard and put their message up
Bank - withdrawal/deposit cash
Persistence - world mode doesn't reset all players outside the city now
Round mode manager - based on net worth, can fire people (shoot them before the round starts)

Client optimizations - should run faster now
Server optimizations - 32 players should be possible on a decent server

Netcode - pausing during firefights should be fixed
Voice - whisper/yell modes work in voice now, using whisper limit distance to 4 meters
Voice display - no longer goes through walls

Monday, August 3, 2015

Sub Rosa Alpha 24


Dedicated servers:
To run an open world server add "gametype=4" in the config.txt
Server system requirements are pretty high right now, does not run on a potato.

Spawn killing penalty is much harsher now, 5% and you will take as much damage as you give out.  When a player spawns they have a timer between 3 and 6 minutes (real time), if they pick up a gun or enter a base the timer is set to zero.  Entering a car sets the timer at 15 seconds maximum.

One of the main changes is the engine, it can now support a lot more types of buildings which will help to add more detail/expand the city.  I know one thing people are going to ask about is optimization, now that the engine is mostly complete I'll be working on benchmarking tools (so I can tell what's running slowly on different PCs) and implement the ideas I have for improving the rendering.

I'll put up a link to the Windows/Linux dedicated servers soon, hopefully people can host servers in all the places where people have had to deal with bad pings up to now.

added round-based mode
added voice chat
added magnum (the ammo is just a magazine right now but it will be an actual revolver soon, Receiver-style)
added uzi
added gun shop
added helicopter
added fall damage

Stock increases are more reasonable now, just a temporary fix as the stock system will change soon
Teams now start with two phones, the first has the team number and the second has the team number plus 1 (Nexaco is 4444 and 4445)
Improved gun/item handling, still working on smoothing this out more
The hospital is the only place to heal, testing this out for now

Fixed the landscape rendering which was extremely slowly on some video cards
Smoothed out the netcode for cars and players

Thursday, January 1, 2015

Sub Rosa Alpha 23

Fixed player character bug
Bandages can now be used twice
Old spawn building is now a hospital
Can exit immediately in hospital (player's character will disappear)
Otherwise your character will remain there for 1 minute
Trade missions can now have more than 1 team with cash

Death tax is now 5% of your cash over $10,000
Civ killing with 2-5 mins of spawn is now $10,000 plus 5%
Changed stock calculation, now decreases half of the potential increase if you fail (another team gets the disk)
Fixed client stock report bug

Fixed body parts getting stuck on stairs or windows
Fixed train window bug
Fixed stock display bug
Limited car buying to 3 per hour
Limited stock to 100,000 shares per team

Here's some of the changes for Alpha 23:

You can now buy stock in your company, if you succeed in missions the value will go up, if you fail it will go down.  When you sell stock you get 95% of the value.

Withdrawing money:
The banking in your base is now the company account, if you have a trade mission you can withdraw up to the amount in the mission info.  At the end of the mission the money withdrawn will affect your stock price according to the market cap (value of the stock times the number of shares).  Depositing money in the base also goes into the company account, with the same formula.  Example:  If the total shares owned by your team is 100, and the value is $100, if you deposit $1,000 the value of the stock will increase to $110.

You will now spawn outside of the city, the train should come around every couple minutes.  Get on it.

Civilian killing penalty:
There is a $10,000 penalty for killing a civilian within 2-5 minutes of their spawn, the amount is randomly chosen by the server.  If a civilian picks up a gun the timer goes to zero.

There are now 3 chat modes, normal, yell and whisper, this will affect the range at which players can see the text.

T: Talk mode
Y: Yell mode
U: Whisper mode
Enter: Chat

added $1000 bill
added landscape
added newspaper
added ambient occlusion option

optimized rendering

fixed aim
fixed glass slowdown
fixed player movement/standing up
fixed view while rolling
fixed players warping through walls/floors
fixed car engine sound
fixed traffic

Friday, June 13, 2014

Programming Tips: Comfortably Enum

After reading Casey Muratori's great articles on programming I've been inspired to post a few things on how I program.  In the last article he talked about enums, something I didn't really start using until after Gish, which can be very useful.  However, it can be unwieldy if you try to enumerate too many types, like for example a list of textures.  Say I have 4 player types, and 4 vehicle types, I could do something like this:

enum vehiclelist

enum texturelist

Then to bind the texture for the plane I would use:


The problem I ran into was if I wanted to add more vehicle types, or support more players, I would have to change the texturelist enum.  Also the enum would start to get very long, and while there's ways to shorten it I still felt that it was getting messy.

What I came up with instead is using a simple struct that's enumerated at run-time.  So the texture enum looks like this:

  int loc;
  int player[MAXNUMOFPLAYERS];
  int vehicle[VEHICLE_END];
  } texturelist;

void setuptexturelist(void)
  int count;

  for (count=0;count<MAXNUMOFPLAYERS;count++)
  for (count=0;count<VEHICLE_END;count++)

And to bind the texture:


The advantage here is I can add or remove vehicle types without having to change the texture enum, and I can have all types of textures without having a giant enum.  The only disadvantage is you have to call the setuptexturelist function at the beginning of the program.  This is actually the cause of the sound bug in Sub Rosa, where the car crashing into something plays the gunshot sound.  I wasn't calling the setupsoundlist function in the dedicated server, so all the of the soundlist is set to 0, which is the gunshot sound.  So you do have to remember to call the functions to enumerate even if the dedicated server isn't playing any sounds or displaying any textures.

And for making it through that here's a video of boxman falling over a wall:


Tuesday, April 22, 2014

Humble Weekly Sale

The new version of the Cryptic Sea EP is now available in the Humble Weekly Sale, you can get it and some other awesome games for less than whatever you want.  There's a bunch of new features, including singleplayer mode for Skate or Don't!, and 5 new tracks and cars for Touring Car Legend.  If you already bought the game with the Humble widget you can download the new version from the Humble webpage.

I've been making good progress on the other games also, should have some updates on those soon.