Latest topics
Create a level from image
5 posters
N-Game v2.0 :: Maps :: Tutorials
Page 1 of 1
Create a level from image
This is a short tutorial how to create a level from a detailed image with lots of pixels, which may be converted in mines or gold (or any other object).
Go to http://goo.gl/pvVdtF, where you'll see the code, which makes the level. On the left there is main.py, image.png and level.txt.
If you double click on image.png, you see an example image which I used to create a level called EddyMatagallos Conspiracy Theories, which I published some time ago. That's right, I made the image in Photoshop and imported it with code in N editor. However, I feel there is a huge unexplored teroritory here, in creativity of creation!
To create your own level, you'll have to change that image.
Image has to be exactly the same size 124 x 92 pixels. It has to be PNG. The color of pixels, which are used for the level is important (it's #c0a300 or 192, 163, 0)
In the website select "root" folder, go to File->Upload File, upload your image. Delete the old image and rename your image "image.png".
Then you press "Execute", double click "level.txt" and there is your level data, which you copy to N Editor. Yeah!
If you want mines, change text on line 159 from "gold" to "mine".
_____
garamond
Go to http://goo.gl/pvVdtF, where you'll see the code, which makes the level. On the left there is main.py, image.png and level.txt.
If you double click on image.png, you see an example image which I used to create a level called EddyMatagallos Conspiracy Theories, which I published some time ago. That's right, I made the image in Photoshop and imported it with code in N editor. However, I feel there is a huge unexplored teroritory here, in creativity of creation!
To create your own level, you'll have to change that image.
Image has to be exactly the same size 124 x 92 pixels. It has to be PNG. The color of pixels, which are used for the level is important (it's #c0a300 or 192, 163, 0)
In the website select "root" folder, go to File->Upload File, upload your image. Delete the old image and rename your image "image.png".
Then you press "Execute", double click "level.txt" and there is your level data, which you copy to N Editor. Yeah!
If you want mines, change text on line 159 from "gold" to "mine".
_____
garamond
garamond- Admin
- Messages : 21
Joined : 2014-11-16
Re: Create a level from image
Last edited by patfelix on Sun Jul 03, 2016 3:22 am; edited 1 time in total
patfelix- Admin
- Messages : 25
Joined : 2015-04-26
Age : 23
Location : United States
Re: Create a level from image
Hi garamond
I made a picture in paint of required pixels. I upload it on root folder and it pops up something saying [object Object]. I click Yes. Then I delete the image.png but again [object Object] comes up. I click yes again and it doesn't delete. I need help.
Thanks.
I made a picture in paint of required pixels. I upload it on root folder and it pops up something saying [object Object]. I click Yes. Then I delete the image.png but again [object Object] comes up. I click yes again and it doesn't delete. I need help.
Thanks.
Nimit- Admin
- Messages : 42
Joined : 2016-02-03
Age : 24
Location : India
Re: Create a level from image
Dude. That is so cool. Really impressive.
Nimit: Did you follow all the instructions? The image has to be:
"size 124 x 92 pixels."
"It has to be PNG"
Colour "#c0a300 or 192, 163, 0"
I know you said you got the size right, but if these aren't all correct it won't work, according to garamond.
Nimit: Did you follow all the instructions? The image has to be:
"size 124 x 92 pixels."
"It has to be PNG"
Colour "#c0a300 or 192, 163, 0"
I know you said you got the size right, but if these aren't all correct it won't work, according to garamond.
Guest- Guest
Re: Create a level from image
I checked and the code doesn't work anymore - it wasn't saved on the website. Although it worked at the time I posted it.
However I will post the code either here - and you will have to install python etc ... or hopefully on some website which would be much easier to use (on the site from the first post I can't get it to work, and I can't find a new one trivially since it requires uploading files and PIL Libraray).
However I will post the code either here - and you will have to install python etc ... or hopefully on some website which would be much easier to use (on the site from the first post I can't get it to work, and I can't find a new one trivially since it requires uploading files and PIL Libraray).
garamond- Admin
- Messages : 21
Joined : 2014-11-16
Trollking- Admin
- Messages : 136
Joined : 2014-04-17
Age : 25
Location : Australia
Re: Create a level from image
Hello,
I made a simple Windows application for this, since it stopped working online.
Download it from here: http://www.filedropper.com/imageton
1. (once) You unzipp it, and just run the exe.
2. Select image which you created. Two sample images are included, so you can copy the exact colors for objects.
3. N Level data is generated and copied to clipboard. Paste it in N editor.
Most objects are supported. Use it for whatever (you're creative!), just don't use too many objects so the game doesn't become too slow.
I made a simple Windows application for this, since it stopped working online.
Download it from here: http://www.filedropper.com/imageton
1. (once) You unzipp it, and just run the exe.
2. Select image which you created. Two sample images are included, so you can copy the exact colors for objects.
3. N Level data is generated and copied to clipboard. Paste it in N editor.
Most objects are supported. Use it for whatever (you're creative!), just don't use too many objects so the game doesn't become too slow.
garamond- Admin
- Messages : 21
Joined : 2014-11-16
Re: Create a level from image
Garamond - I see your example ones - damn that's awesome. It didn't work for me - When I tried and pasted the code in, nothing loaded.
"%Level name#000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000#"
That's all that ever comes up as the copied code.
"%Level name#000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000#"
That's all that ever comes up as the copied code.
Guest- Guest
Re: Create a level from image
What I noticed is if you close the program before you paste level code somewhere, it is empty. Try selecting an image, waiting a few seconds, pasting the code, and then closing the app (althoug it's not necessary to close it).
Use my example images first, they should work.
Yes, I did these two images (Photography I and II) with the help of this program, but I also did Photoshop script. So it automatically generates images.
I'll also post a newer version of the program which supports all objects, except exit door.
Use my example images first, they should work.
Yes, I did these two images (Photography I and II) with the help of this program, but I also did Photoshop script. So it automatically generates images.
I'll also post a newer version of the program which supports all objects, except exit door.
garamond- Admin
- Messages : 21
Joined : 2014-11-16
Re: Create a level from image
Edit: strange - can you send me a picture you are trying to convert?
General thougths:
- it has to be exactly the same width and height as my picture
- it has to be .png
- probably all-color normal png, no strange black-and-white saved pngs
- better no transparency
General thougths:
- it has to be exactly the same width and height as my picture
- it has to be .png
- probably all-color normal png, no strange black-and-white saved pngs
- better no transparency
garamond- Admin
- Messages : 21
Joined : 2014-11-16
Re: Create a level from image
Ah, my images are not the same size. That's the issue. How can I make my image the same size?
Guest- Guest
Re: Create a level from image
Hmm. I suggest you copy my image which you downloaded my program, and simply change it. Just change pixels that you don't need to background color. Pixels that you do need have to be exactly the same colour - the same RGB values.
I can help you more if you tell me which program you use for image manipulation?
I can help you more if you tell me which program you use for image manipulation?
garamond- Admin
- Messages : 21
Joined : 2014-11-16
Re: Create a level from image
Hi garamond,
I'm glad that you actually fixed the program, however it doesnt seem to work for me :(
Whenever I open the image to n.exe file, it pop up an error saying failed to load image from the file D:/Miha/N2/creation/image to level/icons/N-icon.ico". I click ok and after that the program doesnt work. the fault isnt in my picture because I tried those pictures you gave, those also dont work.
PS: those levels were great !
I'm glad that you actually fixed the program, however it doesnt seem to work for me :(
Whenever I open the image to n.exe file, it pop up an error saying failed to load image from the file D:/Miha/N2/creation/image to level/icons/N-icon.ico". I click ok and after that the program doesnt work. the fault isnt in my picture because I tried those pictures you gave, those also dont work.
PS: those levels were great !
Nimit- Admin
- Messages : 42
Joined : 2016-02-03
Age : 24
Location : India
Re: Create a level from image
Hello everyone, program is updated with support for all objects except exit door: http://www.filedropper.com/imagetonv2
@Nimit
That was an error in my program. Let me know if new version works for you.
@shomman
Everybody has an image manipulation program, I simply meant something like Painter in Windows. You use color picker and pencil (circled red).
@Nimit
That was an error in my program. Let me know if new version works for you.
@shomman
Everybody has an image manipulation program, I simply meant something like Painter in Windows. You use color picker and pencil (circled red).
garamond- Admin
- Messages : 21
Joined : 2014-11-16
Re: Create a level from image
garamond wrote:Hello everyone, program is updated with support for all objects except exit door: http://www.filedropper.com/imagetonv2
All right, thanks garamond. My pc is down ATM. I'll try this as soon as it's fixed
Nimit- Admin
- Messages : 42
Joined : 2016-02-03
Age : 24
Location : India
Re: Create a level from image
Ahh, OK. I am no good at art, so I can't make these images. No worries, still a really cool program.
Guest- Guest
Re: Create a level from image
Well ... I did 10+ levels and only published the best 2. It took me whole day to develop the tools. (Although I can now automatically make a photography level in a few minutes.)
Shomman, your levels are also visually estetical. But you can use it for non-art levels too. For example this Fujita's level:
You can easily make drones in image and then import it. Although you would still have to change level code for different types of drones :P
Image for the program:
Shomman, your levels are also visually estetical. But you can use it for non-art levels too. For example this Fujita's level:
You can easily make drones in image and then import it. Although you would still have to change level code for different types of drones :P
Image for the program:
garamond- Admin
- Messages : 21
Joined : 2014-11-16
Re: Create a level from image
I noticed the link for a program that I posted stopped working (from the N user level by sylvyr).
Sending a new one now: https://spaces.hightail.com/space/J2slB
Sending a new one now: https://spaces.hightail.com/space/J2slB
garamond- Admin
- Messages : 21
Joined : 2014-11-16
Re: Create a level from image
I love this. I'll definitely look into this, perhaps I'm able to convert it javascript, so that I can add it to the N-CodeEditor (if I get your permission for that, of course).
vrugtehagel- Admin
- Messages : 35
Joined : 2014-04-25
Re: Create a level from image
Hi, this is the source code. Maybe you can use it or maybe it will take you the same amount of time to write it yourself - it's not documented or well written.
garamond- Admin
- Messages : 21
Joined : 2014-11-16
Similar topics
» Beat Level To Create Level?
» How do I create one?
» Mapping contest
» Level ID
» Level testing for dummies
» How do I create one?
» Mapping contest
» Level ID
» Level testing for dummies
N-Game v2.0 :: Maps :: Tutorials
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
Thu Feb 01, 2024 12:24 pm by Ephemeral
» N v2.0 is a good game, yes or no
Sun Nov 19, 2023 5:34 am by V3L0C1T4
» N v2.0 is fun. Do you agree?
Fri Feb 11, 2022 1:45 am by V3L0C1T4
» Corona Virus - Share your tips & discuss
Mon Jun 29, 2020 1:12 am by james_s
» Good Wishes From The AiR
Sun May 24, 2020 6:33 pm by james_s
» Custom Color!!!!
Thu Jan 16, 2020 12:37 am by JaeyDoesYT
» The 14th flavour?
Mon Jan 13, 2020 11:17 pm by JaeyDoesYT
» Suggestions for Nv2.0
Mon Jan 13, 2020 1:43 pm by JaeyDoesYT
» Level data, fully explained.
Fri Jan 25, 2019 6:17 pm by vrugtehagel