Git Product home page Git Product logo

castlefortify's People

Contributors

codetrix avatar setharchambault avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

codetrix

castlefortify's Issues

More organized Javascript

So at some point soon we'll need more organized javascript, cause the code as it is does some VERY BAD THINGS. The first that comes to mind is that I've been using a textarea to hold the data and then converting back and forth between that and the map. There should be a map "model" in here somewhere. But in general things could use some reorganizing.

I'm thinking of using backbone for this. This should result in clearer, more organized code, and hopefully we can do it in a way that doesn't create a barrier to entry for people not familiar with backbone.

Anyways, wanted to throw it out there.. any thoughts on javascript organization?

Use the Castle Doctrine native house map format.

Castle Doctrine, both the game client and the server software, uses ASCII representations of a house. It could be nice if CastleFortify supported this so people could quickly bring houses to the game with whatever tools they might be using. Or even import them straight to their private servers.

Here is the description from the protocol.txt:

ASCII string representing the house layout, like:

object_id#object_id#object_id#object_id

OR

object_id:state#object_id:state#object_id#object_id

If ":state" not present, then default state is implied
If ":state" includes "!" at the end, that marks a stuck state.
Example: 100:2!#10:3!#5#3:0

Cells are separated by "#"

Multiple objects can be present in each cell, separated by commas, like this:

object_id:state#object_id:state,object_id:state#object_id#object_id,object_id

Note that this is used to encode the presense of mobile objects (which can share a cell with non-mobile, non-blocking objects)

And this is what a freshly baked house looks like (empty except for a wife, 2 kids, and a vault) in the database or during transmit between the game and server:

998#998#998#998#998#998#998#998#998#998#998#998#998#998#998#998#998#998#998#998#998#998#998#998#998#998#998#998#998#998#998#998#998#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#998#998#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#998#998#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#998#998#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#998#998#0#0#0#0#0#0#0#0#0#0#0#0#0#0#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#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#998#998#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#998#998#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#998#998#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#998#998#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#998#998#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#998#998#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#998#998#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#998#998#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#998#998#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#998#998#998#998#998#998#998#998#998#998#998#998#998#998#998#998#998#998#998#998#998#998#998#998#998#998#998#998#998#998#998#998#998

Toggling of tiles

It would be good if the tile placement behaved exactly as the game client. Currently this means that if you have the same tile selected as the one clicked on, it deletes the tile.

blank tiles when dogs overlap tiles

importing a map with a dog on another tile (pit, trapdoor, grid, etc.(?)) produces a blank tile!

i'll go put together an example quick..

http://castlefortify.com/c/5348357

998#998#998#998#998#998#998#998#998#998#998#998#998#998#998#998#998#998#998#998#998#998#998#998#998#998#998#998#998#998#998#998#998#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#998#998#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#998#998#0#0#0#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#0#0#998#998#0#0#1#30,72#104,72#105,72#106,72#109,72#107,72#100,72#108,72#101,72#1#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#998#998#0#0#1#1#1#1#1#1#1#1#1#1#1#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#998#998#0#0#0#0#0#0#0#0#0#1023#1042#1011#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#998#998#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#998#998#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#998#998#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#998#998#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#998#998#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#998#998#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#998#998#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#998#998#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#998#998#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#998#998#998#998#998#998#998#998#998#998#998#998#998#998#998#998#998#998#998#998#998#998#998#998#998#998#998#998#998#998#998#998#998

-largestherb
http://thecastledoctrine.net/forums/viewtopic.php?pid=3196#p3196

Support drag placement of elements

To add and remove multiple tiles it seems you have to click each square individually (unless I'm missing something). It would be much quicker to modify designs if is was possible to place multiple tiles in a single drag operation - like the game itself does.

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.