Graal Forums  

Go Back   Graal Forums > Development Forums > Graphic Design
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #16  
Old 11-12-2011, 11:59 PM
Wolfey Wolfey is offline
Wolfey Xanadu
Wolfey's Avatar
Join Date: May 2005
Location: Florida
Posts: 171
Wolfey will become famous soon enough
Quote:
Originally Posted by amonrabr View Post
Hello people!

I was checking an old harddrive and I found some graal sketches and things I made long time ago.
Most of them are bizarre, but dont forget its almost 10 years, it was a different moment, different computers, resolutions :P


the logo
Attachment 53900

some sketchs of the character I used in old site
Attachment 53901

There is a post somewhere people saying how bizarre this Zone character is. But I didnt make that animation, also, zone didnt exist yet when I made this
Attachment 53902

Some Graal tests, noone saw them
Attachment 53903

Site top characters and animations
Attachment 53904

Graal newsletter
Attachment 53905

I also found the source file and sketches of 12 hats
(including this christmas hat, people still use it)

I found 4 complete tilesets I made (3 of them I never really used, I thinking in post here later)

I found many scripts, someone already posted 5 of them here:
http://forums.graalonline.com/forums...ad.php?t=86203

The source code of 4 programs I made.
Gdk, 3D->2D, level view and map generator.

Like GDK (the printscreen is old too, it was already in jpg in folder, actually I dont have Delphi here to compile, but I post the source code if you people want it (and moderators permit) ):

Attachment 53906

Attachment 53907

Sorry to make this post. But you can imagine how nostalgic is find this some many years later. I lost my harddrives many times, so there are so many graal stuff I will never find again.. but It was funny days!

I hope you like to see these things, 90% of them I think I never showed before.

Hugs,
Amon-Ra

Make him the new webmaster?
__________________
-2007 Graal Online Champion of Straight Pool-

Retired Developer

Last edited by Wolfey; 11-13-2011 at 01:54 AM.. Reason: There made it more "friendly", also dont negative rep if you arent going to leave your name you pansie lol
Reply With Quote
  #17  
Old 11-19-2011, 05:28 AM
amonrabr amonrabr is offline
Scripter
Join Date: Nov 2001
Location: Brazil
Posts: 374
amonrabr is on a distinguished road
As I said, I will post some codes and things I found...

This is cool, cause I know many people has a website or something..
Just paste the code above in a ".php" file and open it.
Also the code is clean, so its ok to people study it.

PHP Code:
<?Php 
class graalLevel{
    var 
$tile = array();
    var 
$imgFolder 'images/';
    var 
$defaultTileset 'pics1.png';
    function 
prepare(){
        
file_exists($this->imgFolder) or mkdir($this->imgFolder);
        
file_exists($this->imgFolder.$this->defaultTileset) or die("Please, first save pics1.png file in folder '{$this->imgFolder}'.");
    }
    function 
graalLevel($lvl){
        
$this->prepare();
        
preg_match_all('/board \d \d+ \d\d \d (.*)/ei',$lvl,$r);
        function 
convertLine($a,$b,&$o){
            foreach(
str_split($a2) as $c=>$d)$o->tile[$b][$c] = $o->tileSetCoordinates($d);
        }    
        
array_walk($r[1],'convertLine',$this);
    }
    function 
tileSetCoordinates($d){
        
$seq 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
        
$_ strpos($seq,$d[1])+strpos($seq,$d[0])*64;
        return array(
floor((floor($_/512)*16+($_%16))*16)*-1,floor((floor($_/16)%32)*16)*-1);
    }
    function 
render(){
        
$s='';
        for(
$i=0;$i<64;$i++)for($j=0;$j<64;$j++)
            
$s .= '<div class=div style="background-position:'.(count($this->tile)>0?$this->tile[$i][$j][0]:'0').'px '.(count($this->tile)>0?$this->tile[$i][$j][1]:0).'px;"></div>';
        echo 
"<style type='text/css'>*{margin:0px;}.div{background-image:url({$this->imgFolder}{$this->defaultTileset});display:block; width:16px; height: 16px; float:left;}</style><div style='width:1024px;height:1024px;'>$s</div>";
    }
}
if(
array_key_exists('arq',$_FILES) && $_FILES['arq']['size']>&& is_array($t pathinfo($_FILES['arq']['name'])) && $t['extension'] == 'nw'){
    
$level = new graalLevel(    file_get_contents($_FILES['arq']['tmp_name'])    );
    
$level->render();
}
?>

