Questions tagged [gloss]

The Haskell gloss package is a simple vector graphics drawing package.

Source

Gloss hides the pain of drawing simple vector graphics behind a nice data type and a few display functions. Gloss uses OpenGL under the hood, but you won't need to worry about any of that. Get something cool on the screen in under 10 minutes.

102 questions
1
vote
1 answer

freeze simulation in gloss Haskell

I'm using the gloss library to picture a simulation. Is there a function, which stops the simulation function when a condition is true. Just the last drawn picture should remain in the window. Thanks in advance
Max K
  • 171
  • 12
1
vote
2 answers

function for getting window width and height with haskell gloss

Is there a function, similar to JS screen.width and screen.height in Haskell with the gloss graphic library, which returns the screen width and height?
Max K
  • 171
  • 12
1
vote
2 answers

Run haskell gloss GUI using cabal

I am new to haskell and I want to learn how to create GUIs using the haskell platform. I found this tic tac toe example but I can't seem to figure it out how to run it. https://github.com/DevJac/gloss-tic-tac-toe I runned Setup.hs, it compiled but…
Bill Jobs
  • 25
  • 7
1
vote
1 answer

Reading user mouseclick position in haskells gloss

Edit: So i followed your pointers and got to this point: (following the rules of play) https://hackage.haskell.org/package/gloss-1.9.4.1/docs/Graphics-Gloss-Interface-Pure-Game.html drawBoard :: IO () drawBoard = play (InWindow "Tic Tac Toe"…
darrrrUC
  • 311
  • 2
  • 15
1
vote
0 answers

Haskell program crashes when compiled but not when run through GHCI

Program is here, although it's a lot of code and I don't know where the issue is: https://github.com/rocurley/BlockPhys My program hangs (gloss window displays whatever's behind it, and debugging information is not printed) whenever I run it.…
user1454156
  • 133
  • 3
1
vote
1 answer

Haskell Gloss Particle Effects

How to create particle effects in Haskell using the Gloss library? (e.g. to show an explosion) If anyone could help me out a bit on how this is done it'd be much appreciated. Best Regards, Skyfe.
user2999349
  • 859
  • 8
  • 21
1
vote
0 answers

SVG backend for gloss?

I am using gloss http://hackage.haskell.org/package/gloss for very simple (static) pictures, using lines, and some scaling/translation. How could I output them in the SVG format?
d8d0d65b3f7cf42
  • 2,597
  • 15
  • 28
1
vote
0 answers

Itunesartwork glosseffect

I have a problem with displaying ITunesArtwork icon gloss effect through https://itunes.apple.com/app/id738696013 Gloss effect you may view despite the fact that had set option "iOS icon is pre-rendered display" at YES. If you view the application…
del1980
  • 33
  • 1
  • 5
1
vote
1 answer

Haskell code with Gloss lib doesn't compile

I switched from C++ to Haskell and use Gloss to make games. I wrote this valid code in a main.hs: import Graphics.Gloss.Interface.Pure.Game events (EventKey (Char 'a') Down _ _) _ = RectangleWire 10 10 events _ x = x main = play (InWindow…
L01man
  • 1,521
  • 10
  • 27
0
votes
0 answers

how to approach moving custom images around the screen using the gloss library

I am trying to build a simple game in gloss that uses BMP files for sprites that will be animated and moved around after being loaded. I am trying to get a few of these images of them to move using the animate or simulate functions. One of the…
floxam
  • 25
  • 5
0
votes
0 answers

Is there a function to get Picture size in haskell gloss?

I'm trying to grasp some haskell by drawing simple pictures with gloss library. Is there a way to get a picture size? circ :: Picture circ = circle 100 I'm looking for something like: width circ -- returns 200
Lukh
  • 121
  • 1
  • 7
0
votes
1 answer

Using EventMotion to move my paddle in a game of pong makes it unable to register collisions

I am making a game of pong in haskell using gloss as my main library. The movement of the paddle controlled by player is tied to the x-coordinate of the mouse and is updated as it moves. The problem is, the ball doesn't register collision with the…
0
votes
2 answers

Clojure Gloss - codec for Variable Byte Integer from MQTT protocol spec

I am developing MQTT server in Clojure. I use Gloss to parse binary data. However, I'm stuck with Variable Byte Integer, not sure how to create codec for this. My gut feeling it should use header frame somehow, but I'm not sure how to put it…
0
votes
1 answer

Simple Haskell Gloss program won't run on Windows 8 (Using LTS Haskell 16.27 with ghc-8.8.4)

I have the following gloss program: module Easy where import Graphics.Gloss main :: IO () main = display (InWindow "My Window" (200,200) (10,10)) white (Circle 80) However when I run stack runghc Easy I get the following error: Easy: user error…
user1023733
  • 805
  • 5
  • 14
0
votes
1 answer

Is there a way to have the origin be in the top left corner when using Gloss

I'm making an Asteroids clone in Haskell using Gloss. I want the spaceship to come back from the left if it goes out on the right side of the screen. This is made unnecessarily tricky by the fact that the origin (0, 0) is in the middle of the…
The Hoff
  • 904
  • 1
  • 11
  • 22