ZEdit: the ultimate PCE dev tool

hu, cd, scd, acd, supergrafx discussions.
User avatar
Gravis
Kitten Blaster
Posts: 79
Joined: Sun Jun 22, 2008 3:52 pm
Location: Deadman Wonderland

Re: ZEdit: the utilmate PCE dev tool

Post by Gravis »

after working on a demo that works in the same manner in debugging i found that i was accidentally creating the buffers and texture _after_ drawing. from that i thought i would check when i was drawing in my editor and it turns out it was poorly placed. after fixing that, the framebuffer worked! there are still "minor" alignment issues but it's displaying and moving properly when it's resized. wonkiness solved! :D

Image
User avatar
Gravis
Kitten Blaster
Posts: 79
Joined: Sun Jun 22, 2008 3:52 pm
Location: Deadman Wonderland

Re: ZEdit: the utilmate PCE dev tool

Post by Gravis »

so very close. you can see the map is there, it's just not using the proper tiles. it's quite exciting. :mrgreen:

Image

i just realized it looks like the x and y coords for the tile location are fucked up. fixed later today? one can only dream. *sigh*
User avatar
Gravis
Kitten Blaster
Posts: 79
Joined: Sun Jun 22, 2008 3:52 pm
Location: Deadman Wonderland

Re: ZEdit: the utilmate PCE dev tool

Post by Gravis »

ok... so messing with coordinates sucks. i got the map ordering stuff working... kind of. there are pixel alignment issues and some other strange vertex sharing(?) issues. the solution isnt pretty at all compared to the demo i made it work on. :cry:

but here it is in all it's "looks like seven month ago" glory.

Image

i'll be glad if i can close the book on this opengl widget.
User avatar
Gravis
Kitten Blaster
Posts: 79
Joined: Sun Jun 22, 2008 3:52 pm
Location: Deadman Wonderland

Re: ZEdit: the utilmate PCE dev tool

Post by Gravis »

i fell through a time portal and ended up in 2013. anyway, i've finally be forced to learned Qt's own little graphics system and i have to say, it's really good! the previous pure opengl version was really slow and had big lag and this version has none at all. i can actually proceed onto functionality. anyway, no promises but i just might get this thing done. :)

Image
User avatar
Gravis
Kitten Blaster
Posts: 79
Joined: Sun Jun 22, 2008 3:52 pm
Location: Deadman Wonderland

Re: ZEdit: the utilmate PCE dev tool

Post by Gravis »

the long sought automagic tile updating has finally come to be! basically, if you edit a tile/sprite, everything using the tile automatically updates the image of the tile. best of all, it's speedy. as for editing a tile/sprite, i've made some preliminary progress with the tile/sprite editor. right now, you can select any color you want and start using it because the program automagically optimizes the palettes whenever a new color is added without any lag. also, what's nice is that the tile/sprite editor shares most of the code used for the map editor.

Image
Image
User avatar
MooZ
Site Admin
Posts: 407
Joined: Sun Jun 22, 2008 3:19 pm
Location: Lvl 3
Contact:

Re: ZEdit: the utilmate PCE dev tool

Post by MooZ »

Congrats and keep it up!
Any release date?
User avatar
Gravis
Kitten Blaster
Posts: 79
Joined: Sun Jun 22, 2008 3:52 pm
Location: Deadman Wonderland

Re: ZEdit: the utilmate PCE dev tool

Post by Gravis »

MooZ wrote:Congrats and keep it up!
Any release date?
umm... when it "goes"? ;)
i have to put back in the import/export functionality for it to really be useful.

as for keeping up the progress... the tile/sprite editor works great now but there are some minor bugs. making the automagic palettes work is what really matters.

Image

there are a some occasional minor but pesky color selection bugs but those should be ironed out soon enough.
User avatar
Gravis
Kitten Blaster
Posts: 79
Joined: Sun Jun 22, 2008 3:52 pm
Location: Deadman Wonderland

Re: ZEdit: the utilmate PCE dev tool

Post by Gravis »

i FINALLY got the most important feature of any editor working... undo/redo!
i figured i might as well make separate buffers for map editing and tile/sprite/palette editing as it's nifty.

while i could make buffers for each tile and sprite, i think that's a bit overkill. separating palette from sprite/tile editing is technically possible but not simple task due to the automagic palette optimization.

i also added a nifty feature, Global Palette which is good if you are doing drawing freeform and want reuse colors that are no longer in your palette (optimized out).

Image

this tile is a good example of usefulness of the automagic palette optimization. it shares some colors but not enough to use the same palette.
User avatar
Gravis
Kitten Blaster
Posts: 79
Joined: Sun Jun 22, 2008 3:52 pm
Location: Deadman Wonderland

Re: ZEdit: the utilmate PCE dev tool

Post by Gravis »

the unwieldiness of the color palette has bothered me for a while and i decided to take it on... again. i like the HSL colorspace display but previously couldnt find a way to generated it. anyway, found a nice page with code and got it working. the only problem is that in translating to RGB, only about half of the values i want were there. so i messed around with the current palette and folded it so that it's more compact. in addition, i modified how the 9 bit are converted to 24 bit so now they are more accurately representative. a little clean up and some features to come as shown in the pic below.

Image

so if anyone knows how to generate a 9 bit HSL colorspace with all the PCE colors, do tell!
User avatar
Gravis
Kitten Blaster
Posts: 79
Joined: Sun Jun 22, 2008 3:52 pm
Location: Deadman Wonderland

Re: ZEdit: the utilmate PCE dev tool

Post by Gravis »

well... i eventually came up with the bright idea of reading a normal image file (png image) of what i want (color array) and set the RGB value of each 24-bit pixel to it's closest 9-bit RGB value. it was much easier than lame ol' equations. that worked great but something interesting happened: no matter how many different RGB/HSL/HSV/HCW color palettes i tried, i always came up short by 216 colors. this is exactly like my own equation generated image, always 216 colors short! :o i've concluded that the single image colorspace layouts do not contain all the colors in the colorspace! i saw many different and interesting layout patterns but they all came up 216 colors short. i began to suspect that my color counting method was flawed so i tried it on a screenshot of my own colorspace and it found ever color it needed, so it's not an issue with my code.

i did a little gui reorganization and a completely redid the layout code so that it's MUCH cleaner and easier to understand. it looks mostly the same but i did a color "fine tuning" control that shows the currently selected color.

Image
Post Reply