Login [Register]
Don't have an account? Register now to chat, post, use our tools, and much more.
I always love the game "Flow free" (Flow free), and because I wanted to start a new *big* project for my color calc, I decided to make it.

Things to do:
- Add a BUNCH of levels, I think 10*150 = 1500 ehmm Surprised
- Make the possibility to do a level
- Save levels
- Time trial

The goal is to connect the matching colors with pipe, and fill the whole board with pipe. But watch out, pipes will break if they cross or ovelap! This seems easy, but what if you get a 12x12 board with 15 different colors? Smile
I hope I can finish this soon, and upload it to the Archives.

Here is a screenshot of what I got so far:

As you can see, it uses DoorsCSE for the awesome graphics, so it is not compatible with the CE. And for the curious one: here is my code so far:

Code:
:DCS
"33333333333333333888333333222666388832222222266638883233332226663383323333AAA36333833233AAAAA36333833233A3AAA3633383323AAA3333633383323AAA3666633383323AAA363333338322233336355533832223666635553383222363333555338388866655535333888886665555533333888666555333
If 80>det([[20
Then
Disp "Get DoorsCSE to run this:","http://dcs.cemetech.net
Return
End
real(0,1,1
real(8,1,not(real(8,0
Lbl 1
real(0,3,4,0
{224,34,16,231->L1
"flow->Str1
For(F,1,4
sub(Str1,F,1
real(6,0,56+8F,20,L1(F),33
End
"free play!about!more games!quit
real(6,0,48,40,255,33
0->A
real(7,10,45,40+8A,90,8
Repeat K=105
Repeat Ans
getKey
End
Ans->K
real(7,10,45,40+8A,90,8
max(0,min(3,A+sum(DeltaList(K={25,34->A
real(7,10,45,40+8A,90,8
End
If A=3
Then
real(0,3,4,255
real(0,1,0,1
Return
End
If A
real(7,9,45,40,90,48,0
If A=2
"LaserGame CSE! tinyurl.com/p2voalw!Tic Tac Toe! tinyurl.com/pnjesme
If A=1
"Drag to connect !matc\hing colors with !p\ipe, creating a !flow.!Pair all colors, and !cover the entire !board with p\ipe !to solve each !puzzle.
If A
Then
real(6,0,0,40,255,33
Pause
Else
real(0,3,4,0
{224,34,16,231,227,224->L1
"levels->Str1
For(F,1,6
sub(Str1,F,1
real(6,0,48+8F,20,L1(F),33
End
"Regular Pack!Bonus Pack!Bridges Pack!6x6 Mania!7x7 Mania!8x8 Mania!9x9 Mania!Extreme Pack!Extreme Pack 2!Rainbow Pack
real(6,0,0,40,255,33
Pause
End
Goto 1

I hope you will enjoy it, and I do my best to finish it!

EDIT: I get the fake levels ready


EDIT2: here is the level completion per level. It gets the values from an appvar.
From looking at the fairly uninformative 30-second video they have on their Google Play page, it looks like it would be great for teaching people how to route traces on PCBs, which actually strikes me as a pretty fun type of game to make at some point. Anyway, this looks like fun, although I don't envy you creating/porting all of those levels. Best of luck making it, and keep us posted as you go.
KermMartian wrote:
From looking at the fairly uninformative 30-second video they have on their Google Play page, it looks like it would be great for teaching people how to route traces on PCBs, which actually strikes me as a pretty fun type of game to make at some point. Anyway, this looks like fun, although I don't envy you creating/porting all of those levels. Best of luck making it, and keep us posted as you go.


Ha, yeah, PCB routing is actually a pretty good description of it. Looks nice! I'm sure this'll find it's way onto my calculator once it's released.
KermMartian wrote:
From looking at the fairly uninformative 30-second video they have on their Google Play page, it looks like it would be great for teaching people how to route traces on PCBs, which actually strikes me as a pretty fun type of game to make at some point. Anyway, this looks like fun, although I don't envy you creating/porting all of those levels. Best of luck making it, and keep us posted as you go.

I don't know exactly what you mean with PCB tracing, but I think something with tracing the selected colors with pipe. I've yet no idea how to do that, something with matrices I think. Probably something like this?
- Store the selected color into a variable
- When placing a pipe:
-- Check if one of his borders has the same color + same direction:
--- Place pipe
And then also check if no other pipe is already there, otherwise the other pipe will be deleted. I will think about it!
I've added in the possibility to select a level (30 choices, not 150 Razz) and display it.

Each board is stored in an appvar (temporarily a program) in a matrix, which is easy to display them.
The image link is broken
Ivoah wrote:
The image link is broken

Looks like it is fixed now Smile

Anyhow, great work on this project! This game tends to be quite addicting, as I know from firsthand experience. Keep it up! Smile
Wow, this looks amazing! And yeah, seems addictive. Always great to have another game being made for the CSE! Smile
[UPDATE]
After working on the algorithm, it works. It is much faster as I thought, seeing at the lines of code (around the 140). I have to do only 2 things:
- Displaying pipe when moving
- Deleting pipe when moving if necessary

Here are some images:


([B] is the matrix with all the pipes)

EDIT:
[UPDATE]
The algorithm works now perfect, including removing pipe, but I'm in doubt wether I would something delete or not. It is hard to explain, but I do my best. When you have selected a pipe, and then you drag the pipe to a cell where another dot is, the pipe isn't displayed ofcourse. But if you then go to the same row or column as the original dot, a line from the dot to the new cell is displayed, no matter how long that is. Should I keep that or must the user select then 1 by 1? If I delete it, it will save around the 250/300 bytes.
Here's an image that will probably help you to interpret Razz
[NEW UPDATE]

The algorithm works, and I've tried to minimize the data of levels, but it is yet too high
Here are some images:

Here is the big boss in action Razz

To get your bearings in *maximum* size:


Whenever I've much free time, I will try to port 300 levels.
Looks great! I can't wait to try it out on my calc. It's unfortunate that the circles look pointy on the ends, but I guess that's what you get with half-res mode. They might look a little better if instead of having each side be one pixel wide, you made it three.
I need serious help. When I want to store the data of 300 levels into an appvar, that would take up your RAM...
Let's say you have the array

Code:
[0,4,3,2,0]
[0,0,0,1,0]
[0,0,1,0,0]
[4,0,0,5,0]
[3,0,5,2,0]

What is the best way to store them into an appvar, in that way I can disassemble it to a normal matrix?
What I have is like this:
{x_value_1|y_value_1,x_value_2|y_value_2... etc, so here it would be {0204,0303,0104,0504,0501... etc, but that takes around 30 bytes for a 5x5 matrix...
Any ideas????
Store the total size of the matrix first. Since it is a square, this can be square rooted to find the width and height of the matrix. Next, compress the data in order by row in an RLE fashion. If you need any more explanation, feel free to ask! Hope this helps Smile
When looking through the graphics I noticed it is confusing to tell what squares are filled and what aren't. My suggestion is coloring the filled squares with a darker shade of the color their pipe has.
Maybe I would randomly add nodes (wider parts) and water taps, levers etc. When erasing a pipe this wind do anything harder but it would enhace the graphics a lot Smile
MateoConLechuga wrote:
Store the total size of the matrix first. Since it is a square, this can be square rooted to find the width and height of the matrix. Next, compress the data in order by row in an RLE fashion. If you need any more explanation, feel free to ask! Hope this helps Smile

Thanks a lot! I found a kind of smaller way.
Let's take again the matrix

Code:
[0,4,3,2,0]
[0,0,0,1,0]
[0,0,1,0,0]
[4,0,0,5,0]
[3,0,5,2,0]

Then my string would be

Code:
0432000010001004005030520

but since there are many zeroes, I could replace a bunch of zeroes with a number and the numbers above the 0 with a letter, so my example would then be

Code:
1DCB4A3A2D2E1C1EB1

How about that?
That definitely seems like a good way to compress the level data. Will each level be stored to a new line in the AppVar? And then the program loads the intended level by reading it's corresponding line?

I am really looking forward to seeing this project come to life.
NoahK wrote:
That definitely seems like a good way to compress the level data. Will each level be stored to a new line in the AppVar? And then the program loads the intended level by reading it's corresponding line?
Exactly, so the AppVar has 300 lines, each with the corresponding compressed level data.
[SPECIAL UPDATE]

I've added in a special color-blind mode, for some people, also here at Cemetech. It just draws the same things, with the exception that it draws an extra shape, just a random one. Oh and as you probably may notice, the shapes are not in the middle of the filled circles, that's just Doors; I can't change it.

Does it looks like good?

You can set the color-blind mode only once, at the first time you run the program, so be sure you choose the right option.
Looks nice! It's a shame the images can't be centered in the circles. Also, I would strongly suggest that you make the colorblind mode be able to be changed.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 2
» All times are GMT - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement