Giter Site home page Giter Site logo

lime2dtileengine's Introduction

Hi there 👋

lime2dtileengine's People

Contributors

outlawgametools 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

Watchers

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

lime2dtileengine's Issues

Problem with setting points

There’s a problem with setting points, at last on the latest corona, win7.

first i thought i did a mistake following the tutorial at
http://lime.outlawgametools.com/tutorials/09-controlling-a-platformer-characters-jump/

but than i downloaded the map provided in a tutorial page and i was getting the same error:
lime-object.lua:945: bad argument #1 ‘newLine’ (number expected, got nil)
stack taceback:

C: in function ‘newLine’
…lime-object.lua:495: in function ‘create’

my main.lua:
lime = require(“lime.lime”)
local map = lime.loadMap(“lime2.tmx”)
local visual = lime.createVisual(map)
local physical = lime.buildPhysical(map)

Runtime Error: isDebugModeEnabled nil value

code

local lime = require("lime.lime")
local map = lime.loadMap("test.tmx")

file text.tmx exits in project home dir

Runtime error
...in\workspace\playground\playground\lime\lime-map.lua:68: attempt to call fiel
d 'isDebugModeEnabled' (a nil value)
stack traceback:
[C]: in function 'isDebugModeEnabled'
...in\workspace\playground\playground\lime\lime-map.lua:68: in funcRunti
me error:
stack traceback:
[C]: in function 'isDebugModeEnabled'
...in\workspace\playground\playground\lime\lime-map.lua:68: in function
<...in\workspace\playground\playground\lime\lime-map.lua:47>
(tail call): ?

Possible bug in Utils:clampPosition

I'm writing a simple dungeon game based on tiles.
I have a 50x50 tile map.
I'm synchronising camera position to the character on every move this way:

map:slideToPosition(dest_x, dest_y, 160)
hero:slideToPosition(dest_x, dest_y, 160)

And I noticed that when the player reaches 1/4 screen margin, the camera is dropped to the very bottom of the map.
Here's a video of the simulator http://youtu.be/SG1vwE_bHZY and some debug info printed out by this statement in Utils:clampPosition:

print(
    _y,
    _bounds.height,
    _bounds.offset.y,
    display.contentHeight,
    abs(_y) > ( _bounds.height - _bounds.offset.y ) - display.contentHeight
)

When I change

if abs(_y) > (_bounds.height - _bounds.offset.y) - display.contentHeight then
    _y = -((_bounds.height - _bounds.offset.y) - display.contentHeight)
elseif y > _bounds.y then
    _y = _bounds.y
end

to

if (_y > 0) then
    _y = 0
elseif (_y < -_bounds.height + display.contentHeight) then
    _y = -_bounds.height + display.contentHeight
end

Everything becomes ok. Though it doesn't take _bounds.offset.y into account (it is = 0 in my case).

Tutorial examples with latest Lime version

Do any of the tutorials work with the latest version? So far, I've loaded up these without success:

http://lime.outlawgametools.com/tutorials/20-controlling-the-camera/
http://lime.outlawgametools.com/tutorials/13-moving-a-map-via-touch/
http://lime.outlawgametools.com/tutorials/19-using-director-with-lime/
http://lime.outlawgametools.com/tutorials/20-controlling-the-camera/

The first two, I get a problem related to these issues - #1, #2, then the last one, I get this error (version 1.4 of director class):

..uments/Corona Projects/Tutorial 19 DEMO/director.lua:1092: attempt to call method 'insert' (a nil value) stack traceback: [C]: in function 'insert' ...uments/Corona Projects/Tutorial 19 DEMO/director.lua:1092: in function 'changeScene' .../Documents/Corona Projects/Tutorial 19 DEMO/main.lua:31: in function 'main' .../Documents/Corona Projects/Tutorial 19 DEMO/main.lua:44: in main chunk

I'm sure I can figure out if Lime will be useful by reading more code. I'm curious to know if there's an obvious version of lime I should be starting with?

Thanks for any help!

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.