Graal Forums  

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

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 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 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:	359
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 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
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
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
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.
__________________
Follow my work on social media post-Graal:Updated august 2025.
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
  #16  
Old 07-05-2009, 06:40 PM
Crono Crono is offline
:pluffy:
Join Date: Feb 2002
Location: Sweden
Posts: 20,000
Crono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond repute
That's cool and all but it's nearly 2010 and we now have early 90's 3D that was released a year after Zelda: A link to the Past? wat
__________________
Reply With Quote
  #17  
Old 07-05-2009, 06:43 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 reputeGaldor has a reputation beyond repute
Quote:
Originally Posted by Crono View Post
That's cool and all but it's nearly 2010 and we now have early 90's 3D that was released a year after Zelda: A link to the Past? wat
Progress!
__________________
Links
Draenin's Villains
Draenin's Quests

My Albums
Quote:
Originally Posted by Unixmad
This forums is going worst each day.
Reply With Quote
  #18  
Old 07-05-2009, 11:54 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
Quote:
Originally Posted by DustyPorViva View Post
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 -_-
I hate to give away my secrets :P but Ill tell you that they aren't polygons. Its a really extremely simple solution. I tried using polygons and All I got were drab solid colored walls.

EDIT: How do I upload this to a server without having all the other staff take it and tear it apart? Or worse, have it end up on OTHER servers.
__________________
Reply With Quote
  #19  
Old 07-06-2009, 12:00 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 reputeGaldor has a reputation beyond repute
...
__________________
Links
Draenin's Villains
Draenin's Quests

My Albums
Quote:
Originally Posted by Unixmad
This forums is going worst each day.

Last edited by Galdor; 07-06-2009 at 12:06 AM.. Reason: Shhh! ITS A SECRET! xD
Reply With Quote
  #20  
Old 07-06-2009, 12:02 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
Quote:
Originally Posted by Galdor View Post
hehe you just used several images behind each other?
Ssshhh! You got me! That's like revealing all the smoke an mirrors that magician uses. >:
__________________
Reply With Quote
  #21  
Old 07-06-2009, 03:11 AM
Robin Robin is offline
The secret of NIMH
Robin's Avatar
Join Date: Apr 2005
Location: Wales, UK
Posts: 515
Robin will become famous soon enough
Send a message via AIM to Robin
Ah I thought you were doing a GTA2 style..

Click image for larger version

Name:	blah.png
Views:	205
Size:	962 Bytes
ID:	48872

How does this not lag clientside? :S
__________________

Reply With Quote
  #22  
Old 07-06-2009, 03:45 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
Very similar to GTA2 style actually. It doesn't lag at all surprisingly. But then I have a dual core proc and a fair amount of ram. That might be why. x3
Also, I only have it drawing the wall images within the screen and at a change-able distance.
__________________
Reply With Quote
  #23  
Old 07-06-2009, 03:08 PM
Gambet Gambet is offline
Registered User
Join Date: Oct 2003
Posts: 2,712
Gambet is on a distinguished road
Quote:
Originally Posted by wild8900 View Post
Very similar to GTA2 style actually. It doesn't lag at all surprisingly. But then I have a dual core proc and a fair amount of ram. That might be why. x3
Also, I only have it drawing the wall images within the screen and at a change-able distance.

I can't imagine this being very smooth online, nor visually appealing since, as Crono stated, it is very basic 90's 3D. There's a reason why Stefan went for a new engine when working on Graal 3D, but at least you managed to make a level appear 3D even though it would look rather strange from the Graal character's perspective.
Reply With Quote
  #24  
Old 07-06-2009, 08:05 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
Whether it's visually appealing or not depends on the viewer. I always liked that style/way of creating three-dimensional environments
Reply With Quote
  #25  
Old 07-07-2009, 12:48 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 actually like the retro early 3D look. It is surprisingly smooth online, believe it or not. It will only ever be appealing as wolfenstein 3D but who knows? Maybe with a some nice textures and graphics it'd look nice.

You would think this retro 3D would be appropriate, seeing as how we are still playing Zelda LttP online lol!
__________________
Reply With Quote
  #26  
Old 07-07-2009, 12:57 AM
Crono Crono is offline
:pluffy:
Join Date: Feb 2002
Location: Sweden
Posts: 20,000
Crono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond repute
Quote:
Originally Posted by wild8900 View Post
You would think this retro 3D would be appropriate, seeing as how we are still playing Zelda LttP online lol!
SNES gfx > early 3D imo.
__________________
Reply With Quote
  #27  
Old 03-21-2013, 12:05 AM
haro41 haro41 is offline
zenkou
haro41's Avatar
Join Date: Jul 2003
Location: Sol Grotto
Posts: 689
haro41 will become famous soon enough
Send a message via AIM to haro41
necro post inc...
Quote:
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?
Has there ever been a .zoomcenter added, or another method that does this? A workaround like changing the x,y coordinates to compensate would not be ideal.
__________________

Zenkou for life
Reply With Quote
  #28  
Old 03-21-2013, 12:36 AM
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
PHP Code:
GuiShowImgCtrl.rotationcenter string the current rotation center (only works when useowncenter=true
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 12:28 AM.


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