Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2 3 ... 5

Author Topic: ASCII-based game about sailing ships.  (Read 28542 times)

hun

  • Bay Watcher
    • View Profile
ASCII-based game about sailing ships.
« on: June 25, 2017, 06:15:59 pm »

I have started this project 1.5 years ago or about, simply to practice Python and play around a bit, but I ended up creating a game about naval warfare with sailing ships (or rather, this is still a techno-demo of battle mechanics, although I do have 2 fully playable missions). I named the game Sea Wolves, but maybe I will change the name later. Recently, I didn't do much on it, but I still have plans to do much more in future. The process of game creation, and solving all the problems that arise during this process is a truly pleasant experience for me. 

Not knowing any other place, where people may be interested, I decided to show it to you, guys.

I use Python 2.7 with libtcod library, and I started the creation by following this absolutely masterful guide. Later I also included library implemetating perlin/simplex noise, for procedural generation of maps: https://github.com/caseman/noise. You need to install it on your own, if you want to run the game from the sources, but I include binary as well, which should work on Windows without any additional efforts.

High-level idea
Originally (and long time before I started actually do something), I wanted to create a game about maritime trade in the the setting of a fantasy world that has many in common with Earth in 15-16 centuries, but with much more water and no large continents -- only ocean and islands of different size. Fantasy part would be really light, and mostly limited to "Pirates of Carribean" kind of stuff - krakens, sirens, and other sailors' folklore. That is, no elves, dragons and direct magic like fireballs. The main points and goals could be summarized as follows: 1) Open, procedurally generated world 2) Complex enough economic system, so that player could have fun from roleplaying a private trading ship captain. 3) Ship management: armament, crew, supply 4) Naval warfare mechanics: if we have maritime trading, we must have pirates! Player also should be able to start a pirate career or join navy as a mercenary. 5) Certain exploration and information component: gather/trade/sell information about new lands, currents, prices in other ports.

Sounds very ambitioous, and I know that it's likely I will never progress to the final, but it's just good to have the global plan in mind.
Sources of inspiration: for the naval battles, I can call Age of Sails 1-2. For the trading part, Patrician III has inspired me. And obviously, Dwarf Fortress is a great source of general inspiration for a complex open-world game with procedural generation and deep game mechanis. Also, DF has neither economics nor sailing currently, so it was definitely an additional bit of motivation.

What do I have now
I started from coding battle mechanics. Current features can be summarized as follows:
- Basic movement: speed depends on your ship, wind, orientation toward wind, hp of sails (and set level of sails). Maneuverability also depends on your current speed, the higher your speed, the less time you need to turn
- The artillery usage. There are several gun types with different characteristics, fitted to one of 4 sides of ship. Each ship has simply 2 hp bars now: sails and hull. The chances to hit and damage depends on variety of characteristics. Among them, size of a target ship, mutual speed and orientation, weather (only wind speed currently), characteristics of the gun itself.
- Basic crew management: guns must be reloaded by sailors, as well as any sails operations require their labor. Crew can die from enemy artillery fire.
- Boarding. The mechanics is rather simplistic now, but you still need to distribute weapon and armor among your people, which can affect the result significantly. There are always 2 sides: defenders and attackers, each have certain disadvantages and advantages, but mostly, defenders are better off. Attackers can reduce penalties by approaching enemy ship in a convenient manner (side-to-side is the best)
- Day/night change, mainly leads to great penalties of sight radius.

There are two so-called 'scenarios' now; as I said, they are more to demonstrate and test battle mechanics and map generation, not a final goal of the game.
- The first one, 'Random Archipelago', is a random arena. Your ship is more or less fixed (armament will slightly vary though), but there is a lot of randomness among your enemies. In many cases you either have no chance to win or can easily stompt your enemies, so there is no balance at all. The map and weather are also random.
- The second one, 'The Lake of Despair', is well balanced and tested scenario. There is a slight randomness in wind direction/strength and map (althought, as you can guess, it is always a closed lake), but everything else is fixed. You will lose for sure first few times, before you find out characteristics of your enemies and come up with some tactics.

Future plans
Currently, I'm going finally to start playing around with the world generation. For sure, it will take huge time, but hopefully, I will enjoy it alot.
In the same time, I need to sketch economics system to know what exactly I want from the world generation.

