hello
it seems to me that most member here LIKE-LOVE Blitz products
That is fine ...
i have a question , Is there any example or snippet how to build
small aka simple pixel editor ..something like sprite editor or icon editor ?
just for example for 16x16 or 32x32 pixels and that can be saved as .bmp
thanks
I was working on a simple sprite editor once in blitzplus. I made different version each with a special feature implemented. Sort of tutorial style.
https://github.com/Pakz001/blitzplusexamples
I was watching a screen shots of shoot em up construction kit, and the sprite editor there seems like a minimum style editor that seems like a good reference for minimal sprite editors.
thanks
because i don't know...
So i need to download blitz+ first ..right?
I need it in first place like a small pixel editor not for sprites
but i think that it is same ..
Is Blitzplus free?
OK @Pakz
i download Blitz+ from itch.io
and tried your example SpriteEditor 48x48
it is interesting ..it have preview...but don't have some sort of GRID
other examples i must say that i don't understand because i am not familiar with blitz.
thanks again ...i will try some more ;)
I would say a pixel editor can be done with max 50 lines of code.
you only have to read the pixels of a TImage and the draw bigger rectangles at a relative position
In BlitzMax a first step (only black/white) would look like:
' zoom pixmap
local PixMap:TPixMap=LockImage( MyImage)
For local x:int=0 to 31
For y:Int= 0 to 31
If PixMap.ReadPixel(x,y)<>0
Setcolor 255,255,255
Else
Setcolor 255,255,255
Endif
DrawRect x*10, y*10, 9 , 9
Next
Next
' mouse check and set pixel
local PixMap:TPixMap=LockImage( MyImage)
local mX=MouseX()/10
local mY=MouseY()/10
If PixMap.ReadPixel(x,y)<>0
PixMap.WritePixel(x,y),0
Else
PixMap.WritePixel(x,y), $FFFFFFFF
Endif