• Dear Cerberus X User!

    As we prepare to transition the forum ownership from Mike to Phil (TripleHead GmbH), we need your explicit consent to transfer your user data in accordance with our amended Terms and Rules in order to be compliant with data protection laws.

    Important: If you accept the amended Terms and Rules, you agree to the transfer of your user data to the future forum owner!

    Please read the new Terms and Rules below, check the box to agree, and click "Accept" to continue enjoying your Cerberus X Forum experience. The deadline for consent is April 5, 2024.

    Do not accept the amended Terms and Rules if you do not wish your personal data to be transferred to the future forum owner!

    Accepting ensures:

    - Continued access to your account with a short break for the actual transfer.

    - Retention of your data under the same terms.

    Without consent:

    - You don't have further access to your forum user account.

    - Your account and personal data will be deleted after April 5, 2024.

    - Public posts remain, but usernames indicating real identity will be anonymized. If you disagree with a fictitious name you have the option to contact us so we can find a name that is acceptable to you.

    We hope to keep you in our community and see you on the forum soon!

    All the best

    Your Cerberus X Team

DevLog Rampartesque

Paul59

Active member
CX Code Contributor
Joined
Dec 13, 2018
Messages
384
I've made a few 2D landscape/terrain generators in the past mostly with the intention of making a roguelike game. I doubt now that I've got the enthusiasm (or stamina!) for such a project, so I thought I'd attempt a simple 'Rampart' like game but with simple randomly generated maps (no height or features such as rocks, rivers or trees). I've never played Rampart but I've watched a few videos and looked at some screenies. Here are the features I'm planning to steal and some of my own ideas...

  • Random (ok I'll get with it, 'procedurally generated') maps
  • Player castles that cost gold and stone to build (you have to pay the builders and have the resources after all). Build anytime, anywhere.
  • Probably a simple 'fog of war' view around castles
  • A finite number of enemy ships that sail around and attack player castles - destroying x percentage of ships ('domination') wins the game
  • Gold is obtained by destroying ships (handily, their treasure chests always wash up on shore!). They might also drop wood and iron, to be used to make cannon and mines.
  • Stone obtained by placing a stone mine within your walls - costs gold and maybe wood
  • Cannon can be placed in your castle's area of effect and cost gold
  • Stone, used to repair your walls comes in random 'Tetris' style shapes
  • Actually, I might add trees that you can 'harvest' with a cannon LOL

As a start, I've got a simple wrap-around map generator sorted. You can switch between moving the mouse over the world map (which updates the close up view) or activating the close up view but can't do anything there yet. Not bad for about 200 lines of code!

Here's a shaky GIF showing the current state of play...

sortof.gif
 
Something very simple so I've got a remote chance of actually finishing it!

Added some trees... rather too many though...

tree.png
 
Dumped the mouse-click-to-switch-windows idea and implemented wrap-around keyboard scrolling of the close-up view with an indicator (just some white spots for now) on the world map. The mouse will only be used for placing or selecting items - added the ability to place (single) stone blocks just to check my indexing of the array is correct :D - will need to reflect those changes on the world map which is an image created when the world is generated.

Another jumpy GIF:

Peek 2019-03-28 20-57.gif
 
Change of game plan:
Cities need to be defended from enemy ships, castles/walls can be built nearby or at strategic points.
Probably won't implement the 'tetris' shaped stone blocks, seems pointless.

Added cities to the world
Added the ability to build and demolish walls and castles and uproot trees - all at a cost (or gain) of gold/stone/wood
Added a pick mode to select and get info on map cells

Next up, rework the main viewport to double the size of the tiny graphics Done :)
 
Last edited:
Changed world generation to create a single central continent (sometimes with islands) with cities near the coast and discarded the wraparound idea - it's easier to follow what's going on and means the upcoming code for enemies will be much simpler - hurrah!
Screenshot at 2019-04-03 14-47-18.png
 
Not much time at the minute but I've added in some basic routing information for enemy ships using potential fields/dykstra maps call them what you will. Now I just need to add the logic to follow the directions :D

This screenshot shows two cities(!) with debug routing info turned on:

541
 
Back
Top Bottom