Graal Forums  

Go Back   Graal Forums > Development Forums > Future Improvements
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 05-14-2006, 01:24 AM
jake13jake jake13jake is offline
Former Classic Staff
jake13jake's Avatar
Join Date: Dec 2002
Location: Northwest Vermont
Posts: 1,452
jake13jake will become famous soon enough
shoot function revisited

I would really just like the ability to modify dynamically what projectiles detect as walls.
Reply With Quote
  #2  
Old 05-14-2006, 08:14 PM
Tyhm Tyhm is offline
Psionic Youth
Tyhm's Avatar
Join Date: Mar 2001
Location: Babord, West Graal Deaths:1009 Kills:1
Posts: 5,635
Tyhm has a spectacular aura about
Or which direction was "Down". But we get into putnpc when we do that, don't we?
__________________
"Whatever," said Bean, "I was just glad to get out of the toilet."

"Power does not corrupt. Fear corrupts, perhaps the fear of a loss of power."- John Steinbeck
"I'm only acting retarded, what's your excuse?" queried the Gord.
- My pet, the Levelup Gnome

http://forums.graalonline.com/forums...&postcount=233
Reply With Quote
  #3  
Old 05-14-2006, 10:00 PM
excaliber7388 excaliber7388 is offline
Banned
excaliber7388's Avatar
Join Date: Jul 2005
Location: US
Posts: 5,229
excaliber7388 can only hope to improve
Send a message via AIM to excaliber7388
It would be nice if it was like:
shoot projectile type,fromx,fromy,range(tiles),npcblock 0/1,wallblock0/1;
ex:
shoot(fireball,playerx+.5,player+1.5,10,0,1);
which would make a fireball that can't be blocked by NPCs, but will stop at 10 tiles or a wall.
Reply With Quote
  #4  
Old 05-15-2006, 01:30 AM
jake13jake jake13jake is offline
Former Classic Staff
jake13jake's Avatar
Join Date: Dec 2002
Location: Northwest Vermont
Posts: 1,452
jake13jake will become famous soon enough
[edit]
MORE TO ADD:
It would be cool if the projectile still existed during the onActionProjectile, and if you could modify it onActionProjectile (as though it were passed as a param), and perhaps the ability to modify a projectile on the event, and keep using it (ex. lvl2 shield would make the direction of the projectile flip).

I also would like to be able to destroy the projectile when I want to, and that it would destroy both serverside AND clientside. (ex, hide an NPC clientside, the projectile will hit at the NPC, but the projectile will continue moving clientside until it hits a clientside wall)

I haven't really had a lot of experience with projectiles, but this is functionality that I thought I could implement some way, but have found otherwise.
[/edit]


Quote:
Originally Posted by excaliber7388
It would be nice if it was like:
shoot projectile type,fromx,fromy,range(tiles),npcblock 0/1,wallblock0/1;
ex:
shoot(fireball,playerx+.5,player+1.5,10,0,1);
which would make a fireball that can't be blocked by NPCs, but will stop at 10 tiles or a wall.
pfft, just make a gani of a fireball. I just want to be able to have more dynamic wall detection. I mean, I went for that with my movement system and that went very well.

What would also be nice is if you could modify tiletype(x,y) return values, much like enablefeatures and showstats.

ex. I have a timeout loop for enablefeatures
PHP Code:
if (clientr.pausedisabled)
  
gui_features |= 2;
else
  
gui_features &= ~2;
enablefeatures(gui_features); 
I mean, I'd like to be able to be able to shift one tile to another tiletype. Biggest example being the backside bottom of a cliff that connects to sand tiles.

Last edited by jake13jake; 05-15-2006 at 08:55 PM..
Reply With Quote
  #5  
Old 05-18-2006, 02:55 PM
Tyhm Tyhm is offline
Psionic Youth
Tyhm's Avatar
Join Date: Mar 2001
Location: Babord, West Graal Deaths:1009 Kills:1
Posts: 5,635
Tyhm has a spectacular aura about
Shmaybe what we really need is the Shoot script opened. "Here's how Shoot works behind the scenes, if it was written as a GScript function:
onShoot(x,y,pow,xdir,etc...){
//create the item in question
//probably use Move to move it
//probably something clever with the Move to trigger on a hit
}

So we could copy, edit, and paste our own custom "Fireball ganis" scripted exactly how we like it. The important detail would be that the script's exactly the way it works - if it's a less efficient approximation there's no sense in bothering, we can write our own less efficient approximations, the whole point of drooling over projectiles is they're hardwired to be faster and smarter than our own NPCs.
__________________
"Whatever," said Bean, "I was just glad to get out of the toilet."

