Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - graffix989

#1
and thats only on the caanoo?? interesting, ive heard of how many color bits the image is created in will affect transparancy findings.. however i would assume you already tried setting all images to ,like 8bit colors ?? maybe a coded C workaround might be in order :|
#2
could you make an array from said image and setpixel from that ? just ignore something you introduce to the array as "transparent"... i dont have a caanoo so dont know what your restrictions are? may be more taxing on your FPS but i dunno :) just a thought
not at my computer at the moment but code should roll on something like this:
assuming RGB(255,0,0) is your "transparent"

LOADSPRITE "blah.png",0
GETSPRITESIZE 0,sx,sy
SPRITE2MEM(image[],0)
for a = sx-1
for b = sy-1
if image[a+b*sx] > RGB(255,0,0) or image[a+b*sx] < RGB(255,0,0) then SETPIXEL sx,sy,image[a+b*sx]
NEXT
NEXT
#3
ive had simular problems with mem2sprite, used setpixel from array (for any changes)  then grabsprite as a workaround... my best guess is mem2sprite somehow fills the backbuffer with pixels that cannot be changed until cleared?? i also noticed mem2sprite has to be EXACTLY same size if replacing a current sprite... dunno, ive found a few quirks with GLBasic that all need their own workaround :) good luck
#4
"However neither a variable nor an absolute value visible rotates my sprite because the value is too small.  It could be you do something else to the value too..."


?? what are you talking about, rotosprite command with 0.8 for an angle will move the sprite... even 0.01 for that matter. You seemed to miss my last post where i solved this problem, thx for the input tho.?.?.?

i think you might be miscalculating your tangent formula, your result of -0.001705664322 is from your calculation error... tan(opp/adj)  is not the same as opp/adj = ans, tan(ans) that would give you -0.001705664322, whereas tan(opp/adj) give -1.705664332e-003

but  anyways my problem was the number of didgets the rotosprite responds too, it seemed to work fine with lets say 5.55 angle, but do it again with 5.555555555555555555555555555555555555555555555555555555555555555555555555555555555555555
and it will ignore the command (not fail, but ignore) which i assume is an error in the compiler from basic to C or whatever native language the compiler drives from
#5
 :booze: K so solved my own problem.. from what i could tell the large number was confusing the command ROTOSPRITE, and by large i mean the number of digets beyond the decimal. so my work around was as follows:
opposite# = 64.5
adjacent# = 660
result# = tan(opposite#/adjacent#)   // result# at this point 1.705664332e-003
temp$ = result#  // the string now reads 1.705664332e-003
temp$ = LEFT$(temp$,4)   // the string now reads 1.70
result# = temp$  // result# now reads 1.70

dunno why i didnt think of that before, but now divide by 2 and get my .85 then negate and use rotosprite with a -0.85 angle and my sprite is exactly where it needs to be... yay
I would assume there should be an easier way, and im like %90 sure that integer(result#) should give me 1.71 and drop all the rest, but it didn't... thanks for all that posted
#6
you used 54.5 not 64.5... but reguardless. now take your "result#" and use it with ROTOSPRITE. it will refuse the command?... atleast mine does... now try the rotosprite again just with manualy entering only the first 3 places of your result... ROTOSPRITE blah blah -1.44 and it will work.

so again if anyone can answer my question, it would be great :)
#7
"ive tried integer(), left$(), and converting from # to %"

integer() returns 1
left$() returns 1
converting # to % returns 1
:giveup:
#8
i need the half of the current angle in a negative form.

and it currently result# = -1.705xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
... dunno how u came up with that result?

so basicaly i need to know how to get the result from a tangent formula to only give me the result with 2 places past the decimal... or how to convert that long result to only -1.71
#9
so im having a problem with ROTOSPRITE. My goal here is as follows:

identify the image (sprite) as being at an angle, or not straight
using the Tangent formula to find the angle needed to straighten
use ROTOSPRITE command to straighten
GRABSPRITE to grab the new "straight" image

my problem lies within the math result, my goal for this particular image is -1.71 deg.
opposite# = 64.5  // length of side
adjacent# = 660  // length of side
tan(opposite#/adjacent#) = result#  // tan formula for angle
result# = result# - (result# * 2)  // negate the result so ROTOsprite rotates the correct way...

this makes result# = -1.705664332e-003
ROTOSPRITE doesnt seem to be able to make that request so it does nothing, is there a way to trim everything in result beyond the one thousants place? -1.71xxxxxxxxxx delete the x's??

ive tried integer(), left$(), and converting from # to %
#10
so i started working with eclipse sdk with andriod adk for a java sided approach to making an android app. after a few hours of drilling through some tutorials i found, i was able to do alot of simple things like make buttons and new activites, sounds, etc.. so i imported a program that GLBasic compiled for android just to see what it looked like in eclipse. So basicaly from what i found is glbasic initializes everything it could possible use or do for android, needed or not, then runs a generated code based on anything u did in GLbasic... in a single activity i might add. This is a HUGE waste and you dont get to use many of the convienent built in functions for android 4.2+ that make apps so streamlined. Eclipse opened my eyes to the use of "threads", which would highly optimize some of my exspensive maths, unheard of in GLBASIC. basicaly its like buying a 10ton dump truck with a 15' plow to remove the snow in your one car driveway, it can get the job done but you wasted alot in the process...

so to wrap this up, im going to make a seperate program, using eclipse, that takes the pictures needed and eithor sends them to my pc via wifi or sends them to a new "activity" (my glbsaic program) on the phone. learning how to work around GLBasic to custom tailor my needs for android seems counter productive. bottom line, you want something to work efficently on a android device, you need to have a basic java understanding and i HIGHLY recommend eclipse compiler. I'll probably never be as good in java as i am in basic, so im going to continue on Basic for anything pc related. just need a different approach when dealing with something smaller.

awsome tutorials for eclipse with andoird that i found, Mybringback.com. guy lays it out for you in plain english, doesn't stray from focus. I learned very quickly what was important and what i could just fudge to get by. :nana:
#11
good stuff, got years of programming in basic.... time to take the plunge into C++ i guess. easy workaround would be to program camera stuff in C, then do everything else in GL.... but i have a feeling that would be useless in the long run, unless GLbasic can run an external program then snap back...
#12
I a working on a project that basicaly analyses a picture. i would like to make this cross platform for android phones and eventualy iphones.
basic idea:
open the program on phone
this brings up camera shot veiw (just like when taking a picture), with a defined area (overlay square)
then take the picture
analyze
and report

what i do know is browse for a picture already taken and analyze it, but its time consuming and would like this to be streamlined.

so how exactly does one control the camera on an android based phone (galaxy 3, etc.) ?
is there an example somewhere that im missing? ive got the android SDK, but id rather not have to learn another language to acomplish this.... :glare: