Giter VIP home page Giter VIP logo

voxelspace's Issues

Camera roll

Do you know how the game/engine rolls the camera? Does the vertical line drawing function draw the line at an angle instead? Or does it render to a buffer and then rotate that? Or does it skew the image for a rough approximation of roll at low angles, like how this demo fakes moving the camera up and down by panning the image?

Draw sprites

How can you calculate when to draw sprites (eg. Trees) that have an x and y coordinate on the map and a z offset from the terrain?

TypeError: unsupported operand type(s) for &: 'float' and 'int'

When I download the project and execute tools/animations/run.sh, it says:

delete
anim
0
Traceback (most recent call last):
  File "anim.py", line 181, in <module>
    DrawFrontToBack(Point(670, 500 - i*16), 0, 120, 800, Point(670, 500 - i*16))
  File "anim.py", line 161, in DrawFrontToBack
    -height, -1./z*240., +100, pmap)
  File "anim.py", line 86, in HorlineHidden
    xi = math.floor(p1.x) & 1023
TypeError: unsupported operand type(s) for &: 'float' and 'int'

and when I try to fix this it using float(integer) it says:

delete
anim
0
Traceback (most recent call last):
  File "anim.py", line 181, in <module>
    DrawFrontToBack(Point(670, 500 - i*16), float(0), float(120), float(800), Point(670, 500 - i*16))
  File "anim.py", line 161, in DrawFrontToBack
    float(-height), -1./z*240., +100, pmap)
  File "anim.py", line 86, in HorlineHidden
    xi = math.floor(p1.x) & float(1023)
TypeError: unsupported operand type(s) for &: 'float' and 'float'

don't know how to fix this, please help.

License?

Hi! There doesn't seem to be a license for this project. choosealicense.com explains some of your choices.

MIT is a very simple, do-whatever-you-want-but-give-credit license. The GPLv3 ensures that you get back modifications. If you chose the GPL, you might license the maps as CC BY or CC BY-SA 4.0, which are one-way compatible with the GPL (CC --> GPL).

View broken on mobile phones

Application loads the initial terrain fine but the second you click anywhere the camera flies into the ground and you can't do anything else.

Any plans to port Delta Force to it ?

Delta Force games will benefit greatly from running on a modern voxel engine in terms of higher resolution, widescreen, multi platform incl web, game controller support and even modding. Any plans in that direction?

Use requestAnimationFrame rather than setTimeout

Since your repo got on the hackernews front page: your draw loop uses window.setTimeout(..., 0), but this leads to rather jarring stutter. Replacing window.setTimeout(...) with window.requestAnimationFrame(Draw) lets the code run much smoother.

On a secondary note, a setTimeout with 0 as argument doesn't actually run "immediately"; it has 20 years of legacy baggage and depending on the browser you're basically guaranteed a minimum interval of 3 to 5 milliseconds instead (because in the 90s, not every browser could do immediate timeouts, and so the lower bound was capped. Then the spec folks went "we should formalize that behaviour" rather than not doing that...)

Keyboard doesn't work

Nothing happens when using keyboard to control. Only mouse works.

No errors in the console, either.

VoxelSpace.html

When I cloned your repo and opened VoxelSpace.html, for some reason I get this:

screen shot 2017-12-03 at 12 29 53 pm

Do you know why I'm getting this? Please note that I'm on a MacBook (just that) using High Sierra

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.