r/processing • u/tayx361 • Mar 03 '26
Beginner help request How can I quickly create platforms for a platformer game?
Hey all. I have a school project where I've been asked to create a game of any kind in processing. I wanted to something like VVVVVV, but without any of the exploration part, just the individual levels. However, creating platforms by using the rect() function specifying the coordinates and dimensions for each and every one of them seems insanely tedious. How would you recommend me speeding up that process?
Thanks in advance :)
2
Upvotes
2
u/MandyBrigwell Moderator Mar 03 '26
That's quite a complex starting point; not to put you off, but something like Pong, Snake, or a simple maze game might be easier.
You're going to need to create a character sprite that can move, and is affected by gravity. It's also going to need to be able to detect the platforms so it doesn't pass through them. In order to detect (and, indeed, draw) the platforms, you need to know where they are, which means you're going to have to define the platforms and keep a record of their positions.
If you don't want to define the platforms and keep a record of their positions yourself, you could generatively produce the platforms, but that's arguably harder than simply making the platforms yourself.
1
u/forgotmyusernamedamm Mar 03 '26
Have you worked with objects in Processing yet? This would be a good use case. If each platform is an instance of a class, then potentially life gets a little easier. Still going to be tricky.
1
u/HAL8000 Mar 20 '26
I just saw this, and if you only had a month your time may be limited, but if you are still interested in generating platformer levels you should check out Notch's Infinite Mario, he uses specialized noise generators to assemble levels and runs a simulated player through to verify that the player can get to the goal. The original Java source is still available via wayback machine - https://web.archive.org/web/20110706121315/http://www.mojang.com/notch/mario/release.zip
1
u/TurtleGraphics64 Mar 26 '26
Another option is to use Tiled to create your own tile maps and levels, and then write a renderer that imports them in Processing. Old article here. Another alternative is to create two programs: the first is a WYSIWYG tool to draw or drag and drop in platforms, then exports to a data file. The second program is your game program, that reads in these external level data files and runs the game.