"Power does not corrupt. Fear corrupts, perhaps the fear of a loss of power."- John Steinbeck
"I'm only acting retarded, what's your excuse?" queried the Gord.
- My pet, the Levelup Gnome

http://forums.graalonline.com/forums...&postcount=233
Reply With Quote
  #6  
Old 05-19-2006, 07:41 AM
jake13jake jake13jake is offline
Former Classic Staff
jake13jake's Avatar
Join Date: Dec 2002
Location: Northwest Vermont
Posts: 1,452
jake13jake will become famous soon enough
Quote:
Originally Posted by Tyhm
Shmaybe what we really need is the Shoot script opened. "Here's how Shoot works behind the scenes, if it was written as a GScript function:
onShoot(x,y,pow,xdir,etc...){
//create the item in question
//probably use Move to move it
//probably something clever with the Move to trigger on a hit
}

So we could copy, edit, and paste our own custom "Fireball ganis" scripted exactly how we like it. The important detail would be that the script's exactly the way it works - if it's a less efficient approximation there's no sense in bothering, we can write our own less efficient approximations, the whole point of drooling over projectiles is they're hardwired to be faster and smarter than our own NPCs.
My only requests here: dynamic wall detection, optional clientside/serverside synch.

Then, if possible, an option (maybe a serverop) not to immediately destroy the projectile when it hits, but to reference it as the 3rd or last parameter onaction(s)projectile that can have it's values modified only in the event.

Classic's system (for traditional projectiles) would only need arrow type, origx, origy, and dir(or)target, and, with enough control of implementation, it would be very easy to abstract that into a class (like how Tyhm was saying here). However, shoot doesn't offer that control of implementation.

What Classic would need to be able to do is reverse an arrow when it hits a player (having a >1 shield power) that is facing the arrow. I only suggest this because I think it would be more convenient, and possibly more efficient than calling the shoot function again from the action(s)projectile event. We would also need to be able to turn off all wall detection except for on most NPCs and players. Now, on the other hand, the clientside/serverside mis-synch is just annoying.

