Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Aug 13 2016 03:24
    @PeterWAWood banned @Vexercizer
Galen Ivanov
@GalenIvanov
@endo64 I only tested it on the GUI console
Vladimir Vasilyev
@9214
GUI / CLI difference has no bearing here, it's interpreter issue. @GalenIvanov you ought to provide at least some error or debug message, if you want it to be resolved. "It crashes" isn't terribly useful.
Galen Ivanov
@GalenIvanov
@9214 I'm aware that it could be entirely my fault. I just realized the big difference between the code inerpreted in the GUI console and the compiled code. Unfortunately I didn't receive any error message. I tried to naively debug the code with printing/probing some values, but when the program crashed in the console, I never got any error message. I'll post a link to my code tomorrow. Thank you all for your feedback.
@9214 BTW, here is my take on L-systems. I also didn't get any crashes.
Vladimir Vasilyev
@9214
@GalenIvanov it 's our fault that Red crashes, not yours :wink: Try to compile console in debug mode (-d flag) and launch it from command line, then paste here stack trace that you'll see after crash.
Galen Ivanov
@GalenIvanov
@9214 Thank you for your support. In the meantime I updated Red to the automated build - red-25sep19-f753e25c.exe - and there is no problem anymore, not a single crash. Sorry for wasting your time and not trying the most obvious thing. The version I have been using until now was really old - built on 22 Nov 2018.
Gregg Irwin
@greggirwin
:+1:
Gregg Irwin
@greggirwin
Does anyone remember why drop-list doesn't have a readable text facet? i.e., it's not set on selection.
Galen Ivanov
@GalenIvanov
Island_allleys_8x8.jpg
I almost finished the game for which I was coding my generator of Hamiltonian paths. I present you the "Island Alleys"
It is a logic puzzle in the vein of Slitherlink.
You need to connect the dots by clicking (not dragging) between them and form a closed loop that goes through all the dots on the grid. The numbers are placed only where two or more "alleys" meet at a right angle and indicate the total distance to the shore in all directions.
Galen Ivanov
@GalenIvanov
I'll add a thorough step by step example solve later.
Enjoy!
Semseddin Moldibi
@endo64
@GalenIvanov Very nice! You could also add a textbox so the user can select a specific game (value for random/seed).
Galen Ivanov
@GalenIvanov
@endo64 Thank you! Yes, that would be a good feature and it's easy to implement. I also need to make the "About" window modal; some of the contents of the canvas/draw block don't need to be computed at each click but only when needed.
One thing I observed (I'm not 100% sure though, I'll check tonight at home) is that style doesn't work correctly for the size of the button - the y part of the pair is not taken into consideration in Win 8.1. Here, on my Win 10 at work it's working correctly.
Toomas Vooglaid
@toomasv
@GalenIvanov Very nice game! :+1:
Toomas Vooglaid
@toomasv
@GalenIvanov When you add grid size to the title, I think you should copy the text first, otherwise several grid sizes are added if player reloads new game in desperation (as I did).
Toomas Vooglaid
@toomasv
image.png
Galen Ivanov
@GalenIvanov
@toomasv Thank you and congratulations for solving it! Apparently you don't neeed an elaborated step-by-step-how-to-solve-it :) Thank you also for finding the bug in the title - I fixed it and moved the title creation in the init-boardfunc, where it belongs.
I have several more ideas for games on such a grid, I hope I'll finish them too.
Toomas Vooglaid
@toomasv
@GalenIvanov Congratulations for very interesting game!
Galen Ivanov
@GalenIvanov
@toomasv I'm very happy that you like it!
Gregg Irwin
@greggirwin
Very nice @GalenIvanov! I might need step by step instructions though. How do you win? e.g. this doesn't:
image.png
Toomas Vooglaid
@toomasv
Hint - numbers are on meeting alleys only, indicating sum of number of cells to wall in each direction. So, 6 in upper line cannot be just in middle of an alley, 5 in corner indicates altogether 5 cells to wall in two direction (any combination of [4 1] [3 2]...)
Gregg Irwin
@greggirwin
Thanks!
Toomas Vooglaid
@toomasv
:) Another hint - all info you need to start solving it is given on the middle picture of the announcement above.
Gregg Irwin
@greggirwin
I get it now. At least I won one round. :^)
I like it!
With @endo64's suggestion, then you can have a timer and leaderboards given a specific seed.
Toomas Vooglaid
@toomasv
Yes, great distraction, er.. no, exercise!
Galen Ivanov
@GalenIvanov
@greggirwin Thank you! I was thinking about a timer too, I might add one, along with a seed. @toomasv gave you very accurate hints. The middle picture shows all the initial preparations - the 4 corner dots are always part of the island, so their adjacent edges must be included; the numbers are always on the island, that's why the squares with numbers at the borders of the grid must have their outer edge included in the loop and so on. I'm starting writing a solving instruction right now.
Jose Luis
@planetsizecpu
@GalenIvanov Good job! I still playing.
Galen Ivanov
@GalenIvanov
@planetsizecpu Thank you! Have a nice time playing!
Galen Ivanov
@GalenIvanov
@greggirwin May be you don't need it anymore, but I uploaded solving instructions for my game.
R cqls
@rcqls
@GalenIvanov Always nice to see something new working on red/GTK!
Galen Ivanov
@GalenIvanov
@rcqls That's great!
R cqls
@rcqls
@GalenIvanov And even better delivered as a compiled binary! Great job!
Galen Ivanov
@GalenIvanov
@rcqls Thank you! I'm now adjusting the color scheme and will update the source, but that won't affect the performance :)
Toomas Vooglaid
@toomasv
@GalenIvanov Excellent example solution!
Galen Ivanov
@GalenIvanov
@toomasv Thank you! Most probably there are more situations lacking description here, but I think it's a good start.
Gregg Irwin
@greggirwin
Thanks for writing instructions @GalenIvanov. I'll try to check them out soon. Another nice feature would be the ability to save and load games. So if you get stuck, or are tired, you can pick back up to continue.
Gregg Irwin
@greggirwin
Just glanced at them @GalenIvanov. Wow! Detailed. Thanks!
Galen Ivanov
@GalenIvanov
@greggirwin That would be a nice feature - I might try it. Another nice feature would be to include the instructions as prerecorded autoplay with popup instructions/hints. But I'll leave it for the next game :)
Gregg Irwin
@greggirwin
A hint feature could be nice. And a "Get it started" option that fills in all the first pieces that your hints outline, because that's just repetitive work for every game. Not the challenging part.
Galen Ivanov
@GalenIvanov
@greggirwin Yes, it can become tedious
DVL333
@DVL333

Is it possible to use variables inside style instruction?
For example, i want to write something like that:

style hand: base 30x30 loose on-drag [(var): face/offset]

where (var) - variable that i want to set when "hand" face will be created.

Toomas Vooglaid
@toomasv
@DVL333 You can use compose in either way:
view [
    style hand: base 30x30 loose with [
        actors: object [
            on-drag: func [face event] compose [
                (to-set-word var) face/offset
            ]
        ]
    ]
    ...
]

view compose/deep [
    style hand: base 30x30 loose on-drag [
        (to-set-word var) face/offset
    ]
    ...
]