World: r4wp
[Ann-Reply] Reply to Announce group
older newer | first last |
Endo 2-Jul-2012 [115] | it is a bit difficult to see which one is solid, a different color might be better. It's a great game by the way. |
Arnold 2-Jul-2012 [116] | I have to change it but first the kids to bed. |
Endo 2-Jul-2012 [117] | :)) |
Arnold 2-Jul-2012 [118x4] | Remove the bad lines version 1.04 works for me here. Mailed and uploaded just in between some modifications to clean things up a bit. Sorry for the inconvenience! |
I think I know the source of this problem! The script did work on my machine without ANY error! Why? | |
Because on MY REBOL environment labelfont still had a valid definition! It was still in memory from the earlier execution of the script. If tomorrow I start it again it will fail too! | |
Where is everybody?? (-: | |
Rebolek 2-Jul-2012 [122] | Arnold, I looked at the script (btw very cool game!) and you can replace nested 'either in zet-label-kleur with 'case for better readability. |
Arnold 2-Jul-2012 [123x7] | @Rebolek Thanks, that wil be on the list together with line width and color and font-size preferences, a multilingual help function and a resize mechanism. ((: |
I am not fond of case/switch statements because for every language it is doing things differently then you expect, sometimes you need break statements because otherwise the next statement will perform too and other confusing stuff (not) happening. Rebuilding switches to nested ifs mostly solves these problems for me. | |
Of course REBOL's 'case you mean 'switch (REBOL 3 knows a 'case) | |
is pretty straightforward | |
To be honest, I liked the eithers better than the switch/default with an extra default block. I like the :p part of the script too, maybe it is better to rewrite this as :P | |
And switch is missing its case argument.. back to the eithers it is... | |
can't play the game like this :)) | |
Henrik 2-Jul-2012 [130] | And switch is missing its case argument - what do you mean by this? |
GrahamC 2-Jul-2012 [131] | Rebol2 has a pretty straight forward case construct |
Rebolek 2-Jul-2012 [132] | you can use something like this: case [ n < 9 do-something n < 17 do-something-else n < 25 do-something-different ] |
GrahamC 2-Jul-2012 [133x3] | From the docs: num: 10000 case [ num < 10 [print "small"] num < 100 [print "medium"] num < 1000 [print "large"] true [print "huge"] ] huge |
http://www.rebol.com/r3/docs/functions/case.html | |
and switch is useful as it allows multiple tests >> print switch 1 [ 2 1 [ "yes" ] 3 [ "no" ]] yes | |
Maxim 2-Jul-2012 [136x2] | mirror is MUCH more fun now that the numbers on the edge react in real time.... really makes it one big step more playable. its also much more obvious what the game is about. |
it would also be much easier to help and add features if all the code where in english ;-) | |
Kaj 3-Jul-2012 [138] | Not for Dutch kids :-) |
Maxim 3-Jul-2012 [139] | got most of it understandable using google translate :-) |
Arnold 3-Jul-2012 [140] | This is the benefit of speaking another language than English that is the base for so many computerlanguages. You can say things like rij: array [100] where array: array [100] would be a sure syntax error, and rij means array in Dutch off course. If you are in need of additional translations, just say so. Next I will build a multi-lang support lbl-something/text: lbl-something-tekst and a preferences panel with file (mirror.ini or mirror-pref.ini) for language (En De Nl Fr Es Pt additional wishes?), mirror line-width normal(1)/bold(3 wide) for placed or both kinds and/or the grid, color of added mirrors, color for ok color for not ok. |
Maxim 3-Jul-2012 [141x2] | I'm adding a visual and interactive mirror tracing layer so that you can just hover over the numbers and they shoot a visible ray across the grid :-) |
(bouncing off the mirrors obviously) | |
Arnold 3-Jul-2012 [143] | Is yours also workig on android and iPhone yet? :))) |
Maxim 3-Jul-2012 [144x2] | hehe I wish ;-) |
I'm still working on figuring out the grid walking function... nice trick using xor and direction bits btw. | |
Arnold 3-Jul-2012 [146x2] | Thanks, when I did the trick in my Java applet I had never expected to use XOR at all ever. In Java I had an field of 10by10. I'll explain a little. Starting top left having an initial direction south start on the first field of the grid. determine the next direction to go then step and repeat until you step of the board stap=step r row, k for column (kolom) so stapr or stapk will be 0 or 9. then you are on the other end of the board. the values along the board is a series of 32 elements going clockwise around the board. Go to the next field clockwise when right your init direction is west etc. |
When determining the values around the board you skip the ones that already have a value. | |
Maxim 3-Jul-2012 [148x3] | yeah, I'm pretty close to getting it , right now I'm adapting the function which returns the current row-column based on the position, since I need it to handle position outside the edge of the grid-box. then I'll have the initial cell to use to start "walking" the grid. in the end, I'll just add a refinement to the function which does the waking so it returns a block of all the tiles is crossed and an indication of what edges it came in and out of (to make it easier to loop and draw). |
(right now = last I played... right now I'm at work, and can't play with this directly) | |
;-) | |
Arnold 3-Jul-2012 [151x2] | Having the 3 layers on top of each other was a nice REBOL feature saving a little time redrawing the grid and other mirrors as was necessary in Java (well I am not an experienced Java programmer, so it was necessary for me to solve it like that) |
Somewhere I have read that someone had a problem with a similar drawing trick, can't remember where unfortunately, but it made me fear this trick might be impossible. Luckely it did work like I implemented it right on the first try.. | |
Arnold 4-Jul-2012 [153] | Don't you hate that about work? |
Maxim 4-Jul-2012 [154] | hehe |
Arnold 5-Jul-2012 [155x5] | I have seen that one before Try lbl-language-text: "en" |
It really should say " Choose your language here" or somthing Was your mirror-lang.r loaded properly? the next error would be lbl-mirror-color-text . | |
That prediction was correct. Now diving in to find what was already loaded when building this, just like last time. Hang in there! | |
This one is tricky lots of prints now. | |
Fixed it but now the ****really bad words**** radio buttons are protesting again D: | |
Arnold 6-Jul-2012 [160] | It works now, and I made the files .rebol extension again. |
DocKimbel 8-Jul-2012 [161] | @Marco: great work! |
Arnold 8-Jul-2012 [162] | Blowing on the whistle ;-) It's Win only because the RepRap is Win only. |
Henrik 8-Jul-2012 [163] | Marco, very nice. |
Kaj 8-Jul-2012 [164] | Very cool. We have been looking into doing something with the RepRap, preferably with Red |
older newer | first last |