Oldstyle Grabimage?

Monkey Forums/Monkey Programming/Oldstyle Grabimage?

zoqfotpik(Posted 2014) [#1]
I'm interested in constructing graphics procedurally. Is there any way to write to a bitmap which we can then tile using drawrect or the like?


Jesse(Posted 2014) [#2]
not exactly the way Blitzmax does it but checkout:

CreateImage
(image).GrabImage
ReadPixels
(image).WritePixels.

see if that works for you.


zoqfotpik(Posted 2014) [#3]
Thank you, that's what I was looking for. I knew there was a way to do it.

Also now that I'm thinking of it, what did you use for the background for surviball?


Jesse(Posted 2014) [#4]
source is in there. Read the posts.


zoqfotpik(Posted 2014) [#5]
Thankee.


Jesse(Posted 2014) [#6]
I just went to trough the apps forum and learned that the posts are missing. (What!!!)

So here is the code if you are still interested:




zoqfotpik(Posted 2014) [#7]
Definitely interested :) I may use it for the background for a Gyruss clone.

How well does this run on tablets? Too processor intensive?

I am surprised actually that it didn't use OpenGL. It looks pretty good. Is this your engine or did you reverse engineer it from something else?

I certainly will be reverse engineering it.


Jesse(Posted 2014) [#8]
I used to hang out in the old DarkBit Factory forums years ago. Shockwave posted a somewhat similar code. I removed some stuff I didn't like, replaced others and made it into an object. it's pretty basic 3D In 2D kind of stuff, Uses sine waves and display as polygons, Nothing out of the ordinary.
I tried putting the game in an android phone 3 years ago but it was kind of slow with all of the activities going on in the game and the hardware of that time. It might be a bit better with current tablet and cell phone hardware. if I have some time I might give it a go on my wife's Asus tablet.


zoqfotpik(Posted 2014) [#9]
Ah yes, DBF. I think several other people from here are also there...

You might even be able to bake enough images at runtime to make a ~100 frame movie of the tunnel and display that in the background. Not sure how well that would work...


ordigdug(Posted 2014) [#10]
For reference here is the link to Surviball.... http://monkey-x.com/Community/posts.php?topic=7296&app_id=48