Of course, there are a lot of possible development for battle mechanics and ship management. Naturally, one of the first we need for open-world is cargo and supply management.
Later on, I would want to bring such things as: crew morale, more detailed damage mechanics (closer to what we all know and love in DF), crew and captain skills. But for now, this is not the top priority, I really want to bring global map and such.

Pictures
Spoiler: Main menu (click to show/hide)
Spoiler: General map screen (click to show/hide)
Spoiler: Weapon info screen (click to show/hide)
Spoiler: Night (click to show/hide)


Download

Source: https://drive.google.com/file/d/0B62_kA9GGg0LeG9RQjg1T3dOTmM/view?usp=sharing
To run the game from source files, you need installed python 2.7 + noise Caseman's library (https://github.com/caseman/noise), nothing more is needed as far as I know.
Would be cool to get feedback from Linux users, should work there in theory, but I've never tested.

Binary: https://drive.google.com/file/d/0B62_kA9GGg0LS2l3R0N6TnROcW8/view?usp=sharing
Simply double-click .exe file to play (Windows only)

Any suggestions, opinions, comments, bug reports are welcome! Also, you probably noticed that I'm not a native speaker of English, so the game may suffer in that sense as well. If you see any troubles of that sort and want to suggest your edits - let me know! On the other side, if you know good references about naval warfare or related things (e.g. maritime trade), let me know. I have read alredy something (e.g., I found and used very good references for early navy artillery types), but it is always good to read more.
« Last Edit: July 06, 2017, 03:00:00 pm by hun »
Logged

hun

  • Bay Watcher
    • View Profile
Re: ASCII-based game about sailing ships.
« Reply #1 on: June 29, 2017, 05:17:24 am »

First attempts on world generation. I'm still experimenting outside of the game, but I'm probably close to start introducing world generation module into the game.

For now, the first part of world generation, i.e. biomes, is basically done, and overall, I like the result.  According to my current vision of the game, I need to have an ocean world with many islands. Most of them contain only 1-2 biomes - this is exactly what I want, since later it will motivate towns and civilizations to trade, due to different resources. And player is going to be part of this commerce, of course. Here are a couple of resulting maps:
Spoiler (click to show/hide)
Spoiler (click to show/hide)

All biomes are typically present, but I'm still not fully satisfied with this set of generation parameters.  Deserts and especially, marshes/swamps are typically underpresented, also probably there are too much land and some islands are also a bit too large. But the parameters are really flexible, I just need to decide, what parameters to take as a standard, which of them the player can change etc. Here, for example, a different set of parameter:
Spoiler (click to show/hide)
Land is much scarcer here, and a lot of mountains: almost every decent island is basically a mountain range with some vegetation on the shore.

The size of a map is 400x400 cells, according to ingame measures, it is going to be 2000x2000km. Each cells, consequently, is 5x5km. I think it works fine as a standard map. If to relate this to a battle field of what I currently have in the game, each global 5km cell represents 100x100 battle sector (every cell 50x50m, and this is the smallest I going to have in the game).

There is still lack of rivers, and probably I leave it for a while. Further generation components are going to be much more demanding. I need to scatter different resources (yet I need to decide what resources), then civilization/history generation.

Asgarus

  • Bay Watcher
    • View Profile
Re: ASCII-based game about sailing ships.
« Reply #2 on: June 29, 2017, 08:59:20 am »

This looks great. I will give it a try once I'm home from work (if I don't forget to^^)
Logged

MoonyTheHuman

  • Bay Watcher
  • I think the DEC VAX hates me.
    • View Profile
    • hellomouse
Re: ASCII-based game about sailing ships.
« Reply #3 on: July 04, 2017, 02:27:53 am »

Me and urist mcdebian will test with on linux for you. just wait 6 hours because its 2AM.

snow dwarf

  • Bay Watcher
  • Is always cold
    • View Profile
Re: ASCII-based game about sailing ships.
« Reply #4 on: July 04, 2017, 04:15:40 am »

Looks really cool!
Logged
Here at Bay12 we excel at Theoretical Biology. Need to know the value of Merbone? Check. Need to know the density of a thrown Fluffy Wambler? Check. Need to know how a walking Mushroom can theoretically talk? Check.

Derpy Dev

  • Bay Watcher
  • Normal Person Doing Normal Things
    • View Profile
Re: ASCII-based game about sailing ships.
« Reply #5 on: July 04, 2017, 07:01:45 pm »

This looks cool. I'll probably give it a test run tomorrow, but I have one question: you said that it requires Python 2.7 and noise Caseman's library, are these likely to be just laying around on a Windows 10 computer or do I need to download them from somewhere?

