GenieFramework / StippleDemos

Demo apps for Stipple
49 stars 29 forks source link

trying out 2048 #20

Closed AbhimanyuAryan closed 2 years ago

AbhimanyuAryan commented 2 years ago

@hhaensel I wanted to add this demo on genieframework.com showcase section and looks like the game doesn't look like what @essenciary showed me

Screenshot 2022-04-05 at 8 51 09 PM

When I disable internet and run the game offline. I can play the game. But it doesn't look like what Adrian showed me. Color are different

Screenshot 2022-04-05 at 8 50 37 PM

When my internet is enabled and I run the game. I can't play the game

Screenshot 2022-04-05 at 8 49 05 PM

Weird error stack

......
└ @ Genie.WebChannels ~/.julia/packages/Genie/cdRrC/src/WebChannels.jl:237
[ Info: GET /stipple.jl/master/assets/css/stipplecore.css 200
[ Info: GET /genie.jl/master/assets/js/channels.js 200
[ Info: GET /stipple.jl/master/assets/js/underscore-min.js 200
[ Info: GET /stipple.jl/master/assets/js/vue.js 200
[ Info: GET /stipple.jl/master/assets/js/stipplecore.js 200
[ Info: GET /stipple.jl/master/assets/js/watchers.js 200
┌ Error: Base.IOError("write: broken pipe (EPIPE)", -32)
└ @ Genie.WebChannels ~/.julia/packages/Genie/cdRrC/src/WebChannels.jl:237
┌ Error: Base.IOError("stream is closed or unusable", 0)
└ @ Genie.WebChannels ~/.julia/packages/Genie/cdRrC/src/WebChannels.jl:237
┌ Error: Base.IOError("write: broken pipe (EPIPE)", -32)
└ @ Genie.WebChannels ~/.julia/packages/Genie/cdRrC/src/WebChannels.jl:237
┌ Error: Base.IOError("stream is closed or unusable", 0)
└ @ Genie.WebChannels ~/.julia/packages/Genie/cdRrC/src/WebChannels.jl:237
┌ Error: Base.IOError("write: broken pipe (EPIPE)", -32)
└ @ Genie.WebChannels ~/.julia/packages/Genie/cdRrC/src/WebChannels.jl:237
┌ Error: Base.IOError("stream is closed or unusable", 0)
└ @ Genie.WebChannels ~/.julia/packages/Genie/cdRrC/src/WebChannels.jl:237
┌ Error: Base.IOError("write: broken pipe (EPIPE)", -32)
└ @ Genie.WebChannels ~/.julia/packages/Genie/cdRrC/src/WebChannels.jl:237
┌ Error: Base.IOError("stream is closed or unusable", 0)
└ @ Genie.WebChannels ~/.julia/packages/Genie/cdRrC/src/WebChannels.jl:237
┌ Error: Base.IOError("write: broken pipe (EPIPE)", -32)
└ @ Genie.WebChannels ~/.julia/packages/Genie/cdRrC/src/WebChannels.jl:237
┌ Error: Base.IOError("stream is closed or unusable", 0)
└ @ Genie.WebChannels ~/.julia/packages/Genie/cdRrC/src/WebChannels.jl:237
┌ Error: Base.IOError("write: broken pipe (EPIPE)", -32)
└ @ Genie.WebChannels ~/.julia/packages/Genie/cdRrC/src/WebChannels.jl:237
....

Are we using some assets in cloud or something? So they are not loaded properly. I using Macbook M1(air 2020)

hhaensel commented 2 years ago

I had the same errors today with my regular Stipple apps. So it seems that something with Stipple is broken. In most cases a reload of the page fixed the problem. Meanwhile, there is ann animated 2048 available. Colors still need some tuning, but the mechanics is ok.

AbhimanyuAryan commented 2 years ago

can you review this commit? I removed all back-ticks: https://github.com/GenieFramework/Stipple.jl/commit/fb086806ddd43a7bc0ecc17b7a8eaf9a435398a3 so it picks up code formatting in docs

specifically at line 702(in Stipple.jl). Had weird boxy. spaces So had to remove them with proper spaces

AbhimanyuAryan commented 2 years ago

but I don't think that's the problem. Because examples uses Stipple v0.20.5 and the one with changes is not tagged yet

hhaensel commented 2 years ago

Try updating, I changed the Project.toml

AbhimanyuAryan commented 2 years ago

@hhaensel 2048 works now but I running into issues with 2048_animated

julia> include("Stipple2048_animated.jl")
  Activating project at `~/Git/StippleDemos/AdvancedExamples`
WARNING: could not import Stipple.js_destroyed into Main
ERROR: LoadError: UndefVarError: replay not defined
Stacktrace:
 [1] handlers(model::G2048)
   @ Main ~/Git/StippleDemos/AdvancedExamples/Stipple2048_animated.jl:86
 [2] |>(x::G2048, f::typeof(handlers))
   @ Base ./operators.jl:966
 [3] restart()
   @ Main ~/Git/StippleDemos/AdvancedExamples/Stipple2048_animated.jl:220
 [4] top-level scope
   @ ~/Git/StippleDemos/AdvancedExamples/Stipple2048_animated.jl:227
 [5] include(fname::String)
   @ Base.MainInclude ./client.jl:451
 [6] top-level scope
   @ REPL[3]:1
in expression starting at /Users/abhi/Git/StippleDemos/AdvancedExamples/Stipple2048_animated.jl:227

looks like latest commit is not tagged https://github.com/GenieFramework/Stipple.jl/commit/580070d6aa8c00e723ba582ac3dcc4903d071c85

AbhimanyuAryan commented 2 years ago

ok a different error now after using Stipple#master

julia> include("Stipple2048_animated.jl")
  Activating project at `~/Git/StippleDemos/AdvancedExamples`
ERROR: LoadError: UndefVarError: replay not defined
Stacktrace:
 [1] handlers(model::G2048)
   @ Main ~/Git/StippleDemos/AdvancedExamples/Stipple2048_animated.jl:86
 [2] |>(x::G2048, f::typeof(handlers))
   @ Base ./operators.jl:966
 [3] restart()
   @ Main ~/Git/StippleDemos/AdvancedExamples/Stipple2048_animated.jl:220
 [4] top-level scope
   @ ~/Git/StippleDemos/AdvancedExamples/Stipple2048_animated.jl:227
 [5] include(fname::String)
   @ Base.MainInclude ./client.jl:451
 [6] top-level scope
   @ REPL[2]:1
in expression starting at /Users/abhi/Git/StippleDemos/AdvancedExamples/Stipple2048_animated.jl:227

But I see you have defined replay and R{Bool} weird ....as well as a method

hhaensel commented 2 years ago

The order of the routines needs to be modified, I'll submit a correction soon...

hhaensel commented 2 years ago

Done!

AbhimanyuAryan commented 2 years ago

@hhaensel looks amazing. Closing this....now I just need to get CameraWidget working on m1