<form method="post" enctype="multipart/form-data">Select nw file:<input type="file" name="arq" /><input type="submit" name="submit" value="enviar"/></form>

Last edited by amonrabr; 11-19-2011 at 09:38 PM.. Reason: now with div
Reply With Quote
  #18  
Old 11-19-2011, 05:47 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 amonrabr View Post
As I said, I will post some codes and things I found...

This is cool, cause I know many people has a website or something..
Just paste the code above in a ".php" file and open it.
Also the code is clean, so its ok to people study it.

PHP Code:
<?Php 
class graalLevel{
    var 
$tile = array();
    var 
$imgFolder 'images/';
    var 
$defaultTileset 'pics1.png';
    function 
prepare(){
        
file_exists($this->imgFolder) or mkdir($this->imgFolder);
        
file_exists($this->imgFolder.$this->defaultTileset) or die("Please, first save pics1.png file in folder '{$this->imgFolder}'.");
    }
    function 
graalLevel($lvl){
        
$this->prepare();
        
preg_match_all('/board \d \d+ \d\d \d (.*)/ei',$lvl,$r);
        function 
convertLine($a,$b,&$o){
            foreach(
str_split($a2) as $c=>$d)$o->tile[$b][$c] = $o->tileSetCoordinates($d);
        }    
        
array_walk($r[1],'convertLine',$this);
    }
    function 
tileSetCoordinates($d){
        
$seq 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
        
$_ strpos($seq,$d[1])+strpos($seq,$d[0])*64;
        return array(
floor((floor($_/512)*16+($_%16))*16)*-1,floor((floor($_/16)%32)*16)*-1);
    }
    function 
render(){
        
$s='';
        for(
$i=0;$i<64;$i++)for($j=0;$j<64;$j++)
            
$s .= '<i style="background-position:'.(count($this->tile)>0?$this->tile[$i][$j][0]:'0').'px '.(count($this->tile)>0?$this->tile[$i][$j][1]:0).'px;"></i>';
        echo 
"<style type='text/css'>*{margin:0px;}i{background-image:url({$this->imgFolder}{$this->defaultTileset});display:block; width:16px; height: 16px; float:left;}</style><div style='width:1024px;height:1024px;'>$s</div>";
    }
}
if(
array_key_exists('arq',$_FILES) && $_FILES['arq']['size']>&& is_array($t pathinfo($_FILES['arq']['name'])) && $t['extension'] == 'nw'){
    
$level = new graalLevel(    file_get_contents($_FILES['arq']['tmp_name'])    );
    
$level->render();
}
?>

<form method="post" enctype="multipart/form-data">Select nw file:<input type="file" name="arq" /><input type="submit" name="submit" value="enviar"/></form>
Why are you using (deprecated) <i> tags for the tiles instead of a block tag like <div>?

It might be worth mentioning I did something similar with HTML5's canvas tag in JavaScript:

http://static.graalcenter.org/temp/ole/ (tile selection isn't working well, but this is an easy fix eventually)

code: http://static.graalcenter.org/temp/ole/js/site.js
__________________
Reply With Quote
  #19  
Old 11-19-2011, 08:11 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 cbk1994 View Post
Why are you using (deprecated) <i> tags for the tiles instead of a block tag like <div>?
I used to think they were deprecated as well but it turns out they aren't. Turns out they're just frowned upon by people who like to keep the styling and markup separate.

Also remember these are "old stuffs".
__________________
Quote:
Reply With Quote
  #20  