npc.isblockingprojectiles was a good start (considering liftable tiles have been switched to NPCs on classic... wouldn't want them or anything mimicking tiles blocking), though I'm not entirely sure how to implement that. I don't know how.

Also Tyhm, never say to copy and paste scripts, that's what we use classes and weapons for now when we have something we want reusable .
Reply With Quote
  #7  
Old 05-20-2006, 12:00 AM
Tyhm Tyhm is offline
Psionic Youth
Tyhm's Avatar
Join Date: Mar 2001
Location: Babord, West Graal Deaths:1009 Kills:1
Posts: 5,635
Tyhm has a spectacular aura about
Well, I fail to see how you're likely to get it from a website to the server without good old copy and paste. If he were to post a GScript version of the Shoot command, I mean.
__________________
"Whatever," said Bean, "I was just glad to get out of the toilet."

"Power does not corrupt. Fear corrupts, perhaps the fear of a loss of power."- John Steinbeck
"I'm only acting retarded, what's your excuse?" queried the Gord.
- My pet, the Levelup Gnome

http://forums.graalonline.com/forums...&postcount=233
Reply With Quote
  #8  
Old 05-20-2006, 08:37 PM
jake13jake jake13jake is offline
Former Classic Staff
jake13jake's Avatar
Join Date: Dec 2002
Location: Northwest Vermont
Posts: 1,452
jake13jake will become famous soon enough
Quote:
Originally Posted by Tyhm
Well, I fail to see how you're likely to get it from a website to the server without good old copy and paste. If he were to post a GScript version of the Shoot command, I mean.
It's really impossible to make a gscript version of the shoot or move commands since their intent is to do things that serverside gscript is incapable of.
Reply With Quote
  #9  
Old 05-21-2006, 12:17 AM
Tyhm Tyhm is offline
Psionic Youth
Tyhm's Avatar
Join Date: Mar 2001
Location: Babord, West Graal Deaths:1009 Kills:1
Posts: 5,635
Tyhm has a spectacular aura about
And yet the shoot command does it, so SOME command - probably going all the way into the core programming - IS capable of it. It's like the Move command: There's a way to emulate it with timeouts, just not as efficiently. But maybe there is. I mean, Stefan coded it in C (and a couple languages before); with the proper commands, couldn't he program it in GraalScript? Would Move be a complex brainhurting series of clientside animations, serverside instant move and delayed Sendings, then a calculated interpolation? By that same stretch could Shoot be scripted as just Create This And Move It? In which case it could be rescripted as And When It Hits Billy,
if (BillyShieldPower>1&&BillyDir=(dir+2)%4) dir=(dir+2)%4;//or Billydir, depending on your views of robust vs efficient...
__________________
"Whatever," said Bean, "I was just glad to get out of the toilet."

"Power does not corrupt. Fear corrupts, perhaps the fear of a loss of power."- John Steinbeck
"I'm only acting retarded, what's your excuse?" queried the Gord.
- My pet, the Levelup Gnome

http://forums.graalonline.com/forums...&postcount=233
Reply With Quote
  #10  
Old 05-21-2006, 05:32 PM
jake13jake jake13jake is offline
Former Classic Staff
jake13jake's Avatar
Join Date: Dec 2002
Location: Northwest Vermont
Posts: 1,452
jake13jake will become famous soon enough
Quote:
Originally Posted by Tyhm
And yet the shoot command does it, so SOME command - probably going all the way into the core programming - IS capable of it. It's like the Move command: There's a way to emulate it with timeouts, just not as efficiently. But maybe there is. I mean, Stefan coded it in C (and a couple languages before); with the proper commands, couldn't he program it in GraalScript? Would Move be a complex brainhurting series of clientside animations, serverside instant move and delayed Sendings, then a calculated interpolation? By that same stretch could Shoot be scripted as just Create This And Move It? In which case it could be rescripted as And When It Hits Billy,
if (BillyShieldPower>1&&BillyDir=(dir+2)%4) dir=(dir+2)%4;//or Billydir, depending on your views of robust vs efficient...
I would think that the server directly interprets the move command, and the client is sent dx, dy, time, and options. There's a forgivable problem in that the time in the parameters isn't always the same time to execute the movement. Although, I see that as better than a projectile's flaw of not being able to match serverside/clientside self-destruction.
Reply With Quote
  #11  
Old 05-21-2006, 10:08 PM
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
The good thing with projectiles is that they are starting immediately on clientside, without worrying about lag. We could expand that so that projectile movement would be controlled via (gani-)script. That could cause some slowdown though when there are many projectiles at the same time, although syncing all those projectiles from serverside to clientside would cause lag/speed problems too.
The perfect solution would probably be:
- creation on clientside
- make it possible to delete the projectile on serverside, e.g. when the serverside detects that the player is cheating and is shooting without having bullets (in onPlayerShoots)
- make it optional to let the projectile be moved automatically, via gani script or controlled by serverside script only
- eventually synchronize those objects quicker, via UDP between server and client like in Graal3D, so that other people see the bullets earlier and there is less difference/lag between the serverside view and the clientside view
Reply With Quote
  #12  
Old 05-24-2006, 02:43 AM
jake13jake jake13jake is offline
Former Classic Staff
jake13jake's Avatar
Join Date: Dec 2002
Location: Northwest Vermont
Posts: 1,452
jake13jake will become famous soon enough
A cool way to make walls more dynamic would be to reference a wall detection function, but that might be laggy as hell.

I'd probably just go with a list of tiletypes and players/npcs be checked by default.

Well, actually, that makes me think of throwing bushes now, where I wouldn't want it to check for NPCs or players, just to keep going until it hits it's final location.

Also, why isn't there a clientside version of onActionProjectile? j/w because it would help a lot with the smoothness of leap placement when throwing a pot or a bush. Actually, you can't really deal with smoothness this way.

Would be nice if you could have npc visibility excluded from the client that triggered an action. (that way you could place a leaptype clientside for that particular client, and then serverside for every other player but the client)

maybe like a serverside npc.setclientexclusions(list of player objects); (since I think I'd most be using this with putnpc2).

Last edited by jake13jake; 05-24-2006 at 05:42 AM..
Reply With Quote
  #13  
Old 05-24-2006, 06:30 AM
Moondeath_2 Moondeath_2 is offline
"..."
Moondeath_2's Avatar
Join Date: Jan 2006
Location: Far Far Away.
Posts: 238
Moondeath_2 is an unknown quantity at this point
Send a message via AIM to Moondeath_2 Send a message via MSN to Moondeath_2 Send a message via Yahoo to Moondeath_2
Psh. Shoot is teh Evil!
__________________
Aim: DarkFireXZ3
Email: [email protected] or [email protected]
Common Location: Unholy Nation
Gscript, Playerworld Rules, Support Center
Reply With Quote
  #14  
Old 05-25-2006, 06:57 PM
jake13jake jake13jake is offline
Former Classic Staff
jake13jake's Avatar
Join Date: Dec 2002
Location: Northwest Vermont
Posts: 1,452
jake13jake will become famous soon enough
Quote:
Originally Posted by Moondeath_2
Psh. Shoot is teh Evil!
Shoot is a good function in an abstract perspective. It just isn't dynamic enough imo.
Reply With Quote
Reply


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 08:49 PM.


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