Git Product home page Git Product logo

traviso.js's People

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

traviso.js's Issues

Feature request: Add text on top of objects

Hello,
I've discovered Traviso, and I'm very interested to play with it.
I'm trying to display text over tiles or objects. I manage to do something like this:
function onEngineInstanceReady () {
var basicText = new PIXI.Text('Basic text in pixi');
pixiRoot.stage.addChild(engine);
var pos ={};
pos.r=11;
pos.c=12;
engine.addCustomObjectToLocation(basicText,pos);
}

The issue is that text is displayed below objects.
Is there any way to keep it on top of everything ?

Thanks in advance !

Clint

Blurry pixel art objects based on position

Depending on the position of the object, I get some blurried items: really bad for pixel art items/objects that needs to be pixel-perfect without any filter applied on it.

f1d6009c53bcdd6b1c1d6b2394368dae

There are my codes:

    ////// Global on-frame renderer function
    function update() 
    {
        renderer.render(stage);
        requestAnimationFrame(update); 
    }

    ////// Here, we initialize the pixi stage
    var gameCanvas;
    var gameWidth, gameHeight;

        gameCanvas = document.getElementById('mycanv');
        gameWidth = window.innerWidth;
        gameHeight = window.innerHeight;

    // create an new instance of a pixi stage
    stage = new PIXI.Container();

    // create a renderer instance
    renderer = PIXI.autoDetectRenderer(gameWidth, gameHeight, false , false);

    // add the renderer view element to the DOM
    document.body.appendChild(renderer.view);

    update();

    ////// Here, we create our traviso instance and add on top of pixi

    // engine-instance configuration object
    var instanceConfig =
    {
        mapDataPath : "mapData.xml", // the path to the xml file that defines map data, required
        assetsToLoad : ["test.png", "chair.gif", "carpet.png"], // array of paths to the assets that are desired to be loaded by traviso, no need to use if assets are already loaded to PIXI cache, default null
        tileHeight : "33",
        isoAngle : "27",
        initialZoomLevel : 0
    };

    var engine = TRAVISO.getEngineInstance(instanceConfig);
    stage.addChild(engine);

and mapData.xml

<?xml version="1.0" encoding="utf-8" ?>
<map_data>
    <tiles>
        <tile id="1" movable="1">test.png</tile>
    </tiles>
    <objects>
        <object id="1" movable="1" interactive="0" s="1x1">
            <v id="idle">
                <f>chair.gif</f>
            </v>
        </object>
        <object id="2" movable="1" interactive="0" s="3x3">
            <v id="idle">
                <f>carpet.png</f>
            </v>
        </object>
    </objects>
    <ground_map>
        <row>1 ,1 ,1 ,1, 1</row>
        <row>1 ,1 ,1 ,1, 1</row>
        <row>1 ,1 ,1 ,1, 1</row>
        <row>1 ,1 ,1 ,1, 1</row>
        <row>1 ,1 ,1 ,1, 1</row>
        <row>0 ,1 ,0 ,1, 0</row>
        <row>1 ,1 ,1 ,1, 1</row>
        <row>1 ,1 ,1 ,1, 1</row>
        <row>1 ,1 ,1 ,1, 1</row>
        <row>1 ,1 ,1 ,1, 1</row>
        <row>1 ,1 ,1 ,1, 1</row>
    </ground_map>
    <object_map>
        <row>0 ,0 ,0 ,0, 0</row>
        <row>0 ,0 ,0 ,0, 0</row>
        <row>0 ,0 ,0 ,0, 0</row>
        <row>2 ,0 ,0 ,0, 0</row>
        <row>0 ,0 ,0 ,0, 0</row>
        <row>0 ,0 ,0 ,0, 0</row>
        <row>0 ,0 ,0 ,0, 0</row>
        <row>0 ,0 ,0 ,0, 0</row>
        <row>0 ,0 ,0 ,0, 0</row>
        <row>0 ,2 ,0 ,0, 0</row>
        <row>0 ,0 ,0 ,0, 0</row>
    </object_map>
</map_data>

ground/terrain height?

Hi, I see on the Readme that these two features are in development:

Built-in support for block-like tiles
Ground/terrain height

The game I'm making depends on these features. Is this still coming in the future? If not, do you have any suggestions on how they should be implemented? Thanks!

common js support

Hey @axaq, thanks for making this. It seems great. Is there any plan to add support for commonjs? Maybe we could even publish it on npm?

I'd be happy to help out w/ it.

Is this still alive?

I saw some really interesting features that were upcoming but little progress lately. Overall really nice job so far.

These features can take it to the next level. Fog of war is probably a really good feature that you probably want.

  • Priority levels for moving objects
  • Built-in support for block-like tiles
  • Ground/terrain height
  • Fog of war
  • Particle system
  • Physics engine

Are you still maintaining it?

Best regards

Best way to create a map?

Hey, very cool project and clean architecture!

My question : .
What is the best way to create the map?

You mostly did it in your head or you wrote it down on a concepttional paper?

Cannot get map.xml from electron

I would like to use traviso in electron app. So when I try to get map.xml I get error "cannot getElementsByTagName of null"
So responseXML is null,but response has all needed data

How to integrate pinch zoom?

Hey axaq,

Great work with traviso.js, I'm loving it.

It has almost everything I need, except pinch zoom for mobile.
I tried to integrate with hammer.js, without success.

What are the steps to make traviso work with pinch zoom?

Best regards

ground separates on mobile

Hi, I'm testing your framework on my HTC one M7 with latest chrome browser. For some reason the ground seems to tear apart from the objects as my character moves. See here:

2016-09-02 15 48 42

Contact medium

Hello,
For those of us who are not using twitter, how should we get in touch?
Any "traviso@<your_fav_domain_here>.com email ? or even a contact form on the website - I cannot find anything.

Cheers!
Kind Regards

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.