Coder Social home page Coder Social logo

castlefortify's Introduction

CastleFortify

This is no longer under development! Check out Castle Draft: http://castledraft.com/editor/


Save and Share your Castle Doctrine designs. Also, designs are saved in simple JSON code, so they can be used in any of your own apps.

http://castlefortify.com

Here's a map I often use: http://castlefortify.com/c/1eb1be1

Thanks for checking Castle Fortify out, and let me know if you have any ideas on how to make it better! d

Install

  1. Edit config.php with proper database connection info
  2. Import sql into database (/sql/castle_fortify.sql)
  3. Run composer.phar install (Download Composer Here)

Roadmap for Future Versions

View Roadmap on Trello

Join the Discussion

Official Castle Doctrine Forum Post

Thanks for all your feedback!

You Can Contribute!

The Quick Way

Good for typos, quick fixes

  1. Switch to the "Develop" branch
  2. Click the file that needs the edit
  3. Click "Edit"
  4. Make your change, Update the commit summary, click Commit changes!

Thanks so much!

Or Try The Pro Way

Codebase

While I've tried to keep things as simple as possible, I decided to try out require.js and a Publish / Subscribe event firing model to keep the functionality from getting too confusing. Whether or not I succeeded at the goal I guess I'll find out in 6 months when I come back and try to change something :p

One unfortunate side effect of this latest change is that if you are making changes to the javascript code, you should uncomment this line in select.php:

<script data-main="/app.js" src="/lib/require/require.js"></script>

and comment out the other script line immediately above it.

When the code goes to production, you'll have to install r.js and run

r.js -o build.js

To create a minified version of app.js and then recomment and uncomment the lines again.

Not ideal.. But it does allow us to create clean, seperate javascript modules without losing any performance. Plus the code doesn't make my eyes bleed now.

So that's a plus.

Thanks!

Really appreciate all the support - if you've suggested a feature, found a bug, or even just created and shared a map, you are a part of building this to be a great tool for the Castle Doctrine community. Thank you! But sometimes thanks isn't enough. Here are some awards.

Awards

To @codetrix for squashing bugs faster than I can boot up my computer

for this you are awarded: ^ The hat of good job

To @mjbarker for constant vigilence in uncovering issues and pointing out missing features

for this you are awarded: * The all seeing asterisk

Enjoy :)

Boring Versioning Stuff

major.minor.patch

castlefortify's People

Contributors

codetrix avatar setharchambault avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

codetrix

castlefortify's Issues

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

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#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#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#103#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#110,72:3!#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#0#0#0#0#111,72:2!#0#0#0#0#0#0#0#0#0#999#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#998#998#0#0#0#112,72:2!#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#1#0#0#0#0#0#0#0#0#0#1#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#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

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.

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?

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.