View previous topic - View next topic |
Author |
Message |
DeveloperX 202192397
Joined: 04 May 2003 Posts: 1626 Location: Decatur, IL, USA
|
Posted: Mon May 18, 2009 11:23 pm Post subject: Online C-64 Sprite Editor |
[quote] |
|
I have developed another in-browser tool for the hardcore retro game developers out there like me. 8-)
Try it out now!
(requires JavaScript, and has only been tested in the Firefox3 browser under 64-bit Linux..try it and let me know how it works for you.)
I think that this will prove to be a useful utility for anyone who is going to give Commodore 64 sprite making a try.
I have plans to write some articles on sprites on the C-64, but right now that is not a top priority. There are still a few more things to write about first. :D _________________ Principal Software Architect
Rambling Indie Games, LLC
See my professional portfolio
Last edited by DeveloperX on Thu May 21, 2009 7:48 pm; edited 1 time in total
|
|
Back to top |
|
|
DeveloperX 202192397
Joined: 04 May 2003 Posts: 1626 Location: Decatur, IL, USA
|
|
Back to top |
|
|
tcaudilllg Dragonmaster
Joined: 20 Jun 2002 Posts: 1731 Location: Cedar Bluff, VA
|
Posted: Thu May 21, 2009 10:29 pm Post subject: |
[quote] |
|
You need to use a buffer for the line function.
This is a good tool. Reminds me of the Worldyne editor.
Can you add colors?
|
|
Back to top |
|
|
DeveloperX 202192397
Joined: 04 May 2003 Posts: 1626 Location: Decatur, IL, USA
|
Posted: Fri May 22, 2009 10:50 am Post subject: |
[quote] |
|
LordGalbalan wrote: | You need to use a buffer for the line function.
This is a good tool. Reminds me of the Worldyne editor.
Can you add colors? |
1. what do you mean a buffer for the line?
2. Ah Worldyne, our project that never got off the ground.
3. I'm thinking about "enabling" multi-color sprite mode. I need to do more research first. Its not an issue of adding the ability to draw in colors, its the fact that the Commodore 64 has very limited abilities.
This editor is for creating Commodore 64 sprites, not just any old sprites. _________________ Principal Software Architect
Rambling Indie Games, LLC
See my professional portfolio
|
|
Back to top |
|
|
tcaudilllg Dragonmaster
Joined: 20 Jun 2002 Posts: 1731 Location: Cedar Bluff, VA
|
Posted: Fri May 22, 2009 11:48 am Post subject: |
[quote] |
|
Yeah I know. I think it was able to do 4 colors, wasn't it?
By buffer, I mean simulate an off-screen buffer when drawing the line. When the user uses the line tool, make a copy of the table matrix. When the user presses down on the mouse button, store the value of the affected cell and draw the pixel to the table matrix. When the cursor moves to a different cell, redraw the pixels from the stored table cell and then redraw the rest of the line. In essence, you're keeping track of the space which is under the line, and the line itself. First redraw the space beneath when the line moves, and then redraw the line in its new position. This allows you to visually define the line without having to redraw the entire image.
Now I have a question for you: how did you do the PNG thing?
|
|
Back to top |
|
|
DeveloperX 202192397
Joined: 04 May 2003 Posts: 1626 Location: Decatur, IL, USA
|
Posted: Fri May 22, 2009 1:45 pm Post subject: |
[quote] |
|
LordGalbalan wrote: | Yeah I know. I think it was able to do 4 colors, wasn't it?
By buffer, I mean simulate an off-screen buffer when drawing the line. When the user uses the line tool, make a copy of the table matrix. When the user presses down on the mouse button, store the value of the affected cell and draw the pixel to the table matrix. When the cursor moves to a different cell, redraw the pixels from the stored table cell and then redraw the rest of the line. In essence, you're keeping track of the space which is under the line, and the line itself. First redraw the space beneath when the line moves, and then redraw the line in its new position. This allows you to visually define the line without having to redraw the entire image.
Now I have a question for you: how did you do the PNG thing? |
Yes, 4 colors.
Buffer idea: interesting, but no. You cannot drag to draw, and swapping out the table info is slow. I've got more ideas for the next version that will enable me to do rubber-banding for the lines, but that will take me more time to implement than I have right now.
I'm working on several projects concurrently.
The png exporter is a php script I wrote that takes a stream of data from the editor and rebuilds the image as a 2 bit image data buffer and then it renders the data buffer to an image and then serves the png by sending the proper headers. _________________ Principal Software Architect
Rambling Indie Games, LLC
See my professional portfolio
|
|
Back to top |
|
|
tcaudilllg Dragonmaster
Joined: 20 Jun 2002 Posts: 1731 Location: Cedar Bluff, VA
|
Posted: Fri May 22, 2009 7:57 pm Post subject: |
[quote] |
|
It wouldn't be a big deal for just a line full of pixels. You're right about the drag-draw thing. Instead, the user could click on the line, then click again to specify the line. You could use a setTimeout function (complicated, I know) to only draw the line at specific intervals, like 4 times a second.
Or you could use <canvas> and do it like BASIC.
Right I understand how you did the export script, but which PNG library did you use?
|
|
Back to top |
|
|
tcaudilllg Dragonmaster
Joined: 20 Jun 2002 Posts: 1731 Location: Cedar Bluff, VA
|
Posted: Tue May 26, 2009 11:33 pm Post subject: |
[quote] |
|
How do you avoid page refresh when submitting?
Here's that line idea:
(your code)
change:
Code: |
function plot_single_pixel(px, py)
{
cellObj = getObj('cell' + (px + (py * 24)));
if (cellObj)
{
cellObj.style.backgroundColor = 'black';
spriteMemory[px+py*24] = 1;
}
}
|
to:
Code: |
function plot_single_pixel(px, py)
{
offset = px + (py * 24);
cellObj = getObj('cell' + offset);
if (cellObj)
{
spriteMemoryBuffer[offset] = spriteMemory[offset];
cellObj.style.backgroundColor = 'black';
spriteMemory[offset] = 1;
}
}
|
You can also use this as an undo buffer.
|
|
Back to top |
|
|
DeveloperX 202192397
Joined: 04 May 2003 Posts: 1626 Location: Decatur, IL, USA
|
Posted: Fri May 29, 2009 5:02 pm Post subject: |
[quote] |
|
LordGalbalan wrote: | How do you avoid page refresh when submitting?
|
I don't avoid page refresh.
But the way to avoid page refresh is to use the AJAX technique via xmlhttprequests or whatever the hell its called. It slips my memory atm. (I never toyed much with AJAX yet.) _________________ Principal Software Architect
Rambling Indie Games, LLC
See my professional portfolio
|
|
Back to top |
|
|
tcaudilllg Dragonmaster
Joined: 20 Jun 2002 Posts: 1731 Location: Cedar Bluff, VA
|
Posted: Fri May 29, 2009 5:24 pm Post subject: |
[quote] |
|
I don't mean that. I'm referring to how your app gives me the PNG file "on the spot": I'm not taken to another page despite the form being submitted. How do you keep the page from turning?
|
|
Back to top |
|
|
DeveloperX 202192397
Joined: 04 May 2003 Posts: 1626 Location: Decatur, IL, USA
|
Posted: Sat May 30, 2009 2:50 am Post subject: |
[quote] |
|
LordGalbalan wrote: | I don't mean that. I'm referring to how your app gives me the PNG file "on the spot": I'm not taken to another page despite the form being submitted. How do you keep the page from turning? |
I issue the proper http headers for serving an attachment to the browser.
for instance for the Save Data feature:
Code: |
header ('Content-type: text/plain');
header('Content-Disposition: attachment;filename="your-name-c64se-code.txt"');
|
_________________ Principal Software Architect
Rambling Indie Games, LLC
See my professional portfolio
|
|
Back to top |
|
|
tcaudilllg Dragonmaster
Joined: 20 Jun 2002 Posts: 1731 Location: Cedar Bluff, VA
|
Posted: Sat May 30, 2009 4:12 am Post subject: |
[quote] |
|
I see... thanks for that.
|
|
Back to top |
|
|
Nodtveidt Demon Hunter
Joined: 11 Nov 2002 Posts: 786 Location: Camuy, PR
|
|
Back to top |
|
|
DeveloperX 202192397
Joined: 04 May 2003 Posts: 1626 Location: Decatur, IL, USA
|
|
Back to top |
|
|
tcaudilllg Dragonmaster
Joined: 20 Jun 2002 Posts: 1731 Location: Cedar Bluff, VA
|
Posted: Tue Jun 30, 2009 10:03 pm Post subject: |
[quote] |
|
I became acquainted with the C-64 laptop recently. I like the colors. There are also some really good. This app would be great if it had 1) layers 2) 16 colors, with the ability to choose the colors used. Resize would also be nice.
I think you could get some revenue if you put ads on that page. I'll look up a good advertising service for you.
|
|
Back to top |
|
|