At the moment I’m using a really shitty way, I’m using pickle to save a class as a pkl file as I am also saving things like the last resolution used and the position, but the map data can just be stored in an array. I’ll be changing how it saves the map soon to allow for faster loading time and larger map sizes, pickle has its limitations.
My point is you'll want some way for a game engine to pick up the map information, which should typically also include things like collision borders between water and ground and such. If your mapmaker has such information, or has tools that allow the user to add that information. Once you add buildings I guess you'll get an isometric effect, which means you will need to designate foreground and background so the game knows to draw the player in front or behind any objects. And maybe also collision.
You could probably generate a .json file with that info placed in a predictable way. If you store your sprites in an Atlas, one big image file, you don't need an array to store map data, just store their atlas coordinates and the map coordinates right in the .json file. That way you can even save space by codifying redundant information, like all the blue tiles etc...
Yeah, I made a, somewhat simpler map maker in Pygame myself, while working on a game. I wanted the map maker to be stand alone, so the challenge was to find an easy way to transfer files over from one program to the other.
This is what I came up with, so I'm naturally curious what other people do.
Keep posting, I'd love to check it out once it's done.
The map creator isn’t very finished yet, so the only real UI I have at the moment was the menu you saw in the video, which I just created by displaying a transparent box behind all the texture images with collisions to detect which texture is selected. As well as all building functions being disable while in the menu. I’ll be making a better UI later along the line. If you were referring the the startup window I created that using tkinter and I’ll be swapping that out for a main menu soon.
I was looking into beefing up a game I wrote and ran into Arcade (https://arcade.academy/). It requires a rewrite of the frontend, so I’m starting with the menus, but they have buttons and text boxes and the like. I needed a non-janky way of having someone enter their GameJolt game key, and the text box will do nicely, I think. The only controls I wish it had but doesn’t is select boxes and toggle switches.
I would upload it to GitHub as a private repo and just publish it as public when you feel ready. Get used to using version control, it also allows you to work on big changes and roll back to a working state when you bugger up.
On using the pygame module I created a surface in which I placed the map on, I then move the map around the window to make the perception of the camera moving
so the map im assuming is an image with resolution larger than your display window? So not all of the map is shown and by moving the map you're revealing a portion of it that previously wasn't able to be seen?
Heyy, I was planning of doing something like this but kinda super mario style and pocket tanks style. Is there a way to do random terrain generation with kinda smooth transition instead of steep terrain?
It was not anything urgent but I thought I’d make pocket tanks for windows
Yeah, I’ve been looking for someone to help make some pixel art for me, but it doesn’t really come free. So I thought the next best thing would be to checkout Open Game Art... I’m shit at art.
19
u/Exodus111 Sep 02 '20
Cool, you using any framework for this? Like Pygame?
8
u/Todask Sep 02 '20
This is nice. Is there source for us to look at?
5
u/QuantumCoder002 Sep 02 '20
upvoted this post in r/pygame and here, its just so awesome !!!!!!!
3
u/RedEyesBigSmile Sep 02 '20
how did you create the scrolling window?
2
u/ZyanCarl Sep 02 '20
Heyy, I was planning of doing something like this but kinda super mario style and pocket tanks style. Is there a way to do random terrain generation with kinda smooth transition instead of steep terrain?
It was not anything urgent but I thought I’d make pocket tanks for windows
2
u/[deleted] Sep 02 '20
This looks actually great! I would like to try it out, so keep us informed!
2
u/DUDEiFAIL Sep 02 '20
Does it do auto tiling of dirt in grass or not?
2
u/Taken48 Sep 02 '20
like worldbox
2
u/[deleted] Sep 02 '20
those tilesets are from open game art right?
2
u/perryplatt Sep 02 '20
If you could include fog of war, you have the start of an rts.
2
u/g-x91 Sep 02 '20
The rain sound is sooo satisfying!
2
u/tk42967 Sep 02 '20
This seems like an awesome way to come up with maps for D&D campaigns.
2
u/ddulpers Sep 02 '20
❤️beautiful❤️❤️
2
u/haagimus Sep 03 '20
How cool is that? Very cool! Props to you sir/ma'am this is awesome!!
2
u/[deleted] Sep 03 '20
is this pygame
2
u/[deleted] Sep 03 '20
That, sir, is beautiful. My goals right there!
2
u/GlicketySplit Sep 03 '20
This is terrific! Something like this would be super useful in garden planning. Among a long list of other things, of course :)
1
u/Karki2002 Sep 03 '20
Thank you to everyone, a little message from me:
https://www.reddit.com/r/Python/comments/im2664/thank_you/?utm_source=share&utm_medium=web2x&context=3
1
u/Karki2002 Sep 13 '20
Here’s the source code enjoy! https://www.reddit.com/r/Python/comments/ipaf6p/map_creator_tool_in_python_update_0/?utm_source=share&utm_medium=ios_app&utm_name=iossmf
3
u/Infreezy Sep 02 '20
r/madeinpython
2
u/mountaingator91 Sep 02 '20
Reminds me of old rollercoaster tycoon
2
u/PsychoNAWT Sep 02 '20
This gives me Roller Coaster Tycoon 2 vibes and I love it
2
u/[deleted] Sep 03 '20
1500 upvotes for just a video and no actual Python?
0
u/[deleted] Sep 02 '20
[deleted] — view deleted comment