Author Topic: Sprite Editor question(s)  (Read 7710 times)

0 Members and 1 Guest are viewing this topic.

Offline johnno56

  • Forum Resident
  • Posts: 1270
  • Live long and prosper.
    • View Profile
Re: Sprite Editor question(s)
« Reply #15 on: September 07, 2020, 12:14:14 am »
Waa... Circles and lines? Tell me you can remember how? Hmm..
Logic is the beginning of wisdom.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Sprite Editor question(s)
« Reply #16 on: September 07, 2020, 01:17:55 am »
Waa... Circles and lines? Tell me you can remember how? Hmm..

I can figure out how again. Close enough? Lines turned out to be tricky, you had to spread out the jumps evenly over the length of line. I could do paint fills like for Ken's paint program. We could even try aliasing.
« Last Edit: September 07, 2020, 01:19:58 am by bplus »

Offline johnno56

  • Forum Resident
  • Posts: 1270
  • Live long and prosper.
    • View Profile
Re: Sprite Editor question(s)
« Reply #17 on: September 07, 2020, 03:54:59 am »
I wish that I could have held onto those earlier versions... Combination of lack of foresight, system crashes and hard drive deaths...
I still have only one copy of version 2.3 from about 2016... It looks horrible, compared to the current version, but it may hold some clues to resolutions etc... I'm thinking of including all 4 resolutions (8,16,32 and 64)... but... not without caffeine... Moo Ha Ha....
Logic is the beginning of wisdom.

Offline johnno56

  • Forum Resident
  • Posts: 1270
  • Live long and prosper.
    • View Profile
Re: Sprite Editor question(s)
« Reply #18 on: September 07, 2020, 04:21:43 am »
Just remembered that my early versions were using sdlbasic... I actually found the very first version... 16x16, New, Load and Quit (Save not working) using 16 colours... Man, that version put the "ug" in ugly... Also found an 8x8 version (made after the 16x16)
Logic is the beginning of wisdom.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Sprite Editor question(s)
« Reply #19 on: September 07, 2020, 04:52:06 am »
Just remembered that my early versions were using sdlbasic... I actually found the very first version... 16x16, New, Load and Quit (Save not working) using 16 colours... Man, that version put the "ug" in ugly... Also found an 8x8 version (made after the 16x16)

Did some digging myself, June 28, 2015 code for what I called GE for Graphics Editor v1.0, complete with drawLine and drawCircle:

Do you think it would still work?
« Last Edit: September 07, 2020, 04:58:20 am by bplus »

Offline johnno56

  • Forum Resident
  • Posts: 1270
  • Live long and prosper.
    • View Profile
Re: Sprite Editor question(s)
« Reply #20 on: September 07, 2020, 06:22:53 am »
I will attempt to convert it to QB64... Cool.
Logic is the beginning of wisdom.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Sprite Editor question(s)
« Reply #21 on: September 07, 2020, 01:08:15 pm »
I will attempt to convert it to QB64... Cool.

Yes, I am particularly curious comparing draw line (with pixel/boxes) to other line drawing methods I've come up with since this 5 year old code. Man 5 years! actually 6 this September 14th, since I started up with Basics again.

@johnno56
Do you have a best QB64 version to post in Programs Board so we can start developing a work in progress or would you like to work this out yourself? Of course, would like confirmation that the GetLists method does work in Linux to get a list of files and directories. Probably have to build a File Dialog.

Update: well I couldn't wait! I bumped the old project with some mods to your v03:
https://www.qb64.org/forum/index.php?topic=313.msg122523#msg122523

Looks like we are ready to test a saveImage bi and massive bm addition to the code. I can put that together with my recent practice session fresh in mind.
« Last Edit: September 07, 2020, 04:51:38 pm by bplus »

Offline TempodiBasic

  • Forum Resident
  • Posts: 1792
    • View Profile
Re: Sprite Editor question(s)
« Reply #22 on: September 07, 2020, 06:36:19 pm »
@johnno56

