schell / odin Goto Github PK
View Code? Open in Web Editor NEWHigh level 2d game engine written in Haskell.
Home Page: http://zyghost.com/series/odin
License: MIT License
High level 2d game engine written in Haskell.
Home Page: http://zyghost.com/series/odin
License: MIT License
A Layer is an offscreen buffer that can be rendered to, and then
transformed and rendered separately. It is used for GUI elements like Pane
and Panel.
Located in "schell/odin/odin-engine/src/Odin/Engine/GUI/Layer.hs" on line 20
Located in "schell/odin/odin-engine/src/Odin/Engine/Tiled.hs" on line 114
After a fresh clone followed by stack build
, the gl
dependency will not build. If I remove the gl repo from stack.yaml and update the resolver to lts-8.17, the dependency builds fine (though Odin itself still fails to build, which I'll file separately)
Here's the relevant error:
-- While building package gl-0.8.0 using:
/Users/chuck/.stack/programs/x86_64-osx/ghc-8.0.2/bin/ghc --make -odir /Users/chuck/proj/hs/odin/.stack-work/downloaded/Zpw1QwqLgZxs/.stack-work/dist/x86_64-osx/Cabal-1.24.2.0/setup -hidir /Users/chuck/proj/hs/odin/.stack-work/downloaded/Zpw1QwqLgZxs/.stack-work/dist/x86_64-osx/Cabal-1.24.2.0/setup -i -i. -clear-package-db -global-package-db -package-db=/Users/chuck/.stack/snapshots/x86_64-osx/lts-8.0/8.0.2/pkgdb -package-db=/Users/chuck/proj/hs/odin/.stack-work/install/x86_64-osx/lts-8.0/8.0.2/pkgdb -hide-all-packages -package-id=Cabal-1.24.2.0 -package-id=base-4.9.1.0 -package-id=directory-1.3.0.0 -package-id=filepath-1.4.1.1 -package-id=hxt-9.3.1.16-C6pOQ0xFGQt4YvlUY7LC4u -optP-include -optP/Users/chuck/proj/hs/odin/.stack-work/downloaded/Zpw1QwqLgZxs/.stack-work/dist/x86_64-osx/Cabal-1.24.2.0/setup/setup_macros.h /Users/chuck/proj/hs/odin/.stack-work/downloaded/Zpw1QwqLgZxs/Setup.hs /Users/chuck/.stack/setup-exe-src/setup-shim-mPHDZzAJ.hs -main-is StackSetupShim.mainOverride -o /Users/chuck/proj/hs/odin/.stack-work/downloaded/Zpw1QwqLgZxs/.stack-work/dist/x86_64-osx/Cabal-1.24.2.0/setup/setup -threaded
Process exited with code: ExitFailure 1
Logs have been written to: /Users/chuck/proj/hs/odin/.stack-work/logs/gl-0.8.0.log
[1 of 7] Compiling Utils ( Utils.hs, /Users/chuck/proj/hs/odin/.stack-work/downloaded/Zpw1QwqLgZxs/.stack-work/dist/x86_64-osx/Cabal-1.24.2.0/setup/Utils.o )
[2 of 7] Compiling Registry ( Registry.hs, /Users/chuck/proj/hs/odin/.stack-work/downloaded/Zpw1QwqLgZxs/.stack-work/dist/x86_64-osx/Cabal-1.24.2.0/setup/Registry.o )
[3 of 7] Compiling Parser ( Parser.hs, /Users/chuck/proj/hs/odin/.stack-work/downloaded/Zpw1QwqLgZxs/.stack-work/dist/x86_64-osx/Cabal-1.24.2.0/setup/Parser.o )
[4 of 7] Compiling Module ( Module.hs, /Users/chuck/proj/hs/odin/.stack-work/downloaded/Zpw1QwqLgZxs/.stack-work/dist/x86_64-osx/Cabal-1.24.2.0/setup/Module.o )
[5 of 7] Compiling Generator ( Generator.hs, /Users/chuck/proj/hs/odin/.stack-work/downloaded/Zpw1QwqLgZxs/.stack-work/dist/x86_64-osx/Cabal-1.24.2.0/setup/Generator.o )
Generator.hs:16:1: error:
Failed to load interface for ‘Control.Monad.Trans.State’
It is a member of the hidden package ‘transformers-0.5.2.0’.
Use -v to see a list of the files searched for.
Generator.hs:21:1: error:
Failed to load interface for ‘Data.Map’
It is a member of the hidden package ‘containers-0.5.7.1’.
Use -v to see a list of the files searched for.
Generator.hs:22:1: error:
Failed to load interface for ‘Data.Map’
It is a member of the hidden package ‘containers-0.5.7.1’.
Use -v to see a list of the files searched for.
Generator.hs:23:1: error:
Failed to load interface for ‘Data.Set’
It is a member of the hidden package ‘containers-0.5.7.1’.
Use -v to see a list of the files searched for.
Generator.hs:24:1: error:
Failed to load interface for ‘Data.Set’
It is a member of the hidden package ‘containers-0.5.7.1’.
Use -v to see a list of the files searched for.
Got odin to build, but all I get when I run it is "could not create window". GHC 7.10.3 on Debian amd64. Suggestions welcome.
A layer widget is a composite of a bunch of other widgets, fenced off by a boundary. It only receives events when the user is interacting with that layer within the boundary.
See odin-engine/src/Odin/Engine/New.hs line 265
-> m (a, PanelState)
Located in "schell/odin/odin-engine/src/Odin/Engine/GUI/Panel.hs" on line 86
Located in "schell/odin/odin-engine/src/Odin/Engine/GUI/Panel.hs" on line 86
Located in "schell/odin/odin-engine/devel/USB.hs" on line 93
See odin-engine/src/Odin/Engine/Tiled.hs line 114
See odin-engine/src/Odin/Engine/GUI/Panel.hs line 86
getTVarFontMap :: Odin r t m => m (TVar FontMap)
Located in "schell/odin/odin-engine/src/Odin/Engine/New.hs" on line 265
Located in "schell/odin/odin-engine/src/Odin/Engine/New.hs" on line 265
A Layer is an offscreen buffer that can be rendered to, and then
transformed and rendered separately. It is used for GUI elements like Pane
and Panel.
See odin-engine/src/Odin/Engine/GUI/Layer.hs line 20
Radio button, pulldown, etc.
After fixing the issues with building the gl dependency, it looks like the Tiled support is broken:
[18 of 23] Compiling Odin.Engine.Tiled ( src/Odin/Engine/Tiled.hs, .stack-work/dist/x86_64-osx/Cabal-1.24.2.0/build/Odin/Engine/Tiled.o )
/Users/chuck/proj/hs/odin/odin-engine/src/Odin/Engine/Tiled.hs:31:30: error:
Not in scope: type constructor or class ‘TileIndex’
/Users/chuck/proj/hs/odin/odin-engine/src/Odin/Engine/Tiled.hs:81:63: error:
Not in scope: type constructor or class ‘TileIndex’
/Users/chuck/proj/hs/odin/odin-engine/src/Odin/Engine/Tiled.hs:85:5: error:
Not in scope: data constructor ‘LayerContentsTiles’
/Users/chuck/proj/hs/odin/odin-engine/src/Odin/Engine/Tiled.hs:88:44: error:
Not in scope: type constructor or class ‘TileIndex’
/Users/chuck/proj/hs/odin/odin-engine/src/Odin/Engine/Tiled.hs:97:10: error:
Not in scope: data constructor ‘TileIndex’
/Users/chuck/proj/hs/odin/odin-engine/src/Odin/Engine/Tiled.hs:97:21: error: Not in scope: ‘tileIndexGid’
/Users/chuck/proj/hs/odin/odin-engine/src/Odin/Engine/Tiled.hs:98:21: error:
Not in scope: ‘tileIndexIsDiagFlipped’
Perhaps you meant ‘tileIsDiagFlipped’ (imported from Data.Tiled)
/Users/chuck/proj/hs/odin/odin-engine/src/Odin/Engine/Tiled.hs:99:21: error:
Not in scope: ‘tileIndexIsHFlipped’
Perhaps you meant ‘tileIsHFlipped’ (imported from Data.Tiled)
/Users/chuck/proj/hs/odin/odin-engine/src/Odin/Engine/Tiled.hs:100:21: error:
Not in scope: ‘tileIndexIsVFlipped’
Perhaps you meant ‘tileIsVFlipped’ (imported from Data.Tiled)
/Users/chuck/proj/hs/odin/odin-engine/src/Odin/Engine/Tiled.hs:103:40: error:
Not in scope: type constructor or class ‘TileIndex’
/Users/chuck/proj/hs/odin/odin-engine/src/Odin/Engine/Tiled.hs:111:38: error:
Not in scope: type constructor or class ‘TileIndex’
/Users/chuck/proj/hs/odin/odin-engine/src/Odin/Engine/Tiled.hs:130:48: error:
Not in scope: type constructor or class ‘Animation’
/Users/chuck/proj/hs/odin/odin-engine/src/Odin/Engine/Tiled.hs:150:35: error:
Not in scope: type constructor or class ‘TileIndex’
/Users/chuck/proj/hs/odin/odin-engine/src/Odin/Engine/Tiled.hs:151:33: error:
Not in scope: data constructor ‘TileIndex’
/Users/chuck/proj/hs/odin/odin-engine/src/Odin/Engine/Tiled.hs:156:33: error:
Not in scope: type constructor or class ‘TileIndex’
/Users/chuck/proj/hs/odin/odin-engine/src/Odin/Engine/Tiled.hs:160:37: error:
Not in scope: type constructor or class ‘TileIndex’
/Users/chuck/proj/hs/odin/odin-engine/src/Odin/Engine/Tiled.hs:174:6: error:
Not in scope: type constructor or class ‘TileIndex’
/Users/chuck/proj/hs/odin/odin-engine/src/Odin/Engine/Tiled.hs:249:6: error:
Not in scope: type constructor or class ‘Animation’
/Users/chuck/proj/hs/odin/odin-engine/src/Odin/Engine/Tiled.hs:251:51: error:
Not in scope: data constructor ‘Animation’
/Users/chuck/proj/hs/odin/odin-engine/src/Odin/Engine/Tiled.hs:252:16: error:
Not in scope: data constructor ‘Frame’
stack build
fails with the following error:
/home/tripped/src/odin/../gelatin/gelatin-core: canonicalizePath: does not exist (No such file or directory)
It looks like this was introduced in commit cd59ca10, when the stack.yaml
dependencies were replaced with relative paths outside of the repo. I was going to try fixing the dependencies myself and submitting a PR along with this issue, but as the change appears deliberate I'm not sure if there was a specific way you were planning to get the dependencies in a working order.
When working with larger bodies of text (like > 4 words), measuring the bounds of text gets really expensive. You can see here how slow the prog gets while editing text.
I think I could write a layout "engine" that only re-renders and re-measures each new word, and saves each processed word in a map keyed by the word itself.
Attached are the prof and ps files from a similar run.
Thu-Aug-18-09:48:52-PDT-2016 copy.txt
Thu-Aug-18-09:48:52-PDT-2016 copy.pdf
A pane widget uses a layer and scrolls around inside it.
Everyone loves a checkbox widget.
rawReadingsVar :: IO (TVar (Int, Int, Int, Int, Int))
Located in "schell/odin/odin-engine/devel/USB.hs" on line 93
Located in "schell/odin/odin-engine/devel/USB.hs" on line 77
sensorReadingsVar :: IO (TVar SensorReadings)
Located in "schell/odin/odin-engine/devel/USB.hs" on line 77
Stack build fails with the following error message:
The same package name is used in multiple local packages
QuadTree used in:
- PLIndex "QuadTree-0.11.0"
- PLOther (PLRepo (Repo {repoUrl = "https://github.com/schell/QuadTree", repoCommit = "bd11166e50e5f2f4ade87613520aaf82e23cc9eb", repoType = RepoGit, repoSubdirs = "."}))
Currently a widget simply renders in the order it was written in the Odin r t m
monad. This should instead be configurable so widgets that depend on other widgets don't always have to be rendered on top.
Located in "schell/odin/odin-engine/src/Odin/Engine/Tiled.hs" on line 114
A Layer is an offscreen buffer that can be rendered to, and then
transformed and rendered separately. It is used for GUI elements like Pane
and Panel.
Located in "schell/odin/odin-engine/src/Odin/Engine/GUI/Layer.hs" on line 20
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.