Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Nov 14 15:47

    JoelOtter on master

    added sokoban to readme (#53) (compare)

  • Nov 14 15:47
    JoelOtter closed #53
  • Nov 14 15:38
    tristangoossens opened #53
  • Nov 01 13:32

    JoelOtter on master

    Update README.md (#52) Added a… (compare)

  • Nov 01 13:32
    JoelOtter closed #52
  • Oct 31 18:26
    ScottBrooks opened #52
  • Oct 31 11:38

    JoelOtter on master

    added terminal-based snake game… (compare)

  • Oct 31 11:38
    JoelOtter closed #51
  • Oct 31 11:38
    JoelOtter commented #51
  • Oct 31 11:05
    tristangoossens opened #51
  • Jun 10 11:59

    JoelOtter on master

    Update README.md with Doric (compare)

  • Jun 10 11:59
    JoelOtter closed #50
  • Jun 10 11:58

    JoelOtter on master

    Solve high cpu usage in examples (compare)

  • Jun 10 11:58
    JoelOtter closed #49
  • Jun 10 11:33
    svera opened #50
  • Mar 02 18:50
    lucasew opened #49
  • Dec 01 2018 17:22
    jingminglang opened #48
  • Nov 12 2018 20:41

    JoelOtter on yolo

    yolo shaders begin yolo warning (compare)

  • Nov 12 2018 20:40

    JoelOtter on master

    Add conwaygo to README (compare)

  • Nov 12 2018 20:40
    JoelOtter closed #47
Joel Auterson
@JoelOtter
Hi @/all! I've just pushed a new change, and it's an actual new feature (the first in ages, I know). It's called pixel mode - have a look at _example/image.go for a hint on how to use it. I'm currently writing a blog post that'll explain it better.
Scott Weiss
@ilackarms_twitter
@JoelOtter nice work
is there any way to still print text?
Joel Auterson
@JoelOtter
@ilackarms_twitter You can't in pixel mode, you can in normal mode
Pixel mode turns it into a more 'traditional' rendering canvas. Like a game boy, hah
Pixel mode is off by default
You could render text yourself pixel by pixel...
Edward Carmack
@Ariemeth
Very cool new mode
Joel Auterson
@JoelOtter
Thanks @Ariemeth, looking forward to seeing if people do anything cool with it :)
Joel Auterson
@JoelOtter
Pushing a bunch of changes - these are mostly just to code style and shouldn't break anything, though the tutorial will be slightly different
Basically I didn't know about anonymous struct fields when I wrote Termloop, haha
Edward Carmack
@Ariemeth
@JoelOtter Nice cleanup
Ryan Baer
@ryanbaer
Has anyone done anything with multiple levels in the same game?
Also it doesn't look like there's a way to programmatically cause the game to cleanly exit. Am I missing something?
Ryan Baer
@ryanbaer
OK I was able to get the result I needed. If anyone is curious what I did or wants to checkout the Minesweeper game I made, it's on my repo: https://github.com/ryanbaer/minesweeper-go
Michael Crilly
@mrcrilly
@ryanbaer "Investigate high CPU on macOS" - try setting the FPS to something like 120. I think the default is 1,000 and causes high CPU load.
Looks like this place might be dead.
Ryan Baer
@ryanbaer
@mrcrilly hey, thanks for checking out my repo and catching that! Didn't realize it set a default so high
aand yep, that did it, CPU down to ~1%. thanks!
Joel Auterson
@JoelOtter
oops
sorry
not dead
just gitter being bad at emailing me ;)
yeah termloop doesn't enforce a default framerate cap due to differences between terminal emulators
we probably should
for exiting the game...i've always kinda done it with the keyboard shortcut but it definitely needs a programmatic way
guess the "go way" would be to have a write-only channel on the Game struct
Ryan Baer
@ryanbaer
I ended up just adding a regular message on many of the levels that said "Press [ctrl + c] to exit at any time" for the time being.
Ryan Baer
@ryanbaer

Channels would work internally, and making the channel public in case someone needs it may also make sense.

In general, though, does it ever make sense for there to be more than one Game type in existence? If not, a singleton pattern might work, making Game available as a package-level variable in that NewGame() is still necessary to initialize things, but termloop.Game() gives you the singleton from anywhere, which would also allow you to easily call game.Quit() from anywhere easily as well.

Not too familiar with the internals of your package yet though, so let me know if something I'm suggesting wouldn't make sense.

Joel Auterson
@JoelOtter
think that would make sense! just curious about the general implications of applying the singleton pattern in a non-OO language like golang
Michael Crilly
@mrcrilly
:)
Joel Auterson
@JoelOtter
@ryanbaer feel free to make a PR to add your Minesweeper game to our README! I think it's ace
Ryan Baer
@ryanbaer
Hey @JoelOtter, re: singleton, on after thinking about it some more, I probably shouldn't make design suggestions at 2AM, haha - I don't think a singleton would really be an improvement after all. And re: Minesweeper, thanks - appreciate that! I'll make a PR.
Joel Auterson
@JoelOtter
but 2am is the best time to make design decisions!
SonarBeserk
@SonarBeserk
Has anyone tried writing terminal games on windows? Ive had issues with most terminals not displaying things correctly. Seeing black screens or no screens at all.
Edward Carmack
@Ariemeth
@SonarBeserk I didn't have any problems with it
but I haven't worked with it in over a year
Just tested https://github.com/Ariemeth/frame_assault again on windows in powershell and it worked fine
SonarBeserk
@SonarBeserk
@Ariemeth Tried git bash or anything?
I basically never use powershell and im getting the nice character missing blocks when trying powershell
Edward Carmack
@Ariemeth
This is strange. If you I use the integrated terminal on vscode which is set to use git bash, it works, but the colors are off, if I run it directly in git bash, it won't even start
Just hangs
SonarBeserk
@SonarBeserk
Yeah im seeing the same. Cmd also seems to have issues
My integrated git bash however isn't working.
Edward Carmack
@Ariemeth
I can only assume termbox updated at some point that is causing the issue
Renato Marinho
@renatomarinho
This message was deleted
Renato Marinho
@renatomarinho
This message was deleted
Arshad Kazmi
@arshadkazmi42
Is there a way to restart game in termloop?
Will Savage
@wsKilljoy
Is TermLoop still under active development?