Author Topic: Pixelscape: online sprite and tilemap editor  (Read 31810 times)

0 Members and 1 Guest are viewing this topic.

Offline Stefan Bauwens

  • Creator of Myst 89 - סטיבן
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1799
  • Rating: +162/-24
  • 68k programmer
    • View Profile
    • Portfolio
Re: Pixelscape: online sprite and tilemap editor
« Reply #60 on: September 17, 2012, 11:08:45 am »
Update

You can now export your tilemap as an image! GIF, JPG, and PNG files are supported.

Mostly because I found myself constantly exporting as a Pic only to upload it to SourceCoder to get the GIF (which was black-and-white and too small for my taste).


Awesome. :) I'll keep that in mind.


Very proud Ticalc.org POTY winner (2011 68k) with Myst 89!
Very proud TI-Planet.org DBZ winner(2013)

Interview with me

Offline parserp

  • Hero Extraordinaire
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1455
  • Rating: +88/-7
  • The King Has Returned
    • View Profile
Re: Pixelscape: online sprite and tilemap editor
« Reply #61 on: September 17, 2012, 06:28:14 pm »
(or am I just stupid and this is already available?)
Nah, not just you. Pixelscape supports only 8x8 sprites.

I might consider extending it to support any size sprite between 2x2 and 16x16, but that will involve rewriting most of the code. (Rotation would also be significantly more complicated with odd-numbered dimensions :/)
I wasn't thinking about doing everything with rotations and stuff, just on the tilemap part it displays it so that the tiles are closer together. :)

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Pixelscape: online sprite and tilemap editor
« Reply #62 on: September 17, 2012, 07:05:26 pm »
Just realized I was being stupid. I could just ask users for the size of their sprites :P
I might consider extending it to support any size sprite between 2x2 and 16x16, but that will involve rewriting most of the code. (Rotation would also be significantly more complicated with odd-numbered dimensions :/)
The addition of variable sprite sizes would be an incredibly useful feature. Rotation wouldn't be any more difficult, either. Rotation of an n x n matrix is done the same way for both even and odd values of n. You wouldn't need to have separate routines or anything...
I "rotate" it by dividing it into four blocks and moving the blocks around :/ Got a better way to do it? It would probably be better if I just calculated the rotated sprite off of the sprite code rather than physically moving around the pixels.




Offline leafy

  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1554
  • Rating: +475/-97
  • Seizon senryakuuuu!
    • View Profile
    • keff.me
Re: Pixelscape: online sprite and tilemap editor
« Reply #63 on: September 17, 2012, 09:26:25 pm »
A bit of googling yielded http://stackoverflow.com/questions/6930667/what-is-the-fastest-way-to-rotate-the-bits-in-an-8x8-block-on-bits - The only way I know how to do it it using linear algebra, but maybe that could be of help? :P
In-progress: Graviter (...)

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Pixelscape: online sprite and tilemap editor
« Reply #64 on: September 17, 2012, 10:31:22 pm »
Thanks! Wasn't aware rotating a packed 8x8 block of bit data was a common problem :crazy:
« Last Edit: September 17, 2012, 10:31:31 pm by Deep Thought »




Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: Pixelscape: online sprite and tilemap editor
« Reply #65 on: September 18, 2012, 07:25:05 pm »
Where else than sprite/image editing would you use it? O.O

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline ZippyDee

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 729
  • Rating: +83/-8
  • Why not zoidberg?
    • View Profile
Re: Pixelscape: online sprite and tilemap editor
« Reply #66 on: September 19, 2012, 11:20:51 pm »
Just realized I was being stupid. I could just ask users for the size of their sprites :P
I might consider extending it to support any size sprite between 2x2 and 16x16, but that will involve rewriting most of the code. (Rotation would also be significantly more complicated with odd-numbered dimensions :/)
The addition of variable sprite sizes would be an incredibly useful feature. Rotation wouldn't be any more difficult, either. Rotation of an n x n matrix is done the same way for both even and odd values of n. You wouldn't need to have separate routines or anything...
I "rotate" it by dividing it into four blocks and moving the blocks around :/ Got a better way to do it? It would probably be better if I just calculated the rotated sprite off of the sprite code rather than physically moving around the pixels.

Matrix rotation is just a matter of nested For loops. It can be done really easily with an N x N matrix.
Code: [Select]
//clockwise
for (j = 0; j < N - 1; j++)
{
    for (i = 0; i < N - 1; i++)
    {
        newMatrix[j, N - 1 - i] = curMatrix[i, j];
    }
}