hun

  • Bay Watcher
    • View Profile
Re: ASCII-based game about sailing ships.
« Reply #6 on: July 06, 2017, 02:50:06 pm »

Me and urist mcdebian will test with on linux for you. just wait 6 hours because its 2AM.

That would be so cool. Especially, if there are any troubles, let me know if you have a clue on what's wrong.

This looks cool. I'll probably give it a test run tomorrow, but I have one question: you said that it requires Python 2.7 and noise Caseman's library, are these likely to be just laying around on a Windows 10 computer or do I need to download them from somewhere?
Cool, waiting for your feedback!

Just to clarify, running the game from .exe (second link, with binary) should not require anything as far as I know. 
Python and noise library are required if you want to run it from source code.
« Last Edit: July 06, 2017, 02:58:19 pm by hun »
Logged

Derpy Dev

  • Bay Watcher
  • Normal Person Doing Normal Things
    • View Profile
Re: ASCII-based game about sailing ships.
« Reply #7 on: July 06, 2017, 03:58:29 pm »

So the only problem I'm really having so far is simple but makes it almost impossible to play: my computer does not have a pgUp or pgDown key. I cannot read through more than the first page of controls.

...I feel dumb right now. Can you copy and paste the instructions onto this thread for me?

hun

  • Bay Watcher
    • View Profile
Re: ASCII-based game about sailing ships.
« Reply #8 on: July 06, 2017, 04:06:51 pm »

So the only problem I'm really having so far is simple but makes it almost impossible to play: my computer does not have a pgUp or pgDown key. I cannot read through more than the first page of controls.

...I feel dumb right now. Can you copy and paste the instructions onto this thread for me?

Hmm, I thought of keypads not having numeric keys (they are also using for some stuff), but I didn't know that no pgUp/pgDown is possible as well.. I think I really need to consider the idea of adding keyconfig file/settings more seriously...

But these instructions are not hardcoded, check help.txt in the game folder  :D

Derpy Dev

  • Bay Watcher
  • Normal Person Doing Normal Things
    • View Profile
Re: ASCII-based game about sailing ships.
« Reply #9 on: July 06, 2017, 04:10:28 pm »

So the only problem I'm really having so far is simple but makes it almost impossible to play: my computer does not have a pgUp or pgDown key. I cannot read through more than the first page of controls.

...I feel dumb right now. Can you copy and paste the instructions onto this thread for me?

Hmm, I thought of keypads not having numeric keys (they are also using for some stuff), but I didn't know that no pgUp/pgDown is possible as well.. I think I really need to consider the idea of adding keyconfig file/settings more seriously...

But these instructions are not hardcoded, check help.txt in the game folder  :D

Don't know how I missed that. Thanks.

Derpy Dev

  • Bay Watcher
  • Normal Person Doing Normal Things
    • View Profile
Re: ASCII-based game about sailing ships.
« Reply #10 on: July 06, 2017, 06:08:04 pm »

There are a couple of problems right now, but I feel like I'm just confused about them. For one thing, the pacing. When your ship is moving at 2.07 knots, it takes 30 seconds before you move. I counted. There should be a button you can press to move instantly and skip time forward. Same goes for turning.

Second, I have been stuck in the ocean for about ten minutes without moving and it says my sails are at 0% I've tried setting the sails and going without them, but this doesn't seem to work. It seems to randomly change and I'm pretty sure I got cabin fever before it went back up to 33%. Is there something I'm not getting?

hun

  • Bay Watcher
    • View Profile
Re: ASCII-based game about sailing ships.
« Reply #11 on: July 06, 2017, 09:09:11 pm »

There are a couple of problems right now, but I feel like I'm just confused about them. For one thing, the pacing. When your ship is moving at 2.07 knots, it takes 30 seconds before you move. I counted. There should be a button you can press to move instantly and skip time forward. Same goes for turning.

Second, I have been stuck in the ocean for about ten minutes without moving and it says my sails are at 0% I've tried setting the sails and going without them, but this doesn't seem to work. It seems to randomly change and I'm pretty sure I got cabin fever before it went back up to 33%. Is there something I'm not getting?

Thanks for feedback, Derpy Dev! Yeah, I think I've confused you with non-obvious controls, and that's an important signal to me.

