|
Post by johnno56 on Jul 27, 2022 15:15:54 GMT -6
Here are two modified routines to draw lines and circles. "So what?", you may rightly ask, "RC already has line and circle routines".
These two routines are slightly modified algorithms created by 'Bresenham'... Again, "So what?"
These routines would be useful in, let us say, a sprite editor that cannot use the 'standard' circle and line commands when drawing on the main grid.... I do not have any idea, at the moment, on how to implement these routines... But, in any case, I figured that they may be handy to add to ones "toolbox"...
J
ps: I am hoping that a modified "line" routine (wip) can draw a line between two mouse clicks... Oooh... Breakout the popcorn for 'this' one.... Moo Ha Ha...
|
|
|
Post by johnno56 on Jul 27, 2022 15:38:34 GMT -6
Ok. Done.
Here is the modified line drawing routine.
Instructions:
Left mouse click - to set the start of the line. Right mouse click - to set the end of the line. (short delay then ends)
Absolutely jaw dropping entertainment - not... lol You may be able to see how useful this might be in a sprite editor, right?
Well... That is the extent of my brain-strain for this morning... Time for breakfast and a 2nd cup of coffee...
|
|
|
Post by n00b on Jul 30, 2022 22:06:09 GMT -6
I tried them out. They work pretty well.
Are you planning on working on your sprite editor again?
|
|
|
Post by johnno56 on Jul 30, 2022 22:43:26 GMT -6
That was one of the reasons that I started looking for routines... It seems a bit lame to just be able to just draw dots... That is basically all that is needed if one is creating 8 bit sprites, but me personally, I like my sprites with more colour and definition. I have a line drawing routine already coded in the editor but it is incomplete. This Bresenhame line algorithm could do the trick. But after much testing there seems to be an occurrence of a "random feature"... But I have found a better version. The circle routine is just that. A circle. I would prefer a routine that can both draw the circle with the option to fill. I have a non-trigonometry fill circle routine. But that is all it does. I do not think they can be combined... But yeah... It might be a good idea to "dust off" the old editor again... lol
|
|
|
Post by johnno56 on Jul 31, 2022 0:17:26 GMT -6
... I have a sinking feeling that the latest version of my Editor was lost in the last hard drive crash... I still have an earlier version but it is nowhere near as complete as the one I may have lost... and before you ask... yes, a backup was made... it was the backup drive that failed... It looks like the line routine is going to take a little longer to test... I do not know if I have 'that' much coffee... Oh well. One day at a time... *sigh*
|
|
|
Post by n00b on Jul 31, 2022 10:14:35 GMT -6
|
|
|
Post by johnno56 on Jul 31, 2022 12:55:25 GMT -6
Thank you... But... that is the 'incomplete' version that I found... What I did find though... was a version I had made, for a language that shall not be named, that I can use in an attempt to recreate my RC version... I also found several 'early' versions... One of them had the option to change the grid size between 8 and 32... Main grid only... did not get around to modifying the preview grids... anyway... I will start converting the editor back to RC... This will not be quick... I have lost count of how many times I have 'restarted' this project... *sigh*
With this recreation, I will attempt to use the "include" command, to reduce the "clutter / length" of the editor... I think I will set the max. sprite size to 32... maybe... maybe not... Best get the thing working first... lol
Fingers crossed....
|
|
|
Post by n00b on Jul 31, 2022 14:36:00 GMT -6
It would probably be a good idea to start a repo for it on github. I used to back up my code by saving it to external usb or emailing it to myself but github has made that completely unnecessary anymore.
|
|
|
Post by johnno56 on Jul 31, 2022 15:28:52 GMT -6
Github? Ok. I will check it out... I also use Dropbox... which is one area I did not check... I will get back to you... Thank you.
|
|
|
Post by johnno56 on Jul 31, 2022 15:32:23 GMT -6
Nah... False alarm. I thought I may have saved a copy... O well. Github you say...
|
|
|
Post by n00b on Jul 31, 2022 17:48:44 GMT -6
Nah... False alarm. I thought I may have saved a copy... O well. Github you say... Github is a great way of keeping track of your source code and it tracks every change you have made. You can look at changes you have made over several years. Its also makes it easier for other people to find your code so your code could end up helping somebody else out.
|
|
|
Post by johnno56 on Aug 1, 2022 1:29:13 GMT -6
Ok. Github account is created... Woo Hoo!! Repository started. Contains only a README file at the moment... But it is there...
This Github thing is kind of public, right? That means anyone can see the work being done? Even the many mistakes? *sigh* Best to try not to make any, hey... lol
One thing that disturbs me... as a Linux user... Github's parent company is Micro$oft... Is there 'any' pie that they do not have their finger in? *sigh*
|
|
|
Post by n00b on Aug 1, 2022 11:31:30 GMT -6
Microsoft bought Github back in 2018 for 7 billion dollars. It sucks that they own github but it doesn't effect us. You still own all rights to your code and you can license it however you want. I usually just use the zlib license which allows anybody to do whatever they want with my code.
|
|
|
Post by aurel on Aug 1, 2022 12:59:01 GMT -6
MS/github ..ahh code well as far as i invesigated and i re-search a lot of things from most of code is not completed or is demo or is full of bugs
|
|
|
Post by johnno56 on Aug 1, 2022 13:01:20 GMT -6
Cool... Now all I have to do is post an editor that actually works... lol
At the moment, until I figure out what is what, I have no licencing... I will take a look at 'zlib'. Licencing eh? Do you think that anyone would suspect that I may be encrypting 'trade secrets' or the like? lol
I have found another copy of the Editor, that is more or less up-to-date, and will begin the conversion back to RCB... There are times that I almost regret being able to convert... almost... but not today... lol
|
|