Giter VIP home page Giter VIP logo

boken-rpg's Introduction

Boken RPG Engine

This is a little web RPG engine. Developed solely in my spare time and for the purposes of trying to actually build a working game engine from scratch. Hopefully at some point it'll be usable for a real project~

This engine isn't bundling files with WebPack or doing any post-processing apart from using Compass to generate the CSS. Simply put, it uses native HTML-JS modules and loads each JS file that makes up the game separately. My intention is for someone to just be able to clone the repo, start a webserver on the root and get playing!

I'm not sure exactly what my plans on this are. I have an RPG in mind that I'm slowly building up along with the engine, but the intention is to allow people to without too much fuss use this for their own games too. We'll see how well that actually goes in practice!

Compatibility

This engine is unabashedly compatible with really quite new stuff only. If you're not running an up-to-date browser that supports all the latest JS, you likely won't be able to play this.

In addition, mobile is difficult. While the engine can do mobile fine, the control system isn't amazing for use with phones. If I can add compatibility later using media-queries then awesome, but I'm not losing sleep over not being able to play the game on your phone right now. If you've got any considered and decent mockups for a mobile design though, I'd love to see 'em and see whether I can turn it into running code!

Playing

To play this, all you need to do is:

  1. Clone the repo.
  2. cd to the root (this folder).
  3. Start a webserver!

There's many different ways to start a webserver. Here's some examples:

python 2:
    $ python -m SimpleHTTPServer 8000
python 3:
    $ python -m http.server 8000

And there's a bunch more located on this gist.

After launching the webserver, simply open up http://localhost:8000/ in a relatively up-to-date web browser! Firefox or Chrome should work fine, but if you do encounter issues on any others please feel free to open an issue detailing the trouble!

Developing

Make sure to launch the game itself as described above, then:

  1. Install Compass.
  2. cd to the root (this folder).
  3. Run this command to start the style generation: $ compass watch

With Compass and the webserver running, you should be able to make any changes and then view them by reloading the page in your web browser.

Credits

Lots of the GUI and gameplay is inspired by (totally nicked from) Fenoxo [NSFW].

boken-rpg's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

boken-rpg's Issues

Scene page functions

Right now a scene page can only be a block of markdown. Extend this so people can give functions instead which will be called.

Content pages

The main content screen be able to be scrolled-back, etc etc. We'll have a page manager with these functions:

pageManager.addPage()
pageManager.replaceExistingPage()
pageManager.scrollBack()
pageManager.scrollForward()

addPage will always scroll to the current page that's getting added.

Draw links on map as well

Right now the map draws places without an issue. We should also draw a little line between places where a link exists. Will let us do a layout like this without it becoming confusing:

x - x - x - x
x   x - x   x
|       |   |
x - x - x - x

Hover info persists after clicking a button

If you click 1-5/q-t/a-g, the old hover info for that button will continue to be displayed until your mouse moves off the button. It should probably update/close instead.

Button pagination

tl;dr allow multiple pages of buttons. Not a big deal, just something to go and implement.

We'll use 1,2,3,4,q,w,e,... for the first page of buttons, 1.2,2.2,3.2,q.2,w.2,e.2,... for the second page, etc.

Scene parser

So we do need some sort of system to parse the scene markdown, let people insert variables and all.

Considering that we do allow standard markdown syntax, I'll probably use {} for the variables and insertion / flow control, rather than [] like Fen's games do.

I've got some decent prior art in this area so I'll take a look at that, and see what else around the web has worked for text-based RPG scripts. Should be fun to implement.

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.