Code Monkey home page Code Monkey logo

castle's People

Contributors

afaur avatar azrou avatar chanon avatar deepnight avatar dkolyesnik avatar epono avatar espeuteclement avatar grimo0 avatar kevinresol avatar markknol avatar mcapdegelle avatar ncannasse avatar pperidont avatar qlambert-pro avatar speedphoenix avatar thomasjwebb avatar trethaller avatar yanrishatum avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

castle's Issues

License?

Under what license is this software released?

Please put a license file in the root of the repo and headers on the source files to eliminate ambiguity.

Tile don't select the right position

The selection made for a column of type Tiles is not correct.

image

You can see on the above screen that the red square representing the selection, is not correctly align with the tiles position.

Undocumented dependencies?

Are all dependencies documented? Running into issues compiling on windows particularly with jquery and node-webkit imports.

Example offendesr:

import js.jquery.Helper.*;
import js.node.webkit.MenuItem;

From history tracking that appears to have been from hxnodejs from which it was removed?

JQuery was easy enough to handle just manually merging head against an older commit.

Feature Request : formulas

Is it possible to add a formula type so I can add a formula in a column instead of float or integer.

Usage example :

  1. create a formula : x*2+1
  2. add a line, choose the formula and type 5 for the x
  3. it shows 11 in the field and it will generate 11 in the .cdb file (well I guess we should store the 5 too because it can be difficult to retrieve it)

It will allow to quickly update a column based on a formula. For example, a game designer could just update a formula to define a correct value of a price for a given item, of a strength for a given character or whatever without updating all the rows himself.

Sheet headers should be visible when scrolling a sheet

When scrolling a sheet with many rows, the headers scroll with the rows; ie. the headers are visible only when looking at the top screenful of rows.

The feature is known as "frozen rows" in Excel and Google Sheets, it's quite useful.

Moving line with separator

When having [Item A | Separator | ItemB] moving the A below (or the B upper) should instead move the separator.

User report

The following was reported (in french), I'm storing here so it doesn't get lost in my mails.

BUGS

  • Renommage de Sheet
    sélectionner une cellule de type Text
    double cliquer sur le nom d'une sheet en bas
    taper une lettre
    la cellule actuelle est écrasée et le nom de la sheet ne change pas
  • dans l'édition de colonne, appuyer sur ENTREE appelle Delete par défaut :) Modify devrait être en premier.
  • problème de focus au clavier quand on édite une cellule de type Reference :
    créer une cellule Reference
    Aller dessus au clavier
    ENTREE permet de choisir la référence
    ENTREE la valide
    le focus n'est pas libéré correctement, les flêches du clavier continuent à changer la référence
  • ENTREE ne déroule pas la liste en dessous quand on l'utilise sur une cellule List

WISHLIST

  • le double clic sur une cellule List permet d'insérer un élément dans la liste (si elle est définie) ou d'ajouter une colonne si la liste n'est pas définie.
  • le double clic sur un header de colonne l'édite
  • le focus sur les listes est un peu bizarrement géré : il n'est jamais hyper évident de savoir où ça va se passer quand on fait "New Line", surtout quand la liste en question est vide. Suggestion : lorsqu'on est en train d'éditer une liste sur une ligne, griser le reste, ajouter un lien "New line" si la liste est vide, verrouiller le reste, et refermer/déverrouiler quand on clique ailleurs que sur la liste.

Python wrapper?

Python got the Enum class in Python 3.4. It would be nice if we could have a wrapper for Castle-format JSON files into enums.

Missing menu bar

Hi,

I downloaded the latest version of CastleDB from the website and I cannot save because there is no menu bar. Maybe I misunderstand how to use it? The rest of the functionality seems to work well.

OS: OSX El Capitan
OS Version: 10.11.6

screen shot 2016-10-05 at 9 42 26 am

How to get object of type created in CastleDB

I'v created db file with simple sheet named pon with vars: "x , y , type , timestamp"
Can I create a new object of type pon inside code ?
var testPon = new DB.Pon();
after that line i'v get error : Pon does not have a constructor

Deleting a sheet bug

Deleting a sheet do not delete if from the database, so it is still exists after reloading.
A quick fix for me was adding
getSheetData()
method to Sheet class and
data.sheets.remove(sheet.getSheetData());
to the method deleteSheet in Database, but there might be a better way.

Cannot map a ArrayRead

ArrayRead should be considered as Array (underlying type).

