Skip to content

My experimentation with learning common lisp while writing a RPG usins SDL

License

Notifications You must be signed in to change notification settings

impaktor/walk_on_base

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Table of Contents

  1. Description
    1. Features
  2. Roadmap - My path to glory
    1. Getting started
    2. Set up map
    3. NPCs
    4. ImGui
    5. Follow up goals
    6. Integration into Pioneer Space Simulator
      1. Before - sanitize code
      2. Minimum feature set for inclusion
      3. Show ships in hangar?
    7. Combat system
    8. Above and beyond
  3. Resources
    1. RPG / Game Programming
    2. General C++

Description

This is my playground for implementing a 2D RPG like SDL based game which aims to be a proof of concept for "waling on base" in the game Pioneer Space Simulator.

I imagine, you can control your whole crew, for x-com/laser squad style of turn based combat, when doing missions or boarding and fighting control over a ship that has been disabled with an EMP missile.

Graphics should ideally be at least similar to syndicate, or Jagged Alliance 2 (although, in syndicate, movement was independent of tile grid, something I don't plan to do here, for simplicity sake).

Features

  • Load Orthogonal maps from tiled, support:
    • multiple tilesets
    • multiple layers. Any tile in a layer called collisions will be used for collision detection.
    • Support (single) object layer, if named GameObjects, and each object has a unique name, e.g.
      • "start"
      • "bar"

Roadmap - My path to glory

Road map.

Getting started

  • Make git repository
  • Draw a SDL window
  • handle keyboard event, ESC and Q
  • handle closing window with clicking "x" (I think this is done, not sure)
  • wait/sleep lopp with fixed FPS to cap CPU usage
  • load an image/sprite
  • Have a dot that I can move around with arrow keys
  • Map can scroll when dot approaches edge of screen

Set up map

  • Load tiles from file.
  • Make first map: wall, floor, door, computer terminal, counter
  • Line of sight / "Fog of war" in rooms I can not see into / rooms I'm not in (link)
  • Read in map from a simple file
  • Use third party map making tool. Like Tiled, if so read introduction and how to implement it here. (Another editor is ogmo covered here.) For Tiled, save maps in json format (since Pioneer uses json), and implement:
    • Hook in jsoncpp.
    • Read in maps. Useful: Tiled: json-format and jsoncpp-documentation.
    • Support multiple layers
    • Support multiple tile sets
  • Find some tile set. http://opengameart.org/
  • support collision checks with walls (us "collision" layer)
  • Trigger tiles: doors switch to indoor map, computer terminal, stairs
  • zoom camera? / map? (example)
  • show layers, e.g. collision layer, for debugging maps
  • Animated tiles? E.g. fire, explosion, smoke, water?
  • Animated (character) sprite movement
  • Support isometric map (wiki), although technically, it is actually dimetric

NPCs

ImGui

  • Support imgui (example using only SDLrender).
  • Basic debug print outs
  • print coordinates of clicked tile?
  • bouncing into computer terminal - BBS
  • bouncing into NPC:
    • fight / deliver package / ask
    • bartender: ask advice
    • fixers: illegal mission

Follow up goals

Longer term goals, rough outline.

  • Create maps of different stations
    • Station has a bar, with chairs, tables, bar-counter, bartender
    • Station has a police "station"/terminal
    • Station has a BBS terminal
    • Station has a commodity terminal
  • Player has a wrist "Pip-boy" computer, for "Pioneer F3 Info view"?
  • Player/NPC has an inventory? Mechanics for dropping/picking up items?
  • Manually prompt to set player stats when starting new game. Strength, dexterity, speed, rifle skill, blade skill, gun skill, throw skill, looks

Integration into Pioneer Space Simulator

At this point, the game could be included into Pioneer:

Before - sanitize code

  • Rename variables and class names to have consistent naming standard.
  • Rename files
  • Fix project structure, contrib/ , src/, data
  • Run valgrind to find any memory leaks
  • Run clang-format to format code

Minimum feature set for inclusion

  • When player lands on a station, the "walk on base" game takes over

  • The player is placed in the main lobby, behind is a closed door to the ship hangar. Ships are not shown (that is for later).

  • One, or maybe two different station maps. (Could also have faction logo on floor tiles in the entrance of the lobby)

  • NPCs walk around, walking up to them opens chat dialogue. They could all be dismissive (for now).

  • Player has to access computer terminals on the station to open BBS-screen, commodity market, ship market, ship equipment shop, and police.

  • DeliverPackage now requires player not only to land at the right base, but also find the right person to deliver the package to. Walk up to person and engage in conversation.

  • Assassination missions are moved from BBS list, to be accessible through conversation with special shady people in the Bar. (Until person-to-person combat is implemented, the assassination itself is unchanged, i.e. must target the ship)

  • Black market (both the real, and the police/fake) moved from BBS to NPC(s) sitting in the bar.

  • Advice module moved to be conversations with the Bartender, e.g.

    • "You look like a rookie. You want a word of advice, make sure never to travel into uninhabited systems with too little fuel to jump back out"

    • "I've seen your kind before. You're looking hungry for adventure, kid, but I'd be surprised if you're still alive come the end of the year"

Show ships in hangar?

This would be the main place in the game where the player would get a sense of scale of different ships!

This isn't crucial, but would, after combat is implemented, allow disabling enemy ships in space, with special energy weapons, dock with them, board them, and engage in hand-to-hand combat, to then loot their cargo/crew.

  • Maps have a hangar, and each ship has a multi-tile set representation that are tiled together to one full ship.

  • Each ship has an internal "map", with cockpit, hall/entrance, cargo bay (filled with crates depending on state of cargo hold), and personal crew cabins, (and (room for?) passenger cabins?).

  • Player enters/leaves ship by walking up to the cockpit chair inside the ship. Leaves ship by walking up to the door of the ship (/ and/or cargo loading bay?).

Combat system

When engaging in combat, game switches over to turn based. Combat could be similar to X-com, or some GURPS based system. Key here, is the ability to control several characters, making out your crew.

  • Combat:

    • Choose your weapon, & action (stab/slash/punch)
    • Choose enemy body part, from a list, or ideally a silhouette image
    • Attack is carried out, uses up action points / time units
    • NPCs make their move
  • Health system, overall health + specific body part health, bleeding to death, poison, drugs?

    • Hospital/treatment facility/doctor/medi-kit
  • Personal equipment shop to facilitate combat: knifes, pistols, rifle, sniper rifle, medi-kit, body armour, helmet, night vision, grenade (smoke & explosive), timed charge, stun-rod, maze

  • Patrolling NPC-police on base, enforcing law, attacking you if they see you attack someone (i.e. need a line-of-sight-calculation). If they disable you, what then? Initially only Thuderdome outcome: two men enter, one man leaves.

  • Note to self: read:

Above and beyond

  • NPC / player can drink beer in bar, and get drunk, introducing noise to the path finding algorithm?

  • Passengers or crew can attack you on your ship, switching pioneer to the "walk on base" state (but technically "walk on ship").

  • Can player use more subtle ways of affecting game world than grenades and projectile weapons? Like putting poison in someones drink in the bar? Setting bomb with delayed timer, and leaving (similar to X-Com UFO/TFTD)?

  • Can player use his crew as a tactical combat team on the ground? Would player have full control of them during combat, or they fight independent of you, by targeting your enemies? Could you assign targets to them, and crew would fight them? How would they behave in a cloud of smoke, with zero view?

  • What can be done to make bases on different locations look different, or have their own "feel"? Do procedural generated bases, randomly generated zelda maps, or wave function collapse.

  • Cut scene system? If we have nice graphics/art to display, for immersion. E.g. for quests.

  • Very far out suggestion: Some bases/bars could have arcade machines, with mini-games. Pong/pac-man/card-game?/frogger (Doom!). Tie these into the story: leaving secret messages to others through what you type in the high score list? I.e. you would have to play the game (well enough) to get into high score list (or unplug arcade machine to reset it)? This is more like an adventure game elements thingy.

  • Have an embedded interactive fiction engine? Could be used when going on quest into the city / bad lands.

Resources

Useful articles to read, or have read.

RPG / Game Programming

General C++

About

My experimentation with learning common lisp while writing a RPG usins SDL

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published