Giter Site home page Giter Site logo

oliviersohn / hamazed Goto Github PK

View Code? Open in Web Editor NEW
43.0 43.0 7.0 4.55 MB

Monorepo for a multi-player game engine, and game examples

Haskell 96.31% C++ 3.13% JavaScript 0.12% Ruby 0.01% Shell 0.16% C 0.10% Dockerfile 0.12% CMake 0.04%
addition animation ascii-art ascii-game ascii-graphics collision game haskell laser mathematics retrogaming

hamazed's People

Contributors

oliviersohn avatar tebello-thejane 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

Watchers

 avatar  avatar  avatar

hamazed's Issues

[Ubuntu] Occasional game freezes

On Ubuntu (18.04 at least), this bug in GLFW, makes the game occasionally freeze until the player generates an event in the window (a key-press, a mouse movement).

As a workaround, maybe posting an empty event with a small (o(ms) or o(us)) time delay will ensure that the freeze is not noticeable for the user.

Note that this bug doesn't happen on OSX.

[Compiler bug?] Infinite loop

When compiling on OSX with optimizations (stack clean && stack build with resolver lts-9.12 (ghc 8.0.2)), the program loops infinitely (400% CPU, and execution is blocked) when an animation is triggered.

The bug is visible at this commit : 9f25223 (to reproduce, shoot at a number in the game)

This branch reproduces the problem with a minimal amount of code:
https://github.com/OlivierSohn/hamazed/tree/repro-ghc-14521-A

stack version:

$ stack --version
Version 1.3.2, Git revision 3f675146590da4f3edf768b89355f798229da2a5 (4395 commits) x86_64 hpack-0.15.0

A ticket was opened concerning this potential ghc bug : https://ghc.haskell.org/trac/ghc/ticket/14521

Investigate font size issue

The algorithm determining "the maximal font size such that all characters fit within a given block" (see createFont) was developped on OSX, with a particular graphic card driver.

On Linux, and using another graphic card driver, some characters are bigger than expected : their outer borders "leak" in the incremental rendering process.

I see 2 possible sources for this behaviour:

  • maybe font rasterizing, in ftgl, behaves differently on different platforms: to find out, we can compare FTGL.getFontBBox on different platforms (see testFont)
  • maybe different graphic openGL drivers perform different numerical roundings on the texture.

Note that if there are some roundings that we have no control over, and that we cannot know in advance, we could either use a bigger margin in createFont or let users adjust the margin so that "it looks good on their screen".

Add screenshots

Could you please add some screenshots of the game to the README?

Cool project, though!

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.