var a:ArrayRead;
// ...
Lambda.map(a, function(e) { ... });

Doesn't compile :)

how get method paramterInfo value in C#

       var _stackTrace = new StackTrace();
        var frame = _stackTrace.GetFrame(0);
        var _method = frame.GetMethod();
        var _arguments = _method.GetParameters();
        var strBuder = new StringBuilder();
        for (int i = 0; i < _arguments.Length; i++)
        {
            var param = _arguments[i];
            if (param.ParameterType.IsClass)
            {

                strBuder.Append(JsonConvert.SerializeObject(param.RawDefaultValue));
            }
      }

regardness

copy paste

When i copy paste the id column, the pasted code is json chunks rather thant text.

Maybe an option to copy text rather than json could be useful :)

create link on Custom Type does not work

New Column -> Column type = Custom type. The [create] button next to Type gives a Uncaught TypeError: undefined is not a function error.

CastleDB version 1.5

custom user css

Hi !

It would be cool to have a custom.css that any user can edit along with the release of cdb.

It would make it easier than fork/commit/discuss to improve locally or share :)

Thanks

Custom Type deletion sometime fail

with this message : Uncaught TypeError: Cannot read property 'args' of undefined castle.js:1663
I'll look into it someday.
edit: hmm problem is complexe since customTypes are stored by index...I'll leave it to you on how to delete them in this cases.

CPP : recursive on all control path

Sometime the cpp compiler is whinning about a potential recursivity on all control path...then I had a look at what is generated :

::Cond CondBuilder_obj::build( Dynamic v){
    HX_STACK_FRAME("CondBuilder","build",0x515f6639,"CondBuilder.build","cdb/Module.hx",598,0x02d48d44)
    HX_STACK_ARG(v,"v")
    HX_STACK_LINE(583)
    int _g = v->__GetItem((int)0);      HX_STACK_VAR(_g,"_g");
    HX_STACK_LINE(568)

//We generate these way too early, it creates overheads..
    ::Cond _g1 = ::CondBuilder_obj::build(v->__GetItem((int)1));        HX_STACK_VAR(_g1,"_g1");
    HX_STACK_LINE(568)
    ::Cond _g11 = ::CondBuilder_obj::build(v->__GetItem((int)2));       HX_STACK_VAR(_g11,"_g11");
    HX_STACK_LINE(568)
    ::Cond _g2 = ::CondBuilder_obj::build(v->__GetItem((int)1));        HX_STACK_VAR(_g2,"_g2");
    HX_STACK_LINE(568)
    ::Cond _g3 = ::CondBuilder_obj::build(v->__GetItem((int)2));        HX_STACK_VAR(_g3,"_g3");
    HX_STACK_LINE(568)
    ::Cond _g4 = ::CondBuilder_obj::build(v->__GetItem((int)1));        HX_STACK_VAR(_g4,"_g4");
    HX_STACK_LINE(568)
    ::Race _g5 = ::RaceBuilder_obj::build(v->__GetItem((int)1));        HX_STACK_VAR(_g5,"_g5");
    HX_STACK_LINE(583)
    ::String _g6 = ::Std_obj::string(v);        HX_STACK_VAR(_g6,"_g6");
    HX_STACK_LINE(6)
    switch( (int)(_g)){
        case (int)0: {
            HX_STACK_LINE(579)
            return ::Cond_obj::Or(_g1,_g11);
        }
        ;break;
        case (int)1: {
            HX_STACK_LINE(579)
            return ::Cond_obj::And(_g2,_g3);
        }
        ;break;
        case (int)2: {
            HX_STACK_LINE(579)
            return ::Cond_obj::Not(_g4);
        }
        ;break;
        case (int)3: {
            HX_STACK_LINE(579)
            return ::Cond_obj::True;
        }
        ;break;
        case (int)4: {
            HX_STACK_LINE(579)
            return ::Cond_obj::False;
        }
        ;break;
        case (int)5: {
            HX_STACK_LINE(579)
            return ::Cond_obj::IsNear;
        }
        ;break;
        case (int)6: {
            HX_STACK_LINE(579)
            return ::Cond_obj::IsDominated;
        }
        ;break;
        case (int)7: {
            HX_STACK_LINE(579)
            return ::Cond_obj::AreWrestlers;
        }
        ;break;
        case (int)8: {
            HX_STACK_LINE(579)
            return ::Cond_obj::IsOppGrounded;
        }
        ;break;
        case (int)9: {
            HX_STACK_LINE(579)
            return ::Cond_obj::IsSelfGrounded;
        }
        ;break;
        case (int)10: {
            HX_STACK_LINE(579)
            return ::Cond_obj::IsRace(_g5);
        }
        ;break;
        case (int)11: {
            HX_STACK_LINE(579)
            return ::Cond_obj::CanTaboo;
        }
        ;break;
        case (int)12: {
            HX_STACK_LINE(579)
            return ::Cond_obj::Percent(v->__GetItem((int)1));
        }
        ;break;
        default: {
            HX_STACK_LINE(583)
            HX_STACK_DO_THROW((HX_CSTRING("Invalid value ") + _g6));
        }
    }
    HX_STACK_LINE(6)
    return null();
}
c:\workspace\catch\client\simulator\bin\windows\cpp\obj\src\condbuilder.cpp(130) : warning C4717: 'CondBuilder_obj::build' : recursive on all control paths, function will cause runtime stack overflow