1. in Windows10 it runs ok. No path adjustment required

2. Fine sound feedback on clicking on buttons....

3. No criticism, yes definition of goals to know if you are in the right direction or not while you're working on your SpriteEditor
Quote
I find your project very interesting, I have always thought that a Sprite editor and an Image editor written in QB64 were cool to demonstrate the power of the language, also if you can use different free tool very powerful like Gimp, Allegro Sprite Editor, Icoxp, Piskel, Krita, Slate, Pixiliart, GrafX2.

4. for now your goal is to manage sprites with dimensions ranging from 8X8 to 64X64...
 other my questions to know more about your project (ignore them if you're busy)

  -will it manage also rectangulare sprite (for example 8x4, 16x8, 32x64)?     
  - Or a sprite with very costumable dimensions?
  - also as spritesheet?
  -how many colors do you like to manage in the sprite editor?

  -do you think that MsPaint is a good tool for sprite creation?
  https://images.sftcdn.net/images/t_app-cover-l,f_auto/p/ad1de8c1-a23d-4e96-9b21-0ce5aec78b2d/3911303564/ms-paint-screenshot.png

 a personal version of MsPaint that let save sprite image both as file image of inner Qbasic format by BSAVE/BLOAD, both as file image jpeg/png by Steve's image library, both as block of DATA value to insert in source code it would be very cool!

Thanks to talk of your project.
Programming isn't difficult, only it's  consuming time and coffee

Offline johnno56

  • Forum Resident
  • Posts: 1270
  • Live long and prosper.
    • View Profile
Re: Sprite Editor question(s)
« Reply #23 on: September 07, 2020, 07:58:24 pm »
Wow. That's a lot of feedback, thank you.  ... and no, I'm not too busy... lol

At the moment, my intention is to keep the sprites 'square'. I'm still trying to figure out how to code for 8x8, 16x16 and 32x32. As I was planning on simple square sprites, rectangular or other shapes, wasn't even thought of... Most of the larger editors can define the size of the image when "New" is selected. Unfortunately, my current skill level, cannot reproduce that function. I'm not saying that it cannot be done... I'm saying that it cannot be done by "me"... *sigh*

Oh boy. Sprite-sheets... I have always wanted to be able to create and or separate sprites from a sprite-sheet. At the moment I use Gimp to extract sprites. I have no idea as to how to do that with QB64 (or any other basic)...

How many colours? Oh man, that is such a loaded question. If you are creating 'old school' games that use 8x8 or 16x16 then use a simple collection of colours. Have a close look at Mario. Usually between 3 to 6 colours were enough for Mario. 32x32 plus sprites obviously can contain more colours. My editor has only 117 colours. But not all of them are used. Selecting a palette of colours (just like an artist) is the most important thing to consider when using colour. It's not how "many" it's more about how the colours are "used". For example, Let's say that you use 20 colours to make level one of a game, be consistent, use the same colours for the other levels. Too much variation can be a distraction.... That being said... Standard RGB will number 16,777,216 colours...

Is MSPaint a good tool for sprite creation? I am a Linux user and have not used mspaint for more than 15 years. There are 'many' choices out there for graphics editing... From the simple (like mspaint) all the way up to Photoshop and beyond. All of those editors are good tools. The question might be better: Which editor is good for "you"? My suggestion: Start small. Not sprite size but complexity of the editor. If you are comfortable using mspaint, then stick with it. Piskel is a free online editor. There are many to choose from. Here is a 10 minute youtube that will cover free and non-free editors. I hope this helps.


These are only a few but it should give you a good place to start...

Saving and loading images to and from my program is still an ongoing issue. There are people, smarter than I, who are assisting with the problem...

I hope I haven't confused you... I tend to "waffle" on like that if I haven't had my coffee... NO! It's almost 10am and no coffee!!
Logic is the beginning of wisdom.

Offline TempodiBasic

  • Forum Resident
  • Posts: 1792
    • View Profile
Re: Sprite Editor question(s)
« Reply #24 on: September 14, 2020, 05:08:46 pm »
Well
it seems that you are developing with more details your goal and so your project.
With no clear ideas I think that noone can make a good program.
I'll wait your development. in the while if you like to talk about some aspects to have a mirror to reflect and choose your goal I think this community is the good place to do it.
Programming isn't difficult, only it's  consuming time and coffee

Offline johnno56

  • Forum Resident
  • Posts: 1270
  • Live long and prosper.
    • View Profile
Re: Sprite Editor question(s)
« Reply #25 on: September 16, 2020, 05:51:19 pm »
I had to erase my response because I read your comment the wrong way... My response was not very kind. My apologies.
« Last Edit: September 16, 2020, 06:51:13 pm by johnno56 »
Logic is the beginning of wisdom.

Offline TempodiBasic

  • Forum Resident
  • Posts: 1792
    • View Profile
Re: Sprite Editor question(s)
« Reply #26 on: September 16, 2020, 06:46:24 pm »
@johnno56

Hi

1.
it seems that it is raised up an issue using a bad translation of my native ideas into foreign language.
the affirmation
Quote
With no clear ideas I think that noone can make a good program.
  comes out from this kind of knowledge and it is not a product of my mind http://aroma.vn/web/wp-content/uploads/2016/11/code-complete-2nd-edition-v413hav.pdf see Chapter 3  titled
Quote
Chapter 3
Measure Twice, Cut Once:
Upstream Prerequisites
as you can read there you can see how much work is done before to type a single character of source code!
So I have said you that you're facing all these kind of issues to transform your idea into a real program . To solve these issues often you must define and observe (also talking with other persons ) your idea from many different points of view.

2.
about
Quote
How can I plan a project that I have never done before?!?!
  I think that an human ability very widespread is imagination. A man can imagine something, then he can specify how that something can be, interact and act. Subsequentially he can specify what to do to get that something or what he needs to know to go on with his specific idea. We can call this process creativity.

3.
I apology with anyone has understood what johnno56 has understood reading this sentence
Quote
With no clear ideas I think that noone can make a good program.
also if my message is quite far from his conclusions.

4.
Quote
You really know how to suck the joy right out of programming
, sorry if I miss a bit your message, my english ability is not so good to understand the level of irony of this sentence, nevertheless I say you Good Coding and Happy Life
Programming isn't difficult, only it's  consuming time and coffee

Offline johnno56

  • Forum Resident
  • Posts: 1270
  • Live long and prosper.
    • View Profile
Re: Sprite Editor question(s)
« Reply #27 on: September 16, 2020, 07:04:31 pm »
Again. My apologies. I was erasing my post at the same time you were replying. When you said that "With no clear ideas I think that noone can make a good program", I assumed that, you meant all of us on the forum... My wife pointed out that your statement was "general"... Meaning that, unless a programmer has a clear Idea of how to program, the resulting program will not be good. It was my fault for assuming the worst... My responses were not very kind and I spoke before putting my brain into gear...
Logic is the beginning of wisdom.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Sprite Editor question(s)
« Reply #28 on: September 16, 2020, 07:34:05 pm »
This is good from your dialogue

Quote
How can I plan a project that I have never done before?!?!

Quote
  I think that an human ability very widespread is imagination. A man can imagine something, then he can specify how that something can be, interact and act. Subsequentially he can specify what to do to get that something or what he needs to know to go on with his specific idea. We can call this process creativity.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Sprite Editor question(s)
« Reply #29 on: September 16, 2020, 07:49:34 pm »
But when I started this project up again it was immediately obvious after loading an image into the grid that you would want a tool to get a color from the image to use in the other cells, no pre-planning nor imagination needed.

Turns out that is very common tool with eyedropper image.

Form follows function?
« Last Edit: September 16, 2020, 07:50:43 pm by bplus »