This site requires JavaScript, please enable it in your browser!
Greenfoot back

danpost's Comments

Back to danpost's profile

@kiarocks, must be a Mac thing! Obviously, others are not having any problems.
@kiarocks, is your system still screwed up?
If you casually stare, or slowly gaze around, on the larger size mazes, you will get the (optical) illusion of blue-gray dots in the white-space between the paths.
In the export window, uncheck the 'Keep existing screenshop' checkbox, then adjust the image with dragging and/or the slider on the right to zoom in/out. Before opening the export window, you may want to 'Run' the scenario to some point where you think a part of the image would be suitable; then, 'Pause' the scenario and click on the 'Share' button. The scenario image should show up in the screenshot window.
danpostdanpost

2012/3/24

You world is already sized with cells; however, with a cell-size of 1 pixel by 1 pixel. The 'super(int, int, int)' command in the constructor of your world determined this. This command is basically: super(int 'cells across', int 'cells down', int 'height and width of one cell') With the 'height and width of one cell' being set to one (1), each pixel becomes a cell in itself. You will still use precise numbers, just modified to suit your needs. The width of your world will be 'cells across' * 'width of one cell', and the height of your world will be 'cells down' * 'height of one cell'. Objects will only be placed at the center of any cell, and moves and offsets are based on cells (not pixels). Ex: super (30, 20, 20) = 600 cells: 30 across by 20 down, each 20 x 20 pixels in size. addObject(new Obj(), 30, 20) would place the object passed the edge of the world, even though the world is 600 by 400 pixels in size; move(1) would move the object 20 pixels in the direction it is facing (up, down, left, or right), or one cell in that direction. Hope this helps.
danpostdanpost

2012/3/23

The traverse method appears to solve the maze by itself. In it you will find the coordinates that it looks for, and its parameters are the coordinates that you are starting from. You probably want to call that method AFTER the player solves it, and add an object to the cells that are in the path to show the true path. I created a maze program that (after solved by player) shows each step of the solving process by colors -- yellow for working on that cell, red for cell not in path, and green for true path. It uses a recursive method, but not the traverse you would use. I slowed down the speed, so you could see each step clearly, and it started at the finish, and worked back to the starting point. I will be working on random maze creation soon.
danpostdanpost

2012/3/22

matt.milan is right! You need to do something about the size of your world -- get it to match your maze somehow. maybe a cell size of about 40; but all your references and values to locations in the world would have to be adjusted to match.
Cannot quite seem to get the speed right. Either it is too fast, or I get a hesitating action throughout.
@kiarocks, does it match your computers grapher now? (I made it so when the exponent was '1/2' or '1/3', it would use Math.sqrt or Math.cbrt, instead of using Math.pow(factor, exponent)).