N-Game v2.0
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Latest topics
» A Dying Breed
Create a level from image EmptyThu Feb 01, 2024 12:24 pm by Ephemeral

» N v2.0 is a good game, yes or no
Create a level from image EmptySun Nov 19, 2023 5:34 am by V3L0C1T4

» N v2.0 is fun. Do you agree?
Create a level from image EmptyFri Feb 11, 2022 1:45 am by V3L0C1T4

» Corona Virus - Share your tips & discuss
Create a level from image EmptyMon Jun 29, 2020 1:12 am by james_s

» Good Wishes From The AiR
Create a level from image EmptySun May 24, 2020 6:33 pm by james_s

» Custom Color!!!!
Create a level from image EmptyThu Jan 16, 2020 12:37 am by JaeyDoesYT

» The 14th flavour?
Create a level from image EmptyMon Jan 13, 2020 11:17 pm by JaeyDoesYT

» Suggestions for Nv2.0
Create a level from image EmptyMon Jan 13, 2020 1:43 pm by JaeyDoesYT

» Level data, fully explained.
Create a level from image EmptyFri Jan 25, 2019 6:17 pm by vrugtehagel


Create a level from image

5 posters

Go down

Create a level from image Empty Create a level from image

Post by garamond Sun May 10, 2015 10:42 am

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).

Create a level from image ZGnR4zr

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

Back to top Go down

Create a level from image Empty Re: Create a level from image

Post by patfelix Sun May 10, 2015 2:34 pm



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

Back to top Go down

Create a level from image Empty Re: Create a level from image

Post by Nimit Wed Mar 16, 2016 8:25 pm

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.
Nimit
Nimit
Admin

Messages : 42
Joined : 2016-02-03
Age : 24
Location : India

Back to top Go down

Create a level from image Empty Re: Create a level from image

Post by Guest Wed Mar 16, 2016 9:19 pm

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.

Guest
Guest


Back to top Go down

Create a level from image Empty Re: Create a level from image

Post by garamond Wed Mar 16, 2016 9:27 pm

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).

garamond
Admin

Messages : 21
Joined : 2014-11-16

Back to top Go down

Create a level from image Empty Re: Create a level from image

Post by Trollking Thu Mar 17, 2016 2:29 am

nice :)
Trollking
Trollking
Admin

Messages : 136
Joined : 2014-04-17
Age : 25
Location : Australia

Back to top Go down

Create a level from image Empty Re: Create a level from image

Post by garamond Sat Apr 30, 2016 6:34 pm

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.

Create a level from image YfCqC0K
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

Back to top Go down

Create a level from image Empty Re: Create a level from image

Post by garamond Sat Apr 30, 2016 6:38 pm

Screenshot:
Create a level from image ScW13fE

garamond
Admin

Messages : 21
Joined : 2014-11-16

Back to top Go down

Create a level from image Empty Re: Create a level from image

Post by Guest Wed May 04, 2016 10:29 pm

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.

Guest
Guest


Back to top Go down

Create a level from image Empty Re: Create a level from image

Post by garamond Wed May 04, 2016 10:35 pm

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.

garamond
Admin

Messages : 21
Joined : 2014-11-16

Back to top Go down

Create a level from image Empty Re: Create a level from image

Post by garamond Wed May 04, 2016 10:38 pm

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

garamond
Admin

Messages : 21
Joined : 2014-11-16

Back to top Go down

Create a level from image Empty Re: Create a level from image

Post by Guest Thu May 05, 2016 1:14 am

Ah, my images are not the same size. That's the issue. How can I make my image the same size?

Guest
Guest


Back to top Go down

Create a level from image Empty Re: Create a level from image

Post by garamond Thu May 05, 2016 6:13 am

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?

garamond
Admin

Messages : 21
Joined : 2014-11-16

Back to top Go down

Create a level from image Empty Re: Create a level from image

Post by Guest Thu May 05, 2016 8:09 am

ah, right ok. 
I don't have a program for image manipulation.

Guest
Guest


Back to top Go down

Create a level from image Empty Re: Create a level from image

Post by Nimit Thu May 05, 2016 10:41 am

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 !
Nimit
Nimit
Admin

Messages : 42
Joined : 2016-02-03
Age : 24
Location : India

Back to top Go down

Create a level from image Empty Re: Create a level from image

Post by garamond Thu May 05, 2016 5:25 pm

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).
Create a level from image RCehrFs

garamond
Admin

Messages : 21
Joined : 2014-11-16

Back to top Go down

Create a level from image Empty Re: Create a level from image

Post by Nimit Thu May 05, 2016 5:45 pm

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
Nimit
Admin

Messages : 42
Joined : 2016-02-03
Age : 24
Location : India

Back to top Go down

Create a level from image Empty Re: Create a level from image

Post by Guest Fri May 06, 2016 10:37 am

Ahh, OK. I am no good at art, so I can't make these images. No worries, still a really cool program.

Guest
Guest


Back to top Go down

Create a level from image Empty Re: Create a level from image

Post by garamond Fri May 06, 2016 5:03 pm

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:
Create a level from image PWiAcyf
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:
Create a level from image OSIYrb4

garamond
Admin

Messages : 21
Joined : 2014-11-16

Back to top Go down

Create a level from image Empty Re: Create a level from image

Post by garamond Mon May 23, 2016 11:03 pm

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

garamond
Admin

Messages : 21
Joined : 2014-11-16

Back to top Go down

Create a level from image Empty Re: Create a level from image

Post by vrugtehagel Sat May 28, 2016 9:40 am

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

Back to top Go down

Create a level from image Empty Re: Create a level from image

Post by garamond Sun May 29, 2016 10:15 am

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

Back to top Go down

Create a level from image Empty Re: Create a level from image

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum