Graal Forums  

Go Back   Graal Forums > Graal V6 forums > Bug Report
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Rating: Thread Rating: 13 votes, 4.69 average. Display Modes
  #856  
Old 01-22-2011, 07:48 PM
Tigairius Tigairius is offline
The Cat
Tigairius's Avatar
Join Date: Jan 2007
Location: Missouri, USA
Posts: 4,240
Tigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant future
Stefan did that on purpose for efficiency. On kingdoms iphone we have to create a new object each time we want new text basically. After about 30 objects or so, modulus back to 0.
__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote
  #857  
Old 01-22-2011, 08:24 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by Tigairius View Post
Stefan did that on purpose for efficiency. On kingdoms iphone we have to create a new object each time we want new text basically. After about 30 objects or so, modulus back to 0.
I know he did. The behavior should be optional, though. I also asked him personally about it, and he replied that it shouldn't even do that with text particles or something like that. He also said I should try two particle types and setting both vars the same, for that would eliminate his optimization, but that didn't work either.
__________________
Reply With Quote
  #858  
Old 01-26-2011, 12:08 AM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
Ok next version will have emitter.particle.uniqueparticle = true/false, will be released this weekend or so.
Reply With Quote
  #859  
Old 01-26-2011, 06:03 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by Stefan View Post
Ok next version will have emitter.particle.uniqueparticle = true/false, will be released this weekend or so.
Thank you <3
__________________
Reply With Quote
  #860  
Old 01-26-2011, 06:44 PM
Fulg0reSama Fulg0reSama is offline
Extrinsical Anomaly
Fulg0reSama's Avatar
Join Date: Sep 2009
Location: Ohio
Posts: 3,049
Fulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant future
Quote:
Originally Posted by Stefan View Post
Ok next version will have emitter.particle.uniqueparticle = true/false, will be released this weekend or so.
I got a friend to tell bout this.
__________________

Careful, thoughts and opinions here scare people.
Reply With Quote
  #861  
Old 01-26-2011, 10:48 PM
Geno Geno is offline
Prinking Droblem
Geno's Avatar
Join Date: Jul 2003
Posts: 7,013
Geno has much to be proud ofGeno has much to be proud ofGeno has much to be proud ofGeno has much to be proud ofGeno has much to be proud ofGeno has much to be proud of
Send a message via AIM to Geno
graal runs on my netbook when using V6.

the last version would not run...so

Thanks!
Reply With Quote
  #862  
Old 01-27-2011, 01:19 AM
MrOmega MrOmega is offline
One More Time
MrOmega's Avatar
Join Date: Aug 2010
Location: TN, USA
Posts: 631
MrOmega is an unknown quantity at this point
Send a message via AIM to MrOmega Send a message via MSN to MrOmega Send a message via Yahoo to MrOmega
Here's an issue I'm having. I'm using GraalControl.onMouseDown() and call a function from within side this. Now within this function I call another and same again in the next function. The params in getDist() are always the params of onMouseDown(), not the ones I send.
PHP Code:
function GraalControl.onMouseDown()
{

  
doActions();

}

function 
doActions()
{

  
someFunction();

}

function 
someFunction()
{

  
temp.dist getDistplayer.xtemp.nx);

}

