Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 07-05-2009, 02:42 AM
wild8900 wild8900 is offline
Mr. Brightside
wild8900's Avatar
Join Date: Dec 2005
Posts: 418
wild8900 is an unknown quantity at this point
Send a message via MSN to wild8900
Graal's Image Zooming Problem

I am working on a psuedo 3d engine and its going really really good. You can "walk" around several objects and it scales and moves their image around based on your direction and location (The basics). Only problem is the way graal zooms its images. Its hard to explain but as it is now, graal seems like its trying to zoom it from the center of the image. How would I work around that and make it zoom from the bottom center? Ive tried alot of formulas to tweak its draw y location based on its zoom to make it look like its zooming from its bottom center. No luck at all.
__________________
Reply With Quote
  #2  
Old 07-05-2009, 03:13 AM
Galdor Galdor is offline
░▒▓██▓▒░
Galdor's Avatar
Join Date: Feb 2004
Posts: 2,434
Galdor has a reputation beyond reputeGaldor has a reputation beyond reputeGaldor has a reputation beyond reputeGaldor has a reputation beyond reputeGaldor has a reputation beyond reputeGaldor has a reputation beyond reputeGaldor has a reputation beyond reputeGaldor has a reputation beyond repute
just nag on stefan to give you a 3d server xD
__________________
Links
Draenin's Villains
Draenin's Quests

My Albums
Quote:
Originally Posted by Unixmad
This forums is going worst each day.
Reply With Quote
  #3  
Old 07-05-2009, 03:31 AM
wild8900 wild8900 is offline
Mr. Brightside
wild8900's Avatar
Join Date: Dec 2005
Posts: 418
wild8900 is an unknown quantity at this point
Send a message via MSN to wild8900
LOL too much work. I'm making a mario kart type event :3
__________________
Reply With Quote
  #4  
Old 07-05-2009, 03:37 AM
Galdor Galdor is offline
░▒▓██▓▒░
Galdor's Avatar
Join Date: Feb 2004
Posts: 2,434
Galdor has a reputation beyond reputeGaldor has a reputation beyond reputeGaldor has a reputation beyond reputeGaldor has a reputation beyond reputeGaldor has a reputation beyond reputeGaldor has a reputation beyond reputeGaldor has a reputation beyond reputeGaldor has a reputation beyond repute
Quote:
Originally Posted by wild8900 View Post
LOL too much work. I'm making a mario kart type event :3
sounds awesome =D
__________________
Links
Draenin's Villains
Draenin's Quests

My Albums
Quote:
Originally Posted by Unixmad
This forums is going worst each day.
Reply With Quote
  #5  
Old 07-05-2009, 03:40 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
Is this the effect you're looking for..?

PHP Code:
//#CLIENTSIDE

function onCreated() {
  
with (findimg(200)) {
    
image "block.png";
    
player.x;
    
player.y;
    
this.origx x;
    
this.origy y;
  } 
  
setTimer(0.05);
}

function 
onTimeout() {
  
onAdjustZoom();
  
setTimer(0.05);
}