Old 11-19-2011, 02:46 PM
amonrabr amonrabr is offline
Scripter
Join Date: Nov 2001
Location: Brazil
Posts: 374
amonrabr is on a distinguished road
yes, its pretty old. Also as semantic I see no problem use "i". its pretty webstandart since its from first html.

You can replace the render function for this one
PHP Code:
    <?Php 

class graalLevel{
    var 
$tile = array();
    var 
$imgFolder 'images/';
    var 
$defaultTileset 'pics1.png';
    function 
prepare(){
        
file_exists($this->imgFolder) or mkdir($this->imgFolder);
        
file_exists($this->imgFolder.$this->defaultTileset) or die("Please, first save {$this->defaultTileset} file in folder '{$this->imgFolder}'.");
    }
    function 
graalLevel($lvl){
        
$this->prepare();
        
preg_match_all('/board \d \d+ \d\d \d (.*)/ei',$lvl,$r);
        function 
convertLine($a,$b,&$o){
            foreach(
str_split($a2) as $c=>$d)$o->tile[$b][$c] = $o->tileSetCoordinates($d);
        }    
        
array_walk($r[1],'convertLine',$this);
    }
    function 
tileSetCoordinates($d){
        
$seq 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
        
$_ strpos($seq,$d[1])+strpos($seq,$d[0])*64;
        return array(
floor((floor($_/512)*16+($_%16))*16),floor((floor($_/16)%32)*16));
    }
    function 
render(){
        
$img imagecreatetruecolor(1024,1024);
        
$tileSet imagecreatefrompng($this->imgFolder.$this->defaultTileset);
        for(
$i=0;$i<64;$i++)for($j=0;$j<64;$j++)            
        
imagecopy($img,$tileSet,$j*16,$i*16,(count($this->tile)>0?$this->tile[$i][$j][0]:'0'),(count($this->tile)>0?$this->tile[$i][$j][1]:),16,16);
        
header("Content-type: image/jpeg");
        
imagejpeg($img,NULL,100);
    }
}
if(
array_key_exists('arq',$_FILES) && $_FILES['arq']['size']>&& is_array($t pathinfo($_FILES['arq']['name'])) && $t['extension'] == 'nw'){
    
$level = new graalLevel(    file_get_contents($_FILES['arq']['tmp_name'])    );
    
$level->render();
}
?>
<form method="post" enctype="multipart/form-data">Select nw file:<input type="file" name="arq" /><input type="submit" name="submit" value="enviar"/></form>
than you get the result as image and pretty fast.

Last edited by amonrabr; 11-19-2011 at 02:57 PM..
Reply With Quote
  #21  
Old 11-19-2011, 02:53 PM
amonrabr amonrabr is offline
Scripter
Join Date: Nov 2001
Location: Brazil
Posts: 374
amonrabr is on a distinguished road
whats "layers" I saw people talking?
Something new on graal?
Reply With Quote
  #22  
Old 11-19-2011, 08:14 PM
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 amonrabr View Post
yes, its pretty old. Also as semantic I see no problem use "i". its pretty webstandart since its from first html.
<i> is like <span> or <strong>. There's no reason to use an inline element and then make it a block element with CSS.
__________________
Reply With Quote
  #23  
Old 11-19-2011, 08:27 PM
amonrabr amonrabr is offline
Scripter
Join Date: Nov 2001
Location: Brazil
Posts: 374
amonrabr is on a distinguished road
ya, I think I know a little bit of web.. in a semantical way to do it, "i" for me was icon/image or whatever, I really didnt want to put the tile italic..
w3c agree with me: http://www.w3.org/International/ques...a-b-and-i-tags
anyway, there is no problem to transform inline stuff in block or anything.. to make something really webstandart you have to see the tags as any normal Xml object, and by css you give them atributes.. I usually reset all atributes by css when I make something.. Actually any advance programm recommend you reset it http://www.google.com.br/search?q=css+reset but if "i" doesnt look right, just change it to any other tag
Reply With Quote
  #24  
Old 11-19-2011, 09:05 PM
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 amonrabr View Post
in a semantical way to do it, "i" for me was icon/image or whatever, I really didnt want to put the tile italic..
That's not what it means at all. From the same link you quoted:

Quote:
Originally Posted by Your Link
The i element represents a span of text in an alternate voice or mood, or otherwise offset from the normal prose, such as a taxonomic designation, a technical term, an idiomatic phrase from another language, a thought, a ship name, or some other prose whose typical typographic presentation is italicized.
No, it doesn't. Read the link you quoted carefully.

Quote:
anyway, there is no problem to transform inline stuff in block or anything.. to make something really webstandart you have to see the tags as any normal Xml object, and by css you give them atributes.. I usually reset all atributes by css when I make something.. Actually any advance programm recommend you reset it http://www.google.com.br/search?q=css+reset
A CSS reset is used to remove irregularities between browsers so that any CSS rules in effect are intentional. They're not meant so that you can redefine what elements mean. All that does is mess with screen readers and search engines that don't parse CSS.

Of course you can transform inline elements to block elements—I never stated you couldn't. I'm simply wondering why you would do that when there is already a more suitable element available. W3C would probably like to know, too:
Quote:
Originally Posted by Your Link
You should not use b and i tags if there is a more descriptive and relevant tag available.
__________________
Reply With Quote
  #25  
Old 11-19-2011, 09:45 PM
amonrabr amonrabr is offline
Scripter
Join Date: Nov 2001
Location: Brazil
Posts: 374
amonrabr is on a distinguished road
Thats not the proposal of the topic. Let me explain you the basic of html.

A long time ago html was only a code. And each browser tryed to make a visual way to render the code. But there was no rule, noone told to this browser the default line-height, or alot of other visual proprieties.. So each browser naturally render the code in your own way. Thats the reason they created w3c, to try to make a standart way to do things.

When you make a html code, you have to imagine it in a Text Only browser. And let the CSS give the visual. The default visual(css) properties of each object is different in each browser. IE, example, consider the padding of element as part of the element size.
There are elements that are pretty the same in all browsers like: strong or em. But in a bigger way to see the web, you have the imagine your html just as a code. And your css give it the design. Do you need to reset all the objects? No necessary, alot of them are going in the same direction after w3c, but its the CSS that gives to the code it design. Reset everything and tell to the browser how each thing will be, and you will have the standart.

Check the "i" you hated so much. Isnt it opening the same in all browsers? So, its ok. Html5 is not yet, so.. for any company or any kind of internet business where public is the reason to exist, the most standart is better.

Why w3c says many things? Cause it point of view is based in people dont need to explain how each tag will work, w3c exists to dream in all browser do the default css things, but as you probably already know, that doesnt happen. When that be real will be great, the css codes will be smaller.

The main reason is that noone is the html owner, so noone has the right to say whats wrong. But w3c is here to try to be this thing.

So I will not talk about this again, really is not the focus. If you answer, or other offtopic things I will ignore, dont wanna be rude. But its like you have a young brother that says the day has 25 hours. You know its 24 (actually more, you know its 23:59), but your brother really likes to show its point of view, that doesn't make you rude to hate to be explaining why its 24. But you really has most important things to do.

So I edited the other post to be like you prefer, now there is no "i" element there. than there is no reason to talk about this. Once again sorry to be rude, but I will ignore other posts.
Reply With Quote
  #26  
Old 11-21-2011, 08:56 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
Quote:
Originally Posted by amonrabr View Post
But its like you have a young brother that says the day has 25 hours. You know its 24 (actually more, you know its 23:59), but your brother really likes to show its point of view, that doesn't make you rude to hate to be explaining why its 24. But you really has most important things to do.
__________________

Zenkou for life
Reply With Quote
  #27  
Old 11-21-2011, 09:34 AM
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 amonrabr View Post
But its like you have a young brother that says the day has 25 hours. You know its 24 (actually more, you know its 23:59), but your brother really likes to show its point of view, that doesn't make you rude to hate to be explaining why its 24.
I have this issue, but its with an older brother.
__________________

Careful, thoughts and opinions here scare people.
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 01:23 PM.


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