Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / line using sprite help needed.

Author
Message
haliop
User Banned
Posted: 18th Jul 2013 14:43
can someone please write a function for me?
i really need it but i dont know the right math , not a math guy :/

i want it like line(x,y,x1,y1,r,g,b,a) like the line function
but with a sprite so i could use Alpha values

cause its not aviable in the drawline command...

credit will be given.

tornado
19
Years of Service
User Offline
Joined: 21st Jul 2005
Location:
Posted: 18th Jul 2013 15:21 Edited at: 18th Jul 2013 15:55
can't promise it'll work (being a tier-2 affected person I can miss some syntax), so no credits are mandatory
Not tested also, but the idea should look like this:

initing global var for the line sprite


moving existing sprite in-game with calling function with someID as first argument


haliop
User Banned
Posted: 18th Jul 2013 19:31
haliop
User Banned
Posted: 18th Jul 2013 20:01
cool it works i had to change a few things but good enough.
i wonder if i can speed it up ...

Credits will be give man , thank you.

tornado
19
Years of Service
User Offline
Joined: 21st Jul 2005
Location:
Posted: 18th Jul 2013 20:06
Thanks
I think it works at maximum speed possible, as it passes straight values and has no deep calculations except square root math

haliop
User Banned
Posted: 18th Jul 2013 20:36
hell no i changed them to floats

i get about 100,000 per second

cool stuff man.
please send me your full name and whatever you want to be added into the credits section , email... , game or app you built link and you know... what ever describes you the best.

haliop
User Banned
Posted: 18th Jul 2013 20:38
my email : Nadav.Rosenberg787@gmail.com

haliop
User Banned
Posted: 18th Jul 2013 20:40
btw this surely shows that sprites are way faster then the drawLine command.. and with the use of Alpha ... so TGC... i think you should rebuild the line function as it is slower then sprites...

haliop
User Banned
Posted: 18th Jul 2013 21:05
ok finished teaking it

244,000 exact number of lines per second on 60 FPS on the pc , needs to be checked on the galaxy.

haliop
User Banned
Posted: 18th Jul 2013 21:07
i didnot noticed something and went up to 350,000 lines per second using this method on 60 FPS


i think i can go even higher but theres no need.

Impetus73
13
Years of Service
User Offline
Joined: 28th Aug 2011
Location: Volda, Norway
Posted: 18th Jul 2013 23:05
Here is something I made 2 years ago...



----------------
AGK programmer
Did Amiga / AMOS programming in the 90's.
tornado
19
Years of Service
User Offline
Joined: 21st Jul 2005
Location:
Posted: 19th Jul 2013 00:32
http://kirschapps.com is my main website for reference, I suggest hiding your email from public view, will keep it for future contacts

haliop
User Banned
haliop
User Banned
Posted: 19th Jul 2013 07:20
tornado i wonder if you can fetch a 3d object in scene and draw only its borders like what you showed..

haliop
User Banned
Posted: 19th Jul 2013 07:21
but i guess a shader will do it better

haliop
User Banned
Posted: 19th Jul 2013 07:31
ok this is about the fastest i got

im drawing with the command above

a line of with the width of 75 so each sprite is actually compared to 75 lines.

so in m last calculation

this number apears for sprites * width = number of lines per second:

13500000 lines running on 60 fps on my pc.



haliop
User Banned
Posted: 19th Jul 2013 08:13
wow i just tested it on my Android Device.. this method is not good for mobiles.. thats so bad,... damnit.

tornado
19
Years of Service
User Offline
Joined: 21st Jul 2005
Location:
Posted: 19th Jul 2013 08:45 Edited at: 19th Jul 2013 08:47
Quote: "13500000 lines running on 60 fps on my pc."

Wonder which mobile device could withstand it

PS AppGameKit engine is slow by nature on some devices

haliop
User Banned
Posted: 19th Jul 2013 09:26
im using a galaxy s4 i9500 which is one of the most powerful available right now..
but wait one year.

Intel Iris will move onto Mobiles
Nvidia Tegra will get to its 4 th 5th 6th gen
Apple Cpus will get better

as long as you tweak it right , AppGameKit speed dose not matter or any other engine.

ive only found AppGameKit or any of TGC products slow when using a high Poly objects... but for 2D its pretty damn fast.
and i have also worked out an Algo for Meshes for when they are far from you they are just plains with a texture of the 3D object
when they are mid way they are about half the polies and you hardly see any diffrence since they are far enough ... and when they are close they are full Polies... but again it still works pretty slow and its not AppGameKit it was on DGDK... but i guess
AGK v2 will be much faster then what we are used to now since that not only they will fix stuff the mobile devices a year from now will gain about x5 to x10 speed then what they are now...
its just how CPUs work , each year they are about x10 faster then the year before.

i cant wait for Intel Iris to ignite mobile devices.

haliop
User Banned
Posted: 19th Jul 2013 09:28
however when you talk about mobile devices the CPUs cant be super fast since it will drain the battery...

and with that said.. Apple has been working on a Fuel Cell to power their next Gen mobiles.. once its good and secure... you'll be able to use your phones for days/weeks/months/years

once they'll have it... all other mobiles will follow...
and you cant forget about Green Energy .. its just a matter of time until your mobile device will be powered by Sun/Movement etc..

haliop
User Banned
Posted: 19th Jul 2013 09:30
so all im saying , as i said before.. dont be afriad to build awesome apps/games with AppGameKit even if its a bit slow to your taste cause the mobile devices will get stronger in time.

and if youre working on a Triple A game then it will take you a few months atleast... so until the release the mobiles will be even better...

Login to post a reply

Server time is: 2024-11-24 18:33:31
Your offset time is: 2024-11-24 18:33:31