function 
onAdjustZoom() {
  
with (findimg(200)) {
    
zoom cos(thiso.angle) * 0.5;
    
this.origy - (getimgheight(image) / (layer >= 32)) * zoom;
  }
  
this.angle += pi 32;

I just used the cos to zoom the image in and out to test it.
__________________
Quote:

Last edited by fowlplay4; 07-05-2009 at 04:02 AM..
Reply With Quote
  #6  
Old 07-05-2009, 03:47 AM
wild8900 wild8900 is offline
Mr. Brightside
wild8900's Avatar
Join Date: Dec 2005
Posts: 418
wild8900 is an unknown quantity at this point
Send a message via MSN to wild8900
I've never even heard of stretchx and stretchy lmao. What are they?
__________________
Reply With Quote
  #7  
Old 07-05-2009, 04:01 AM
wild8900 wild8900 is offline
Mr. Brightside
wild8900's Avatar
Join Date: Dec 2005
Posts: 418
wild8900 is an unknown quantity at this point
Send a message via MSN to wild8900
Yeah that's the effect I want to achieve but your example seems kind of hard to incorporate with the rest of my script. Ill keep testing.
__________________
Reply With Quote
  #8  
Old 07-05-2009, 04:04 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 wild8900 View Post
Yeah that's the effect I want to achieve but your example seems kind of hard to incorporate with the rest of my script. Ill keep testing.
Glad I could help, good luck.
__________________
Quote:
Reply With Quote
  #9  
Old 07-05-2009, 04:27 AM
Matt Matt is offline
iZone Administrator
Matt's Avatar
Join Date: Apr 2005
Location: United States
Posts: 2,690
Matt is a jewel in the roughMatt is a jewel in the rough
Can't wait to play the finished product.
__________________
Need Playerworld or Account support?
GraalOnline/Toonslab Support Center
Reply With Quote
  #10  
Old 07-05-2009, 12:30 PM
wild8900 wild8900 is offline
Mr. Brightside
wild8900's Avatar
Join Date: Dec 2005
Posts: 418
wild8900 is an unknown quantity at this point
Send a message via MSN to wild8900
Fixed it! I made a work around. Instead of adjusting it for different height images, I made all images the same height! 128 pixels high. Perfect. I also made textured walls :3 Doesn't lag clientside at all. It also shows other players with their text and nickname.
Attached Thumbnails
Click image for larger version

Name:	collon three.PNG
Views:	243
Size:	30.4 KB
ID:	48864  
__________________
Reply With Quote
  #11  
Old 07-05-2009, 12:50 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
Good job, looks awesome
__________________
Reply With Quote
  #12  
Old 07-05-2009, 01:52 PM
Galdor Galdor is offline
░▒▓██▓▒░
Galdor's Avatar
Join Date: Feb 2004
Posts: 2,434
Galdor has a reputation beyond reputeGaldor has a reputation beyond reputeGaldor has a reputation beyond reputeGaldor has a reputation beyond reputeGaldor has a reputation beyond reputeGaldor has a reputation beyond reputeGaldor has a reputation beyond reputeGaldor has a reputation beyond repute
wow! thats awesome make an oldschool FPS like doom or wolfenstein 3d lol xD
__________________
Links
Draenin's Villains
Draenin's Quests

My Albums
Quote:
Originally Posted by Unixmad
This forums is going worst each day.
Reply With Quote
  #13  
Old 07-05-2009, 02:40 PM
wild8900 wild8900 is offline
Mr. Brightside
wild8900's Avatar
Join Date: Dec 2005
Posts: 418
wild8900 is an unknown quantity at this point
Send a message via MSN to wild8900
Ahaha. "WolfenGraal 3D".
Im kinda nervous to keep it uploaded to the server I'm making it on. Some of my fellow staff are really untrustworthy... (On npulse)
__________________
Reply With Quote
  #14  
Old 07-05-2009, 04:14 PM
xXziroXx xXziroXx is offline
Master of Puppets
xXziroXx's Avatar
Join Date: May 2004
Location: Sweden
Posts: 5,288
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Send a message via AIM to xXziroXx Send a message via MSN to xXziroXx
Quote:
Originally Posted by wild8900 View Post
Ahaha. "WolfenGraal 3D".
Im kinda nervous to keep it uploaded to the server I'm making it on. Some of my fellow staff are really untrustworthy... (On npulse)
If you don't find Testbed Server any better, I could provide you with an RC.
__________________

"A delayed game is eventually good, but a rushed game is forever bad." - Shigeru Miyamoto
Reply With Quote
  #15  
Old 07-05-2009, 06:35 PM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
How the hell do you resize your polygons like that for the walls? When I do that, it divides the polygon into to triangles and distorts the texture -_-
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 10:49 AM.


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