Giter Site home page Giter Site logo

on-the-roadside's People

Contributors

rm-code avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

on-the-roadside's Issues

Grenades

Grenades should follow somewhat realistic flying trajectories. When a grenade hits a world object it should be deflected correctly. It would also be nice to have some kind of bouncing / rolling behavior close to the target.

Make neutral faction truly neutral

The (green) neutral faction is aggressive both towards the player's and the AI's faction. Neutral characters should only attack after they have been attacked.

Explosions

OTR will include explosive weapons at some point in the future (rocket launchers, grenades and so on). The current system only handles projectile weapons and therefore needs to be extended.

This is from an early test:
screenshot 2016-07-31 12 21 39

An easy way to implement explosions for now would be to take all tiles in the radius of the explosion and hit them a certain amount of damage. This would however ignore walls and other objects which could block the blast.

Instead all tiles inside of the radius should be checked by shooting rays at them and only those which are reached by the ray will be hit by the explosion.

Some pseudo code I thought about today:

  1. Cast rays in 360° around explosion source (amount of rays could be varied for different explosion effects)
  2. Slightly vary the rays in length to prevent perfectly circular explosions
  3. Determine the target tiles where the ray ends
  4. Use Bresenham to get all tiles between the source and the calculated end points (stops at impassable tiles)
  5. Store those "lists" in a table and iterate over it
  6. Get next tile from each of the lists
  7. Tiles which are touched by multiple rays are receiving a higher power value which will affect the particle color during animation (this should in theory cause the explosion to be more yellow towards the center ... but we'll see)
  8. Notify particle layer
  9. Hit tiles
  10. Repeat until all lists are empty

Improve camera behavior

  • Track moving characters
  • Move camera to target when shooting
  • Restrict camera movements to the map borders

Tweak CTH calculations

Currently shots are quite accurate. It looks like there are some flaws in the current angle calculations which need to be addressed.

  • Use maximum derivation correctly
  • Vary the shot distance

Allow "opening" of backpacks in the inventory

One of the most annoying parts of the inventory is that the player has to equip backpacks if he wants to look into them. It would be nicer if you could click on a backpack and it would open a new list (replacing the "current" item list).

By implementing this we could also get rid of the backpack list completely.

Add weight attribute for items

Currently, inventory containers have no restrictions on how many items they can contain.

I think the list-view is the right way to do the inventory for OTR (especially since I am not a fan of inventory tetris). A system like in Project Zomboid could work where items have a number which represents both weight and bulkiness of an item.

Saving the game's state

The goal for now should be to fully restore the battlescape. It'll be the first time for me to save any complex game state and therefore might prove quite challenging.

The game should only be saved in the planning state. This saves us the trouble of storing information about any explosions or projectiles or other simulations / actions that are going on.

  • Map (position of all tiles)
  • Tiles (WorldObjects, Items, Characters)
  • WorldObjects (State)
  • Characters (State, Health, Inventory)
  • Items (State)

Deactivate mouse scrolling

The mouse scrolling should be deactivated if the mouse cursor is no longer inside of the game's window.

Crash while loading the game

Error: src/SaveHandler.lua:100: attempt to index local 'item' (a nil value)
stack traceback:
    src/SaveHandler.lua:100: in function 'createMagazine'
    src/SaveHandler.lua:112: in function 'createWeapon'
    src/SaveHandler.lua:122: in function 'fillInventory'
    src/SaveHandler.lua:193: in function 'loadCharacters'
    src/Game.lua:49: in function 'init'
    src/screens/MainScreen.lua:40: in function 'init'
    lib/screenmanager/ScreenManager.lua:110: in function 'push'
    lib/screenmanager/ScreenManager.lua:68: in function 'init'
    main.lua:35: in function 'load'
    [string "boot.lua"]:439: in function <[string "boot.lua"]:435>
    [C]: in function 'xpcall'

Limit inventory space

Once #44 is implemented inventory space can be limited by setting a maximum weight value for containers.

Overhaul inventory screen

  • Rewrite the inventory using the new image font and a more traditional ASCII-like layout
  • Highlight appropriate equipment slot when item is selected
  • Reimplement volume and weight limit display
  • Implement actual drag and drop (See #78)
  • Right-clicking an item should transfer it directly to the backpack (See #78)
  • Scrollable item-lists (these will be part of the ui update)
  • Notify player if item doesn't fit into the inventory

Add an AP indicator

The game should communicate the costs of an action before the player takes it.

Camera doesn't start centered on character

The camera doesn't start centered on a character when the game starts. This forces the player to either search for the character by hand or select the next or previous character to force camera movement.

Crash when shooting next to a world object

Error: src/items/weapons/ProjectileManager.lua:32: attempt to index local 'tile' (a nil value)
stack traceback:
    src/items/weapons/ProjectileManager.lua:32: in function 'hitTile'
    src/items/weapons/ProjectileManager.lua:84: in function 'update'
    src/turnbased/states/ExecutionState.lua:26: in function 'update'
    src/turnbased/states/StateManager.lua:13: in function 'update'
    src/turnbased/TurnManager.lua:32: in function 'update'
    src/Game.lua:77: in function 'update'
    src/screens/MainScreen.lua:67: in function 'update'
    lib/screenmanager/ScreenManager.lua:380: in function 'update'
    main.lua:57: in function 'update'
    [string "boot.lua"]:463: in function <[string "boot.lua"]:435>
    [C]: in function 'xpcall'

Characters can be moved after death

When a character kills himself (or generally is killed while being active) it is possible to move him to a different tile and basically resurrect him.

This wasn't an issue before because with guns only other characters could be killed, but not the one currently set as active by the game.

This is a bit tricky since dead characters currently aren't really removed from the Faction.

Crash when pressing reload with an grenade equipped

Error: src/characters/actions/Reload.lua:10: attempt to call method 'getMagazine' (a nil value)
stack traceback:
    src/characters/actions/Reload.lua:10: in function 'perform'
    src/characters/Character.lua:127: in function 'performAction'
    src/turnbased/states/ExecutionState.lua:37: in function 'update'
    src/turnbased/states/StateManager.lua:13: in function 'update'
    src/turnbased/TurnManager.lua:32: in function 'update'
    src/Game.lua:77: in function 'update'
    src/screens/MainScreen.lua:67: in function 'update'
    lib/screenmanager/ScreenManager.lua:380: in function 'update'
    main.lua:57: in function 'update'
    [string "boot.lua"]:463: in function <[string "boot.lua"]:435>
    [C]: in function 'xpcall'

Change camera behavior for AI controlled factions

The camera should only track movement of AI controlled characters if they are visible to one of the player's characters.

The game should continue to display the FOV for the player's faction.

This needs to be easy to control so we can disable it for easier AI debugging and development.

Improve line of fire overlay

Currently the line of fire for a character creates red overlays for tiles outside of the field of view of the selected character:
screenshot 2016-07-31 02 44 47

Colors should be chosen like this:

  • Green: Tile that can be seen by any character of the faction
  • Orange: Tiles which contain world objects or characters which could block the shot
  • Red: Tiles which can't be seen by any character of the faction

Improve AI

The AI for 0.2.0 doesn't need to be smart, but shouldn't block the game (e.g. by trying to reload a weapon without having ammo in the inventory).

Draft:

  • Can see enemy
    • Has a ranged weapon
      • Is weapon loaded?
        • Yes -> attack
        • No
          • Can reload -> reload
          • Can't reload -> flee
    • Has a melee weapon
      • Is adjacent to target?
        • Yes -> attack
        • No -> move towards target
  • Can't see enemy
    • Move randomly
    • Stay idle

Inventory crashes if no backpack is equipped

Error: src/screens/InventoryScreen.lua:44: attempt to index a boolean value
stack traceback:
    src/screens/InventoryScreen.lua:44: in function 'init'
    lib/screenmanager/ScreenManager.lua:110: in function 'push'
    src/screens/MainScreen.lua:75: in function 'keypressed'
    lib/screenmanager/ScreenManager.lua:197: in function 'keypressed'
    main.lua:71: in function <main.lua:70>
    [string "boot.lua"]:454: in function <[string "boot.lua"]:435>
    [C]: in function 'xpcall'

Blocked input after shooting a world object

There seems to be an issue where input is blocked after a world object has been hit. It's possible that the game is staying in the Execution state because it waits for the ProjectileManager to finish.

Looks like this happens when a projectile is passing through multiple world objects at once.

Crash when trying to walk through an open door

Error: src/characters/actions/Walk.lua:28: Character has to be adjacent to the target tile!
stack traceback:
    [C]: in function 'assert'
    src/characters/actions/Walk.lua:28: in function 'perform'
    src/characters/Character.lua:112: in function 'performAction'
    src/turnbased/states/ExecutionState.lua:23: in function 'update'
    src/turnbased/states/StateManager.lua:13: in function 'update'
    src/turnbased/TurnManager.lua:33: in function 'update'
    src/Game.lua:83: in function 'update'
    src/screens/MainScreen.lua:65: in function 'update'
    lib/screenmanager/ScreenManager.lua:380: in function 'update'
    main.lua:57: in function 'update'
    [string "boot.lua"]:463: in function <[string "boot.lua"]:435>
    [C]: in function 'xpcall'

Add spawn areas

Spawn areas can primarily used to spawn the player's chars at a certain point of the map. They could easily be used to control the placement of NPCs as well though.

Question about core modules

hello, i've been looking over this game and it seems really interesting, however the code is very confusing

could you please explain what tile.lua, tilefactory.lua and worldpainter.lua do?

Add item containers to the map

A big part of the game is about scavenging for new items and weapons on the maps. For this purpose, some of the objects on the map should have container space (e.g. desks, closets, crates, etc.).

Rocket / Grenade Launchers

Rocket and Grenade launchers are different from the current projectile weapons as they explode on impact.

The ProjectileManager could determine the type of damage a projectile does based on the ammunition type. If it encounters something like ammoType == "Explosive" it will look for the blast strength of the attack and spawn a new explosion.

Interruptions and Reaction Fire

In games like Silent Storm and XCOM characters can interrupt the the turns of enemy characters when they have action points left and certain actions are triggered.

In interruption turns characters should be able to perform all actions they could usually perform in a normal turn.

Crash when grenade hits indestructible object

Error: src/items/weapons/ProjectileManager.lua:89: attempt to call method 'getMagazine' (a nil value)
stack traceback:
    src/items/weapons/ProjectileManager.lua:89: in function 'update'
    src/turnbased/states/ExecutionState.lua:26: in function 'update'
    src/turnbased/states/StateManager.lua:13: in function 'update'
    src/turnbased/TurnManager.lua:32: in function 'update'
    src/Game.lua:77: in function 'update'
    src/screens/MainScreen.lua:67: in function 'update'
    lib/screenmanager/ScreenManager.lua:380: in function 'update'
    main.lua:57: in function 'update'
    [string "boot.lua"]:463: in function <[string "boot.lua"]:435>
    [C]: in function 'xpcall'

Improve overlays for attacking and moving

Currently there is no way to distinguish between the UI overlay for attacks and movement. It probably would be enough for now to simply change the cursor to indicate a different mode.

Melee weapons

Melee attacks could work nice in stealth gameplay later on, but we also need them to simulate monster attacks. This could work as "equipping" monsters with "claw" items for example.

Better way to generate Behavior Trees

Currently behavior trees are hardcoded. It would make sense to have some kind of simple visual editor or at least allow the creation of BTs via script files.

Shotguns

Shotguns should be quite easy to implement with the current System. Low accuracy and no delay between projectiles.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.