What is interesting is that g1...g4 variables are generated too early and could be stubbed in the switch statement, which would introduce less overhead.

The cpp compiler is also wrong to generate the warning but hey, he cannot allways be right...

I put the issue here but it might be an issue for the cpp target...

Image modifications not taken into account without a restart

After modifying an image file in an external program, changes are not visible in CastleDB (in Tile and File columns), even if I select the file again or select another one and this one again to try to force the refresh.

Workaround: Restarting CastleDB

Missing API Documentation?

First off, awesome work! I have everything up an running and can access my db within haxe... but now I'm wondering how else I can access my game data. So far I've seen that I can do the following:

  • [DB].[sheet].get([field]).[...]
  • [DB].[sheet].resolve(["field"]).[...]
  • [DB].[sheet].all[index].[...]

I've searched through this repo and googled extenisvely, but haven't turned up much. Is this basically the API or are there other ways to query my data? Thanks.

Save on quit

If we have created a new CDB and not saved it, request to do so on quit

Linux, could not load image

None of the images would load under linux, to make it works I had to add "file://" at the beginning of the URL.

Simple fix I did was to add the "file://" under the getAbsPath function in Model.hx.

Not sure if this would affect things under win/mac. But just pointing that out for anyone else having the same issue.

Can't select non-adjacent rows as the doc suggests

The doc states:

You can select one row by clicking on its index, then select several of them by clicking while holding shift and clicking on other row indices.
You can select a range of cells by first selecting a cell then holding shift while clicking on another cell.

I can indeed select range of rows (or cells) with the shift key as the second phrase says, but I think there is an issue with the first phrase.

Either it's a repetition, or maybe an error and it should be ctrl instead of shift?
Even so, I haven't managed to select multiple non-adjacent rows (or cells) at a time using the ctrlkey. This behaviour also seems absent from the where it should be in the source (from what I can understand anyway)

No eraser in Map Editor ?

Let me juste preface this issue with my love for everything you've created.

Now, my question.

Is there a way to remove a tile or an object from a layer in the Map Editor ? I looked a bit in the source but didn't find any, but it seems too important a feature to be missing.

Better quick start guide?

Hi!

I'm trying to get this to run with HaxeFlixel (is this compatible by the way?) by adding it into my project's project.xml file under the tag. I'm able to add in Data.hx with the macro, but when I try using Data in my playState by importing it and trying to use the object, I'm seeing a null object. Well, how do you retrieve the data from a cdb file then? I can't get the test hxproj to run either since I'm running into an error about g being a duplicate class. Haxe is at 3.2.0.

Search

Would be lovely to be able to search in the sheets with a CTRL-F rather than explore the html content :)

Group Reference

Allow to select a datatype that is one of the groups of a reference sheet

sample.zip error when click level sheet's "edit" button

Level.hx - line:1890