There are game speed controls, they can be accessed by "+" or "-" (but only on numerical keypad now - probably, good idea to rework this). Standard game  speed is x5, but you can speed up to x30, which should be really fast... But 30 seconds at 2.07 knots? Even at the standard x5 it should have been faster, less than 10 seconds... Maybe you had FPS drop by some reason? It may affect the game speed. How much FPS did the game inform to you?
Or maybe you accidentaly made the game speed slower than x5 (check your game speed is in top-right corner, below the in-game time). If come to think, 30 seconds at 2.07 knots - that's actually sounds like x1 speed to me.

For sails, you've probably misunderstood the way "Up" and "Down" controls work... they only control how much sails you want to have, and do not directly affect your ship movements. The ship is propelled by the wind automatically! Moreover, whenever you order to set or furl sails, it takes time for your crew to make this change (it would appear as your status, below your current sails information). This order can also be cancelled by pressing the opposite key. So, I guess you simply were constantly putting an order to set more sails, then cancel it before it was completed.

Hope this helped, let me know.
« Last Edit: July 06, 2017, 09:16:36 pm by hun »
Logged

Derpy Dev

  • Bay Watcher
  • Normal Person Doing Normal Things
    • View Profile
Re: ASCII-based game about sailing ships.
« Reply #12 on: July 06, 2017, 09:49:17 pm »

There are game speed controls, they can be accessed by "+" or "-" (but only on numerical keypad now - probably, good idea to rework this). Standard game  speed is x5, but you can speed up to x30, which should be really fast... But 30 seconds at 2.07 knots? Even at the standard x5 it should have been faster, less than 10 seconds... Maybe you had FPS drop by some reason? It may affect the game speed. How much FPS did the game inform to you?
Or maybe you accidentaly made the game speed slower than x5 (check your game speed is in top-right corner, below the in-game time). If come to think, 30 seconds at 2.07 knots - that's actually sounds like x1 speed to me.

Yeah, I don't have a numerical keypad. And the FPS is 22 average for me.
For sails, you've probably misunderstood the way "Up" and "Down" controls work... they only control how much sails you want to have, and do not directly affect your ship movements. The ship is propelled by the wind automatically! Moreover, whenever you order to set or furl sails, it takes time for your crew to make this change (it would appear as your status, below your current sails information). This order can also be cancelled by pressing the opposite key. So, I guess you simply were constantly putting an order to set more sails, then cancel it before it was completed.

I knew they controlled the sails... but it seems to control how much the sails control the ship? Maybe? So 0 knots happened because I put the sails all the way down?

hun

  • Bay Watcher
    • View Profile
Re: ASCII-based game about sailing ships.
« Reply #13 on: July 07, 2017, 12:26:46 pm »

Yeah, I don't have a numerical keypad. And the FPS is 22 average for me.
Ah, I see then. The problem with FPS is that game pace is slowing down whenever your FPS is lower than maximum FPS limit (set to 60 now). So, apart from playing on x5, game for you is also ~3 times slower due to low FPS. That's pretty unplayable indeed. It is easy to fix by lowering maximum FPS, but it's unfortunately hardcode now.

I knew they controlled the sails... but it seems to control how much the sails control the ship? Maybe? So 0 knots happened because I put the sails all the way down?
You may say this in that way... The idea is that you simply control AREA of sails. So yes, the more sails you set, the faster you move. 0% sails means 0 speed for the ship. You also need to keep in mind wind direction (you can't move at all against the wind, for example).
There are also some other stuff, related to sails. HP of sails also affects your speed (holes in sails do not help to catch the wind). 0% HP sails - you lose ability to move entirely.
On the other hand, the less level of sails you set, the less damage they take from enemy's artillery (it is harder to hit something that compactly folded)

You know, if you are still interested to try more, I can stop my worldgen experiments and build an intermediate game version with changed controls (get rid of all numpad bindings) and with lowered FPS limit. I think I should also move FPS limit to config file...

Derpy Dev

  • Bay Watcher
  • Normal Person Doing Normal Things
    • View Profile
Re: ASCII-based game about sailing ships.
« Reply #14 on: July 07, 2017, 04:03:22 pm »

You know, if you are still interested to try more, I can stop my worldgen experiments and build an intermediate game version with changed controls (get rid of all numpad bindings) and with lowered FPS limit. I think I should also move FPS limit to config file...

I'd appreciate that. The game looks really cool and it is pretty close to impossible for me to play right now. So... pretty please?
Pages: [1] 2 3 ... 5