Git Product home page Git Product logo

roguetactics's Introduction

Bitesize Tactics

This is a roguelite game inspired by Final Fantasy Tactics made for 7DRL 2020.

You can play the game on itch.io.

Background

This is written in Go, and runs locally over SSH and online via xterm.js+WebAssembly. All the display code and ANSI wrangling is custom. This project might be interesting if you want to see how to do a roguelike-style text game "the hard way" without using a fake terminal or curses-style library.

Originally, this code derives from a realtime multiplayer arena shooter game. The turn-based system was bolted on afterwards, so it's basically a realtime game pretending to be turn-based. The gameplay code was mostly hastily written over 7 days.

Build & Run

Install

(this uses modules, don't put it in $GOPATH):

# make sure you have latest go
go get

Run locally (via SSH):

# run server
go build && ./roguetactics  

# attach client (other tab)
./ssh.sh  

Web version

GOOS=js GOARCH=wasm go build -o web/main.wasm
# symlink web/maps to ./maps
# run python -m SimpleHTTPServer etc in web

Contributing

This is BSD licensed (xterm.js is MIT). You're free to fork it and do whatever.

If you'd like to contribute something, please open an issue first.

There are a couple cool maps that are drawn out but unimplemented, and lots of gameplay mechanics that could be more fleshed out.

Thanks

Shout outs to:

  • meepches and Eric for some of the maps
  • @wittekm for some code contributions
  • the 7DRL organizers for the fun competition
  • everyone who played the game

roguetactics's People

Contributors

guregu avatar wittekm avatar ericdykstra avatar

Stargazers

ekis avatar Noah avatar HyunJin Yoo avatar Michael Bonfils avatar Jim avatar joao guilherme avatar Bocke avatar Nutty Daddy avatar maito1201 avatar

Watchers

 avatar Aaron Freidus avatar  avatar Max Ackley avatar  avatar

Forkers

anima-os-dev

roguetactics's Issues

do we want to have charged spells?

in FFT many spells aren't instant, you start charging them and they happen later
because of this, the game offers you the option to either target a unit and have your spell follow them, or target the ground. this adds a lot of complexity, but is interesting strategically.
the Turner interface was made with charged spells in mind, but if we don't need them, we can change World.Up to return *Mob and remove a lot of ugly casting
FWIW, FFTA and FFTA2 removed this

fully mouse-driven menus

pop up a little menu when you click on a unit
select spells with the mouse etc

  • move
  • cast
  • attack
  • team info
  • skip turn
  • click oob to cancel
  • bonus menu
  • title menu
  • win screen

class ideas

  • bard/dancer?
    • AoE buffs/debuffs
  • chemist?
    • item using class (or maybe let everyone use items?)
  • monk?
    • use fists instead of weapons
    • buffs that don't take MP?
  • monster tamer / pokemon trainer type class?
    • capture monsters
  • thief?
    • would be useful when enemies get gear
    • charm etc
  • druid
    • turn into a bear
    • HoTs

code cleanup stuff

  • create an embeddable struct for windows to handle cursor stuff
    • replace (x, y) fuckery with Coord struct #15
  • too much casting of world.Up() to *Mob, maybe remove Turner if multi-turn spell charging will never be a thing (#24)
  • pretty much nothing except for key/mouse input needs to be an "action" (leftover from when i attempted to have the ui handled by a different goroutine)
  • does Loc even need to have the map name? originally it was added b/c this was gonna be a multi-map mmorpg xfdf. but i don't see there being multiple maps being simulated at once anymore
  • duplicate code between the AI and player controls for rendering projectile paths, etc. some of it is necessary to make the player UI smart enough to error when you can't attack anyone. but it could def be cleaned up
  • there's a lot of code left over from being multiplayer, like multiple Sesh objects. we could just stick a Sesh in the World and avoid having to pass it around all the time. on the other hand, it might be handy to keep it for potential nethack.alt.org style hosted server with observers, etc.
  • lots of duplicate code between highlightRange, withinRange, and findTargets

im sure theres more garbage to be handled

better AI

the current AI is pretty dumb, here's some stuff that would make it better

  • prioritize targets better (ex. if within range of 2 units and one of them is low health, attack the low health one)
  • run away when low health
  • optimize range: back up if too close and have a ranged weapon, try to stay out of player range
  • heal themselves/allies
  • cast offensive spells

random(ly generated?) maps

either:

  • find a good random generation algorithm for tactics-style maps
  • some kind of system that shoves 'pieces'/'templates' together
  • mostly-static maps with little bits of randomness sprinkled in, i.e. a certain tile has a 30% chance of becoming a tree
  • static maps, just shuffle them around and only use a certain portion per playthrough

help screen

maybe pop up a simple help screen when you input ?, instead of relying on the game page's html

overworld / re-do progression system

originally i wanted to have some kind of overworld instead of just a gauntlet of battles

i'm imagining something like a randomly generated island. you start with just one area unlocked. then you fight there, and after you win it unlocks another path or two, repeat. some areas will be towns that offer shops or chances to recruit more units

the win condition could be something like, defeat a boss in a special area deep into it, or maybe conquer all the towns

save/load

save game state (on every turn?) and load it
probably use local storage
need to tweak a lot of shit to get this to work
could help recover from game-ruining bugs/crashes

skill ideas

warrior

  • taunt
  • charge
  • bash (push mob X tiles back, stun if they hit a wall?)
  • whirlwind AoE

archer

  • aim: arm (don't act)
  • charm?

wizard

  • teleport
  • some kind of DoT

priest

  • protect
  • shield?

time mage

  • slow
  • haste
  • stop

druid

  • bear form
  • charge
  • bash?

investigate tinygo

https://tinygo.org
tinygo is go for embedded devices
the main benefit is it would reduce our binary size by a lot (it's currently like 8MB)
but it's also missing some go features so might not be possible or too painful

double-move exploit

if you spam move+reset+move reaaaallllly fast you can 'reset' to where you moved, letting you move twice in one turn
might only be a bug in the wasm ver

also i think i've only done this with clicking, so it might be a clicking problem

buffs/debuffs

implemented a basic buff system, but trying to think of all the possibilities before i work on it too much

potential buff stuff

  • unique buffs
  • increase/decrease stats (speed, move, etc)
    • move to a better system than modifying the *Mob directly
  • DoT/HoT
  • don't move
  • don't act
  • permanent buffs from items (move to items issue)
  • cycle a units background color between its various buffs
  • display buffs on the status bar
  • display buffs on the targeting screen

show party member status always

unknown
^ my friend drew this

obviously we can't have small text like that but might be worth looking into
we'll either have to make sure all the maps are small enough to show it, or clip names

fancy graphics

consider whether we want tile graphics, something fancier, or stick with text

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.