function 
getDisttemp.x1temp.x2temp.y1temp.y2)
{

  if ( 
params.size() == 4)
    return (((( 
temp.x2 temp.x1) ^ 2) + (( temp.y2 temp.y1) ^ 2)) ^ 0.5);

  if ( 
params.size() == 2)
    return ((( 
temp.x2 temp.x1) ^ 2) ^ 0.5);


Basically in getDist the params are that of onMouseDown() regardless.
__________________
Time is the fire in which we burn...
Up, Up, Down, Down, Left, Right, Left, Right, B, A, Select, Start! Now I got 99 LIVES!!!
Reply With Quote
  #863  
Old 01-27-2011, 01:45 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by MrOmega View Post
Basically in getDist the params are that of onMouseDown() regardless.
This is intentional. You have to give the parameters names. Stefan explained it somewhere but I can't find the post.

EDIT:
Quote:
Originally Posted by Stefan View Post
The params[] array is only created when the script is called (doesn't even need to be a function, GS1 style). That is either on an event, or when you call a function of another object. To get a variable number of parameters either use func(arg1, arg2, arg3, arg4 etc) and ignore the arguments that you don't want, or pass the parameters as array.

Currently accessing the parameters for each function as array is not possible because it would mean a big speed slowdown, although if it's really important to have it then we could add something like temp.functionparams[] which dynamically converts the function parameters to variables.
__________________
Reply With Quote
  #864  
Old 01-27-2011, 01:50 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Quote:
Originally Posted by MrOmega View Post
Here's an issue I'm having. I'm using GraalControl.onMouseDown() and call a function from within side this. Now within this function I call another and same again in the next function. The params in getDist() are always the params of onMouseDown(), not the ones I send.

Basically in getDist the params are that of onMouseDown() regardless.
Provide an actual working script (especially in Bug Reports) with some output if you want to help get the issue resolved.

Edit: So it's intentional.

PHP Code:
//#CLIENTSIDE

function onCreated() {
  echo(
"== Created ==");
  
getSomevalue(12);
}

function 
GraalControl.onMouseDown() {
  echo(
"== Clicked ==");
  echo(
"MouseDown: " params);
  
somefunction();
  
this.scheduleevent(1"CheckParams""");
}

function 
onCheckParams() {
  echo(
"check: " params);
}

function 
somefunction() {
  echo(
"somefunction: " params);
  
someotherfunction();
}

function 
someotherfunction() {
  echo(
"someotherfunction: " params);
  
temp.getsomething getSomevalue(12);
}

function 
getSomevalue() {
  echo(
"getsomevalue: " params);
  echo(
"getsomevalue params: " a SPC b SPC c SPC d);

echos..

PHP Code:
== Created ==
getsomevalue
getsomevalue params0 10  
== Clicked ==
MouseDown0,414,540,1,0
somefunction
0,414,540,1,0
someotherfunction
0,414,540,1,0
getsomevalue
0,414,540,1,0
getsomevalue params
0 10  
check
""
My advice, don't rely on the params array when you can specify parameters in the function. In your case just add a second function.
__________________
Quote:
Reply With Quote
  #865  
Old 01-27-2011, 02:29 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by MrOmega View Post
PHP Code:
  if ( params.size() == 2)
    return ((( 
temp.x2 temp.x1) ^ 2) ^ 0.5);


On second look at your code... lol?
__________________
Reply With Quote
  #866  
Old 01-27-2011, 02:49 AM
MrOmega MrOmega is offline
One More Time
MrOmega's Avatar
Join Date: Aug 2010
Location: TN, USA
Posts: 631
MrOmega is an unknown quantity at this point
Send a message via AIM to MrOmega Send a message via MSN to MrOmega Send a message via Yahoo to MrOmega
Quote:
Originally Posted by cbk1994 View Post
On second look at your code... lol?
What? It checks to see if it's getting the dist from two points or just the xdist/ydist. 4 params means its getting it from two actual points...
__________________
Time is the fire in which we burn...
Up, Up, Down, Down, Left, Right, Left, Right, B, A, Select, Start! Now I got 99 LIVES!!!
Reply With Quote
  #867  
Old 01-27-2011, 02:52 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by MrOmega View Post
What? It checks to see if it's getting the dist from two points or just the xdist/ydist. 4 params means its getting it from two actual points...
You don't see anything wrong with:



?
__________________
Reply With Quote
  #868  
Old 01-27-2011, 02:55 AM
MrOmega MrOmega is offline
One More Time
MrOmega's Avatar
Join Date: Aug 2010
Location: TN, USA
Posts: 631
MrOmega is an unknown quantity at this point
Send a message via AIM to MrOmega Send a message via MSN to MrOmega Send a message via Yahoo to MrOmega
Quote:
Originally Posted by cbk1994 View Post
You don't see anything wrong with:



?
Well when you put it in that view I do. But it basically acts as abs(); I could do abs( temp.x2 - temp.x1);

@fowlplay4:
What do you mean add a second function...

Why can't I just recreate the params array when I call a function?
__________________
Time is the fire in which we burn...
Up, Up, Down, Down, Left, Right, Left, Right, B, A, Select, Start! Now I got 99 LIVES!!!

Last edited by MrOmega; 01-27-2011 at 03:51 AM..
Reply With Quote
  #869  
Old 01-27-2011, 03:14 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Quote:
Originally Posted by MrOmega View Post
Well when you put it in that view I do.

@fowlplay4:
What do you mean add a second function...

Why can't I just recreate the params array when I call a function?
You have complete control over what data you pass to it, instead of checking for how many parameters you pass to a certain function, write a function to take exactly how many parameters you need.

I.e:

PHP Code:
function getDist2(temp.x1temp.x2) {
  
// code for just two points here

__________________
Quote:
Reply With Quote
  #870  
Old 01-27-2011, 03:19 AM
WhiteDragon WhiteDragon is offline
Banned
Join Date: Feb 2007
Posts: 1,002
WhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to behold
Alternatively, write an n-dimensional distance function that accepts an array of tuples.
Reply With Quote
Reply

Tags
graal v6, windows


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 04:51 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.