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

SPower's Comments

Back to SPower's profile

@LewisEro For the scaling of the cubes, note that the Cube class constructor comes with a parameter for the size. In the Demo class for instance, I create cubes using new Cube(0.2, Color.BLACK, colors[colorNumber]), where the 0.2 indicates the size of the cube. As to creating a Wolfenstein/Doom game, it absolutely could be used for that. The biggest fear I have would be the performance. Offline this would be much better than online, but still you'd likely be limited in how many polygons you can have appear on screen at once. Of course, making it a full game would require more stuff than just the rendering -- I'm talking collision detection or AI, to name some basic things. Builderboy2005 has a scenario* up (Castle Storm II) which comes much closer to a such a game (although to my knowledge he never finished it). It comes with an .obj reader (meaning you can model objects in Blender and put them in the game directly), as well as floor detection. Still, the code is likely very different (I didn't look at his code when writing this scenario; I suspect his code is more optimised, but would look very different), so even implementing his approach into this scenario would take some time. And not to mention making all the content... In any case, I don't have the time or willpower to make a game out of this :P But anyone is free to use it if they want. * =
What makes the scenario slow down to a couple of FPS when jumping?
You might consider adding Greenfoot.start() at the end of the constructor of the world; that'll make the scenario start automatically (no more need to press the 'Run' button). Since you've got a menu and a start button implemented, Greenfoot's built in 'Run' button is unnecessary for you. Also, 70 :P
The move method in actor should do that. But for further Greenfoot questions, please create a discussion - that's how thing are kept tidy around here.
Though you don't necessarily need to change the code for actually moving it, but it would be easier in my opinion (plus, less CPU intensive: rotating, though you don't notice it here, can be costly).
Not bad! :) Though it'd be nice if pressing multiple keys at once would make it move diagonally (i.e. w + a --> towards the top left). You'll simply need to check all the keys in separate if-statements, instead of making it 'else if' clauses, and then use setLocation(getX() +something, getY() +somethingelse), depending on whether you're moving to the left, right, up or down.
For a first game made with Greenfoot, this is really not bad! It's only that the time doesn't seem to work: the end screen told me my time was 0, even though I did play for a longer time than that :)
My vote: I'd like to see it, and would check it out. (For some reason it says UserInfo is not available.)
A few things: perhaps you could use the UserInfo API to save how far a player has gotten, so that you don't have to start all over again after reloading the page. You won't need to save the positions of all the weapons: you could just calculate how much money the player would have at a certain wave, and let them rebuild their previous setup. And you can use Greenfoot.start() to start the scenario, so that you won't have to click 'Run' first each time :)