Timeline for BrickBreaker Spinoff in Haskell
Current License: CC BY-SA 3.0
5 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Nov 8, 2012 at 23:11 | history | edited | ErikR | CC BY-SA 3.0 |
added 421 characters in body
|
Nov 8, 2012 at 22:35 | comment | added | cdk | okay, but i already have the entire drawing/user input part of the game worked out in a separate module. I'll add the main update loop to the question. | |
Nov 8, 2012 at 21:47 | comment | added | ErikR |
You can run SDL.getMouseState as part of the getEvent function. getEvent is an IO Event so it can call SDL.getMouseState .
|
|
Nov 8, 2012 at 21:29 | comment | added | cdk |
The SDL code that actually draws the game is in a seperate module. It has simlar functions to the ones you've mentioned. My rationale for keeping the paddle out of the GameState is that the paddle is controlled by the user (ie. it has to be updated in the IO monad), whereas the current GameState can be used with complete purity. Specifically, the paddle is moved by updating the padX field with the X co-ord of SDL.getMouseState
|
|
Nov 8, 2012 at 20:22 | history | answered | ErikR | CC BY-SA 3.0 |