(untyped content.find("[name=color]")).spectrum("set",  ...........

bin/castle.js - line: 3212

var tmp1 = this.content.find("[name=color]").spectrum; // Line 3212
//........
tmp1("set",tmp2).closest(".item").css({ display : tmp3}); // Line 3235

variable "tmp1" seems to have lost the "context"

Array support in customTypes

Hi,

Adding value to the cdb using list is a little bit boring, since the new line button is far,
could we add Array to supported enum params so that writing batched of conditions get faster...

Also mapping new line to something like CTRL+N could help a lot.

Thanks !

Arrays/List in custom types

When a custom type is defined, it can't contain List or Array structures

enum EventConsequence {
Goto( e : events );
IfThenElse( if : List, then :
List, else : List );
}

throws " Unknown type List "

Lag in layer stride

There is a delay in the update of the layer stride: if I change the file for a given layer, the stride is not updated straight away, only after I select another file, and the stride is now the one from the previously selected file.

Example:

  • I first selected the file A with a stride of 8 (as expected) when I created the layer.
  • If I select the file B with a stride of 4, the stride in the cdb file remains 8.
    • If I select the file B again, the stride in the cdb file should now be 8, as expected, because the previous file and this one are the same.
    • If I select a file C with a stride of 16, the stride in the cdb file is now 8 too, the previous selected file stride.

Workaround: Selecting the file again (and sometimes, restarting CastleDB)

Type import

i have

import TechBaseKind;
var s = [Punch]; //which is a techbaseKind
//fails, cannot find symbol

to fix i have to do

import TechBaseKind;
import TechBaseKind.*;

From one of our previous discussions about import I believe the first import set should suffice.

Can you confirm ?

Thanks bro !

Cannot parametrize enum argument as SheetName

Hello.

Doc says,
"A custom type constructor parameter can use the following types:
SheetName any sheet name created in the database"

So I want to use a following custom type:

enum TemplateType { Reference( v: SheetName ); }

And getting error: 'Unknown type SheetName'

what am i doing wrong?

Modifying column, pressing enter deletes column

I've now tripped over this one too many times 😄

Scenario: I have a sheet with many columns, with at least a couple of enumeration columns, and while filling my sheet, I find myself adding new values to the enumeration as I discover more applicable values.

If I edit the column, enter a new enum value, and press enter, the Delete column action is then taken, instead of the Modify column one.

I feel like the default action when modifying a column should be "Modify". Better yet, some confirmation on column deletion would be really cool.

Error while adding a new line to the list column

castle.js:11162 Uncaught TypeError: Cannot read property 'getDefault' of null at data_Sheet.newLine (castle.js:11162) at Main.newLine (castle.js:6541) at Main.insertLine (castle.js:6547) at <anonymous>:1:3

It looks like the sheet's that are created for the list columns has field "base" equals null for some reason

Too many sheets will stop appearing in the bottom of the screen

I have to many sheets in my project twelve (12 in total) and these sheets fill all the space available in the bottom of the screen. I can't find a way to scroll to the side and access the remaining sheets.
I'm using Mac OSX version here. (version 1.5)

Feature Request: Quads and Fonts for Map Editor?

For application development the Map editor could be potentially useful but it does not seems to have any ability to position Quads with perhaps 1 or 4 colors, or TextFields with custom fonts. Also it would be nice to have Place holders where component would be inserted later.

Curious if this is a direction that would be suitable for castleDB.

In regard to Applications how would you approach dynamic castleDB where json differences could be transfered by say Haxe remoting and applied in real time or does this not seem sensible?

Can't decode [Data.sheetName.all] array

Doc states:

Data Layer cbd.Types.Layer<SheetName> : you can decode the layer by passing the Data.sheetName.all array to the decode() function.

Which decode() function is it? The Layer<T>(String) one or the TileLayerData(String) one? And how should I access it?

Neither my Data object, nor Data.sheetName.all have a decode() function and the types I tried in the cdb.Types class only have encode() functions, not decode()

PS: for the record, I know how to decode layers individually with the following code, but I understood there was another way.

for (layer in Data.levelDatas.get(LevelDatasKind.FirstVillage).layers) {
	trace("name : " + layer.name);
	trace("file : " + layer.data.file);
	trace("size : " + layer.data.size);
	trace("stride : " + layer.data.stride);
	trace("data : " + layer.data.data.decode());
}

Lock id

It should be possible to lock an unique identifier (the whole list or a single) in order to prevent its modification and the removal of the line (will ask to unlock first).

This would ensure that no edition is possible once the data is stored in some live database

Missing shortcuts documentation

I'm currently working on a CastleDB file with 10 sheets (with more to come). When resizing the window's width down, the last sheets (most to the right) become inaccessible.

Maybe a "jump to a sheet" action, or key shortcuts for moving to previous/next sheet, would be neat?

Uppercase sheet names don't play well with the Haxe type generation

I don't really care much because I can just use lowercase names, but this threw me off a bit when initially trying to use castledb. Having a sheet name like Enemies messes up the automatic type creation a bit, probably because the name clashes with the type. If this isn't to be supported, it should at least give a sensible error message.

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.