Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

10 years ago by roman01la

I'm using this one by myself and originally it was just for private use, but I found it useful and want to share with everyone.

impact-node

So this is basically replication of official PHP version, as well as some additions for efficiency in dev process.

Install:
npm i -g impact-node

Create new project:
impact-node create:project {path to impact dir}

This will copy ImpactJS core into current directory and bootstrap a project, thus you can keep ImpactJS somewhere on your disk.

Create new entity:
impact-node create:entity {name}

This will create a new entity file with basic setup.

Run development server with specified port (default is 3000):
impact-node serve -p 9000

Run in watch mode, game view will be updated when project's files changed:
impact-node serve -watch

And finally build your game:
impact-node build

build goes to build/game.js

This seems like enough functionality for me, but there can be more.

10 years ago by Joncom

What is the "development server" used for?

10 years ago by roman01la

This is where Weltmeister and actual game is running while you are developing it. Same as with original PHP version, but includes watch mode as well.

10 years ago by drhayes

This is very exciting! I've been looking for a way to do transforms on my game that something like browserify would allow, e.g. instead of coding an entire conversation tree in JavaScript and embed it in the game, write it in something more palatable like Markdown and encode it at build time.

I bet we could get something like that working on the build step side of things using falafel or one of its derivatives (like node-falafel-map). Very cool!

10 years ago by roman01la

@drhayes, I believe markdown dialogue text can be parsed to JSON and passed to some function which then operates on actual dialogue. This is much simpler way ;)

Additionally there's webpack thing, which is somewhat similar to browserify, but still better imho. Webpack has a concept of loaders: loader is a transformation plugin which loads and transforms data on the fly, while you developing. So if you are using webpack, you can write markdown dialogue loader for it and use transformed dialogue as JS module in your game.

10 years ago by drhayes

Yeah, browserify can do that too via its transforms; that's where I got the idea, from browserify-data.

I know most things in Impact can and should be considered resources for the loader (my dialog example is one of those).

A better case might be macros. sweetjs lets you set up hygienic macros in JS which requires source-level transforms to do interesting things. Here are sweetjs' examples.

Or (maybe sort of kind of) a game macro language that ends up being a kind of DSL, things that are harder to do with inheritance.
Page 1 of 1
« first « previous next › last »