//counter-clockwise
for (j = 0; j < N - 1; j++)
{
    for (i = 0; i < N - 1; i++)
    {
        newMatrix[N - 1 - j, i] = curMatrix[i, j];
    }
}
« Last Edit: September 19, 2012, 11:22:39 pm by ZippyDee »
There's something about Tuesday...


Pushpins 'n' stuff...


Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Pixelscape: online sprite and tilemap editor
« Reply #67 on: September 20, 2012, 06:42:05 pm »
Oh, it's just that I was doing it in a way that would use only one matrix.




Offline ZippyDee

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 729
  • Rating: +83/-8
  • Why not zoidberg?
    • View Profile
Re: Pixelscape: online sprite and tilemap editor
« Reply #68 on: September 21, 2012, 02:53:18 am »
Is there any reason not to use a second matrix? It's not like it's THAT much to add a second matrix, especially if it's only 16x16 at most...
There's something about Tuesday...


Pushpins 'n' stuff...


Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Pixelscape: online sprite and tilemap editor
« Reply #69 on: September 30, 2012, 12:33:16 pm »
Update

No arbitrary-size sprites yet, but here's something new:



Yes, grayscale—finally. Use the drop-down to the right of the sprite hex code (the one that says "Four" in the screenshot) to switch between monochrome, 3-level grayscale, and 4-level grayscale modes.

Most of the code had to be rewritten for it to work, but everything should be working with the exception of copy-paste. I'll try to finish that bit up as soon as possible. (Exporting as a picture variable only does monochrome.) Please test! :D

NOTE: Because it supports grayscale now, Pixelscape imports and exports the data in a new format that is not compatible with the old one. The new format is the one that will be used by the next version of shmibs's tileIt! (which adds grayscale support too!).

For those of you who have spritesheets saved online, I've updated them to the new format.

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: Pixelscape: online sprite and tilemap editor
« Reply #70 on: September 30, 2012, 12:45:40 pm »
wow, awesome, greyscale support!
Greate work deep! :D

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline shmibs

  • しらす丼
  • Administrator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2132
  • Rating: +281/-3
  • try to be ok, ok?
    • View Profile
    • shmibbles.me
Re: Pixelscape: online sprite and tilemap editor
« Reply #71 on: September 30, 2012, 04:36:11 pm »
deep, switching to a tile is making its contents shift down out of the sprite.
i got tileIt to save and load sets properly now, so i tested a set from that as well, and it's not opening properly. here is the set in tileIt and the way it's opened in pixelscape:
« Last Edit: September 30, 2012, 04:41:39 pm by shmibs »

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Pixelscape: online sprite and tilemap editor
« Reply #72 on: September 30, 2012, 04:51:15 pm »
deep, switching to a tile is making its contents shift down out of the sprite.
What do you mean? Can't seem to find that bug, sorry :/ I created two sprites and switched back and forth using both the mouse and with keyboard controls, and they were fine.

I did find a bug with the shifting commands though. It's been fixed.
i got tileIt to save and load sets properly now, so i tested a set from that as well, and it's not opening properly. here is the set in tileIt and the way it's opened in pixelscape:
Can you send me the 8xvs you used? (And what's with the brownish tint in your screenshots O.O)
« Last Edit: October 01, 2012, 12:24:05 am by Deep Thought »




Offline shmibs

  • しらす丼
  • Administrator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2132
  • Rating: +281/-3
  • try to be ok, ok?
    • View Profile
    • shmibbles.me
Re: Pixelscape: online sprite and tilemap editor
« Reply #73 on: September 30, 2012, 04:54:32 pm »
the screenshot method i was using was selecting an area, and i have an overlay colour for selections, so it was recording that, too :P i fixed them already.
and here's the 8xv:
EDIT: and the current tileIt source. by the way, peoples, don't go using this just yet because there are still bugs and things.
DOUBLE EDIT: and here's a video of the shifting bug. it's only affecting the back buffer. i cleared my cache and things before recording.
« Last Edit: September 30, 2012, 05:03:50 pm by shmibs »

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Pixelscape: online sprite and tilemap editor
« Reply #74 on: September 30, 2012, 05:49:16 pm »
the screenshot method i was using was selecting an area, and i have an overlay colour for selections, so it was recording that, too :P i fixed them already.
That sounds like an awful screenshot program, if its own UI gets in the way of doing what it's supposed to do :P
and here's the 8xv:
Pixelscape seems to display it correctly, as far as I can tell ???
DOUBLE EDIT: and here's a video of the shifting bug. it's only affecting the back buffer. i cleared my cache and things before recording.
Bug fixed. (I miscounted something there x.x)

EDIT: All reported bugs (as far as I can see) have been fixed.
« Last Edit: October 01, 2012, 12:20:33 am by Deep Thought »