Very Basic Graphics & User Open Source Graphics Flows

Post your feature requets for new triggers, conditions, actions and other improvements.

Moderator: Martin

Locked
User avatar
acerzw
Posts: 39
Joined: 10 May 2015 13:38

Very Basic Graphics & User Open Source Graphics Flows

Post by acerzw » 21 Jun 2015 00:01

Hi Martin,

If you could add a setPixel function to change a pixel in an image and perhaps a flow to create a blank image of user defined dimensions in memory with all the pixels set to a user defined colour then so much would be possible. For instance users could then work together on the forum to create an open-source standard set of basic flows for drawing primitive shapes and even basic 3D wireframes etc, plus using getPixel and setPixel together would make writing photo and image manipulation/filter effects, raytracing and user designed text drawing routines and basic games possible. Essentially you could write your own custom UI using such tools (something I have always wanted to do). The graphics flows could use a standard set of global variables for the parameters. By having a set of flows for graphics that users could download from the forum it would avoid the need to put the extra functions into automagic and save you and users time rewriting the wheel when they need graphics whilst dramatically increasing the capabilities of automagic. I once wrote a whole 2D/3D engine using just a setPixel function and would be happy to convert and contribute some of the routines as flows. Whilst some of this graphics stuff might sound over the top and possibly power and battery intensive, the technology is improving all the time and automagic works great on tablets, and eight cores are not uncommon now and their power consumption is not that high.

I am begging anyone who likes this idea to + 1 it, as by adding a couple of relatively simple functions it would make crazy cool stuff possible... (and solving the wallpaper scaling issue I am having would also be possible!)

With Kind Regards and fingers crossed... ;)

Rob

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Very Basic Graphics & User Open Source Graphics Flows

Post by Martin » 22 Jun 2015 20:07

Hi,

I fear that a script function like setPixel would be extremely slow in Automagic since it would have to be called hundred of thousands of times to render an image. Automagic was not designed to do something like that.
However, adding the function would be fairly simple so I'll probably add it anyway as a hidden/unofficial/undocumented function. But please don't blame me if your 3D shooter only gets 0.000001 FPS ;-)

Regards,
Martin

User avatar
acerzw
Posts: 39
Joined: 10 May 2015 13:38

Re: Very Basic Graphics & User Open Source Graphics Flows

Post by acerzw » 24 Jun 2015 17:21

Hi Martin,

Thanks, a hidden function would be great! I was able to run such routines on a Samsung S4 Mini phone (dual core) using the C4Droid C Compiler with the SDL plugin and it was totally playable. I am sure Automagic would be a bit slower being interpreted and not compiled, however if you add the function I will give it a go and write some flows and send them to you. Don`t know if there is a limit on the emergency stop, hopefully it can be set high enough.

Rob

Locked