Page 1 of 1
Wow Image object !!
Posted: Wed Apr 03, 2024 1:37 pm
by udi
Hello all.
I'm working on LiveCode Image object.
It's Break Bricks Game stack.
It has minimum graphic library on card script to manipulate raw image data.
Initial version..
http://udimac.web.fc2.com/temp/lcBlock02.livecode
It became like a game..
http://udimac.web.fc2.com/temp/lcBlock04.livecode
And now it's quite fulfilling.
http://udimac.web.fc2.com/livecode/lcBlock090.livecode
Enjoy 80's taste !
Thanks all and sorry to my poor English.
UDI
http://udimac.web.fc2.com/livecode/withLivecode.html
Re: Wow Image object !!
Posted: Mon Apr 08, 2024 3:19 am
by bryonenger
Wow! It is amazing. Thanks for sharing it
Re: Wow Image object !!
Posted: Mon Apr 08, 2024 9:09 am
by udi
Hi, bryonenger
Thanks for your reply
I'm still continuing to improve this library.
My brain is boiling.. ha ha
It has speed issues on my old PPC Mac.
To be honest, I doubt it's practical. But I'm enjoying it.
Thanks all and sorry to my poor English.
UDI
http://udimac.web.fc2.com/livecode/withLivecode.html
Re: Wow Image object !!
Posted: Mon Apr 08, 2024 3:45 pm
by stam
Hi Udi,
really nice effort.
I'm not sure the performance issues are due to your PowerPC though - I experience latency on an M2 Pro as well.
This may be to do with the how the game loop is constructed (you seem to call moveBall twice before moveRacket and then twice more, every loop), which gives the racket a slightly unresponsive feeling.
Also - the 'exit to hypercard' statement is a bit of a giveaway lol
Loops are not great in LC and there may be code optimisations that could be done.
However I gotta hand it to you, it's straight out of the 80s... Nice

Re: Wow Image object !!
Posted: Tue Apr 09, 2024 5:36 am
by udi
Hi stam,
Thanks for your message.
I am aware that the loop structure is not smart.
This is the result of adjusting the movement of the ball and racket on my old Mac.
And it's intentionally so that the racket lags behind the cursor - to make the game more difficult.
It could have been more simple and more smart if it only targeted modern machines.
And, then, ah.. as I focused on enriching my library, it became a chore to make games properly :-p
Thank you for reading my source carefully.
it's my encouragement.
Thanks all and sorry to my poor English.
UDI
http://udimac.web.fc2.com/livecode/withLivecode.html
Re: Wow Image object !!
Posted: Mon Apr 15, 2024 2:02 am
by udi
I made it a little more colorful with some small changes, but game's still 80's

