Text
Pic unrelated
After a little hiatus, I got to work on the huge class that will control the AI ships. It also serves as an object pooler, which will be nice once there’s 100 or so ships floating around and interacting with each other. When the game first starts, and whenever a ship gets sunk, it randomly assigns it a new model, name, captain’s name, country of origin, type (pirate, civilian, law enforcement), and if its a cargo ship, what company its working for. All these are drawn randomly from a CSV. Then it assigns the ship a task. For now there’s only one: trading. The ship is assigned a random port within 10 nodes of its current location, picks up some cargo, and moves it to the new port. On completion, it gets a new destination. Its sufficient to get some traffic on the ocean, which already does a lot for immersion. Just gotta get them to stop slamming into each other, and stop congregating in Manila for no reason.
Hopefully some pictures next time. The port interface is up next.
0 notes
Text
Kaboom
Focused on the weapons system today. Each weapon has: -A damage value, which might be replaced by an ammunition type later -Type of mount point, to separate weapon classes. Deck mounted, rail mounted, hand held, and so on. -Turn rate in degrees per second -Two floats set by the ship as bounds for the yaw, depending on where its mounted. Dont want the guns shooting straight into the ship. -Reload speed
I'm leaving ammunition amounts out for now, just because I want to get this mechanic working before moving onto the cargo system. Ill throw in a simple shot counter later to determine when a unit of ammo has been consumed.
Just imagine that’s a proper gun turret mounted there. Maybe a 20mm BOFORS or something. Or an 1800′s 8 pounder, who knows. This two part system should work for pretty much anything you can weld to a ship
When RMB is held down, the gun object takes the vector from it to the target location, makes it into a rotator, compares it to the current rotation of the gun, and either adds or subtracts the turn rate times delta seconds. The pitch of the gun is controlled by the Y axis motion of the mouse, up to raise and down to lower.
The original reticle got a bit of a change. The angle is still lined up with the camera, but now the distance from the ship is determined by the pitch of the gun as well as the speed of the projectile its firing, using a simple kinematic equation. I used the simplified version that assumes y is 0, just because I'm prototyping this in blueprints, and making formulas in that is a pain in the ass. Still, its pretty accurate. I'm going to play around with the gravity value a bit, because the projectiles are moving a little too slow for the distance they're traveling. Just looks wrong.
Tomorrow: Finish guns, convert to C++
0 notes
Text
Day 2
First, the goals of the project. Not going to dump the whole """"Design document""" yet, just an outline. I know Ill be alone in this for the foreseeable future, so I'm trying to keep my ambitions within the realm of reason. Im a pretty good coder and mathematician, so I can go crazy with mechanics. On the other hand, while I can sometimes make a good 3D model, I work at a glacial pace and can only do somewhat simple inorganic things. So the visuals are going to be pretty subdued.
I'm aiming for something in the spirit of games like Mount and Blade, Freelancer, and of course the Pirates! series. Open ended gameplay that doesn't lean on a story. The setting is the Indian Ocean, and the characters are modern day versions of the classic, romanticized pirate. The core game loop would consist of traveling between different ports, performing missions, and raiding ships. I'll be working on those first.
Today's progress:
That uninspiring blob on the ocean is the ship's targeting reticle. Pretty simple stuff; when you hold RMB it fires a line trace out of the camera every frame, shows a decal on top of the water and stores the position. LMB fires the guns, and the mouse wheel cycles through weapons. Cant actually show it because I haven't made any bullets, or targets, and the weapons are just classes with some data and basic kinematics functions for elevation and whatnot.
Just cleaned up the water levels on the main map. Turns out that the scale is pretty much spot on. It took about four minutes to go from the Gulf of Aden to Cape Town at Cigarette boat speeds, which is about what I'm looking for. I want the world to feel large, but not so large that players regularly experience long stretches of absolutely nothing.
Quick little docking area indicator. Pull into the square, tap space, and it opens up the port interface. The colour is dynamic, based on your relationship with that city/hideout/whatever, which is just an integer value stored in the game instance. Pure green means there will be no problem docking, while pure red means you'll probably be arrested on sight. The exact odds will be shown somewhere, and probably wont scale linearly with relation, just to avoid any XCOM moments.
Tomorrow: Properly implementing weapons.
0 notes
Text
Here we go
Another E3 has passed without a good piracy simulator. Almost four years ago the itch for high seas violence was scratched by Black Flag, but had some low points. Namely everything to do with the Assassins Creed franchise. As I moved to put in my 13 year old copy of Sid Meier's Pirates!, I thought "Hey, Im a marginally competent programmer. I should make a game like this, but expanded. And in the modern day. Yes."
Unreal Engine 4 downloaded as fast as my ancient copper connection could manage, along with a royalty-free model of some sort of ship and a 9MB heightmap of the world. An hour of remembering how Unreal works and some marginal progress was made. Pillage and Plunder was the best name I could come up with. My rough idea is basically “Mount and Blade with Barkhad Abdi”, so it sort of fits.
The non-commercial GPL ship "floating" somewhat convincingly in the ocean. The water is just a tessellated plane with a basic Gerstner wave material applied. I want to add actual buoyancy eventually, or at least a decent facsimile of ships rocking in the waves, but this is good enough for now.
This should give you a rough idea of the scale of the game. The ship is sitting south of Saudi Arabia. The world is roughly a square from Cape Town to Okinawa. Im using the second largest size for Unreal landcsapes to save on vertices, and just stretching it out to get the scale. We’re on the ocean 90% of the time anyway. Probably going to need to tune this so it doesn’t feel large for the sake of it, or weirdly tiny. Also re-freeze the ice caps and get Qatar above the waterline.
Other than that, the ship had basic movement and an orbiting camera. Some properties were added to the game instance file, but thats unimpressive C++ so Ill leave that for now, and hopefully have something more impressive tomorrow to go with it.
0 notes