It no longer runs smoothly on my PPC Mac and old Celeron machines.
http://udimac.web.fc2.com/livecode/lcBlock091.livecode
In this system, the larger the screen, the greater the CPU load.
It's not suitable for handling large graphics. ( LCB may have that potential )
I'm still going to enjoy this work for a while.
I wish I could use this system to make something else...
Thanks all and sorry to my poor English.
UDI
http://udimac.web.fc2.com/livecode/withLivecode.html
Re: Wow Image object !!
Posted: Sat Sep 14, 2024 3:42 am
by Hutchboy
Hi,
The Minimum Drawing Library is interesting and I have been exploring similar ways to manipulate image data. Since UDI posted this library as public domain at version 0.91 I have taken the liberty to generate a version 0.92 which is contained in the stack script of the attached Minimum Drawing Library Demo. I have also created a User Manual for the library.
In this version 0.92 I added debugging features and reworked some of the code, in particular the visual graphic effects.
Happy coding!,
Mike
Re: Wow Image object !!
Posted: Sun Sep 15, 2024 9:08 pm
by bn
Thanks Udi and Mike for this very elaborate library. It is very thorough and powerful.
It is truly outstanding.
Also thanks for the documentation.
Some short remarks: byte 1 of the four bytes that make up a point is supposed to be the alpha value. In my experience you have to set it but it has no effect when building imageData. In other words it can be any value. Transparency is apparently only controlled by maskData or alphaData. There you need of course the alphaData.
The gist of this: you can set it to a constant or global preloaded with the binary value of 255 regardles of the value of A in ARGB when working with imageData.
LC changed the paintCompression from "rle" to "png" in the IDE as default. When you set the paintcompression to "rle" in the IDE then paint operations are a tad faster.
Kind regards
Bernd
Re: Wow Image object !!
Posted: Sun Sep 15, 2024 11:57 pm
by Hutchboy
Hi,
Thanks for the feedback on the library, I was looking to see if I could use the alpha channel in some manner. I think next steps for my efforts on the library is to look for optimizations and also to work on text display...right now the text seems to be shifted from where it's location in the image ought to be. I probably need some code to measure a "bounding rect" for each string generated and use that center point and offsets to draw the text.
I am leaving the debug code and debug output field in my demos for now, since I thought some of you would be interested. At some point I will get rid of the debug code and put a stable library into its own stack so it can be called with "start using".
Attached is another demo containing mathematical visualizations of various functions (described in some detail in the card script). One of the random functions takes a bit of time to calculate and I do say "Calculating..." in the debug outfield, so give it a second or two if nothing seems to be happening. Happy Coding! - Mike
Re: Wow Image object !!
Posted: Mon Sep 16, 2024 5:56 am
by udi
Hello Mike.
Thanks for the beautiful demo and the useful debugging tools. This is great work. I was very impressed. And the lack of manuals was my concern. I want to thank you to the max.
Hello Bernd.
You are correct, the imageData sequence should be ARGB, and I believe the description of RGBA in Mike's manual is incorrect.
3.3 Color Representation
Colors in the MDL can be specified in several formats: -RGB
-RGB: “255,255,255” (white)
-RGBA: “255,255,255,128” (semi-transparent white) <<<<
-Hexadecimal: “#FFFFFFFF” (white
However, I have never used alpha channel. Perhaps this library lacks the ability to manipulate the alpha channel at all.
Thanks all and sorry to my poor English.
UDI
http://udimac.web.fc2.com/livecode/withLivecode.html
Translated with DeepL.com (free version)
Re: Wow Image object !!
Posted: Mon Sep 16, 2024 3:05 pm
by Hutchboy
Hi,
Udi, discovering your library within your breakout game was an eye opener. You did remarkable work putting this together and I just wanted to put in my 2 cents to help get your library more widely used in the LiveCode community. I hope you are able to use the debugging stuff to your advantage.
Best wishes!
Mike
PS when I update the manual I’ll see if I can create a version in Japanese
Re: Wow Image object !!
Posted: Mon Sep 16, 2024 8:27 pm
by Hutchboy
Hi again,
Here is the full translation of the LiveCode Minimum Drawing Library User Manual into Japanese. The translation covers all ten chapters, including the introduction, getting started guide, core concepts, main functions, drawing tools, color management, text and number rendering, visual effects, utility functions, and debugging techniques. The translation aims to maintain the technical accuracy of the original while presenting the information in a way that's natural and understandable to Japanese speakers. Code examples and function names have been left in English, as these are typically not translated in programming contexts.
I saved it in Mark Down format to preserve formatting. I use "Highland 2" as my mark down editor but text editors like Visual Studio Code, Atom, or Sublime Text have built-in Markdown preview functionality. Online Markdown editors like StackEdit or Dillinger can also be used to view the formatted content. If you want to convert to .txt or .rtf format you can use TextEdit.
Mike
PS. I make no guarantees on the quality of the Japanese...I staffed the task out to my minions ;)
Re: Wow Image object !!
Posted: Tue Sep 17, 2024 8:33 am
by udi
Hi Mike
Wow, wow, wow!
I am amazed that you understood everything about MDL from that simple explanation I wrote. Especially the chapter on Core Concepts is important. I really appreciate it.
Your Japanese is also excellent and very easy to understand. It is perfect.
I don't have time to make samples using this library. One idea would be interesting, such as a logo in motion. Just a combination of effects can be effective.
Oh, I want minions too ...
UDI