User Name
Password

Go Back   Planetarion Forums > Non Planetarion Discussions > Programming and Discussion
Register FAQ Members List Calendar Arcade Today's Posts

Reply
Thread Tools Display Modes
Unread 21 Dec 2002, 17:33   #1
Dave
Infallible
 
Join Date: Feb 2001
Location: Milton Keynes, UK
Posts: 604
Dave is an unknown quantity at this point
PHP Image Generation

I am looking for a person who is skilled with the PHP GD lib.

Basicaly what I want is for this person to be able to work as part of a small team developing a fantasy (humans, orcs etc) style online strategy game.

The main things that they would be required to do is develop a 'map' system to allow visual navigation of the online 'world'.

I would do this myself, but I have only ever experimented with GD, and as such, I have little skill with it.
__________________
Free
Dave is offline   Reply With Quote
Unread 23 Dec 2002, 14:39   #2
Dave
Infallible
 
Join Date: Feb 2001
Location: Milton Keynes, UK
Posts: 604
Dave is an unknown quantity at this point
Not one reply .
__________________
Free
Dave is offline   Reply With Quote
Unread 23 Dec 2002, 14:43   #3
Gayle29uk
Bitch
 
Join Date: Jun 2002
Location: North Yorkshire
Posts: 3,848
Gayle29uk is just really niceGayle29uk is just really niceGayle29uk is just really niceGayle29uk is just really nice
I don't know anyone on here who's ever used PHP for graphics, certainly not me. SI is the main graphics person but he's into C++ and 3D so not really what you're looking for
__________________
ACHTUNG!!!
Das machine is nicht fur gefingerpoken und mittengrabben. Ist easy
schnappen der springenwerk, blowenfusen und corkenpoppen mit
spitzensparken. Ist nicht fur gewerken by das dummkopfen. Das
rubbernecken sightseeren keepen hands in das pockets. Relaxen und vatch
das blinkenlights!!!
Gayle29uk is offline   Reply With Quote
Unread 23 Dec 2002, 14:52   #4
Dave
Infallible
 
Join Date: Feb 2001
Location: Milton Keynes, UK
Posts: 604
Dave is an unknown quantity at this point
Quote:
Originally posted by Gayle28uk
I don't know anyone on here who's ever used PHP for graphics, certainly not me. SI is the main graphics person but he's into C++ and 3D so not really what you're looking for
Neither do I, which is why I asked heh.
__________________
Free
Dave is offline   Reply With Quote
Unread 23 Dec 2002, 15:14   #5
Idi
Guest
 
Posts: n/a
Using php to generate images is a world away from what SI is doing, but it is something I am looking into atm for some other work I'm, doing.

Paste more information here and I'll see if I want to help you
  Reply With Quote
Unread 23 Dec 2002, 16:52   #6
Dave
Infallible
 
Join Date: Feb 2001
Location: Milton Keynes, UK
Posts: 604
Dave is an unknown quantity at this point
Basicaly, what I want to be done is this:

Script takes data from the DB (land type, armies on the land, fortifications etc), checks to see if they exist on each bit of land.

If it does, make a small modification to the lands default image (like a little icon in the top left for an army, top right for fortifications etc). This is then output as a sort of 'map' which can be 'scrolled' across. I have allready made this system, its just a case of getting someone who can do the image manipulation.
__________________
Free
Dave is offline   Reply With Quote
Unread 23 Dec 2002, 17:00   #7
Add
Registered User
 
Join Date: Feb 2001
Posts: 442
Add will become famous soon enoughAdd will become famous soon enough
i've used php for image manipulation, not used the PHP GD lib though. i could probably do what you're asking. i just don't have the timem, sorry.
__________________
Trust in my Instinct
Add is offline   Reply With Quote
Unread 23 Dec 2002, 18:25   #8
MT
/dev/zero
Retired Mod
 
MT's Avatar
 
Join Date: May 2000
Posts: 415
MT is an unknown quantity at this point
I've done this sort of thing before, I just found it to be an amazingly large performance hit

If you come find me on IRC (not tonight, and prolly not tomorrow ngiht) I can give you a hand.

Pay me, and I will do it all for you \o/
__________________
#linux : Home of Genius

<idimmu> ok i was chained to a desk with this oriental dude
MT is offline   Reply With Quote
Unread 23 Dec 2002, 19:07   #9
Dave
Infallible
 
Join Date: Feb 2001
Location: Milton Keynes, UK
Posts: 604
Dave is an unknown quantity at this point
Oooh, pay :/
__________________
Free
Dave is offline   Reply With Quote
Unread 26 Dec 2002, 04:58   #10
CamelToe
You Know I'm Right
 
CamelToe's Avatar
 
Join Date: Aug 2001
Location: Under The Sea
Posts: 241
CamelToe is infamous around these partsCamelToe is infamous around these partsCamelToe is infamous around these partsCamelToe is infamous around these partsCamelToe is infamous around these parts
It's really not that hard to learn. Read the manual. Read other people's scripts. I was doing custom stuff within 30 minutes when I first read the manual.
__________________
Yeah bro, make that twat get the jelly.

Don't act like you weren't thinking the same thing...

you should stop posting on these forums as you're CRAP
CamelToe is offline   Reply With Quote
Unread 27 Dec 2002, 15:02   #11
BuddhistPunk
Registered User
 
Join Date: Apr 2002
Location: Leeds, but looking for a way to escape
Posts: 128
BuddhistPunk is an unknown quantity at this point
This is the basic of what you need, unfortunatly I cant dedicate the time to getting involved in a project.

Code:
<?php

/*
image_test.php
icon placement script
27th Dec 2002
*/

Header("Content-type: image/jpeg");

$image = ImageCreateFromJPEG("background.jpg");
$icon  = ImageCreateFromJPEG("icon1.jpg");
$trans = ImageColorAt($icon, 0, 0);
ImageColorTransparent($icon, $trans);
$width = ImageSX($icon);
$height = ImageSY($icon);
ImageCopyResized($image, $icon, 100, 100, 0, 0, $width, $height, $width, $height);
ImageJPEG($image);
ImageDestroy($image);

?>
This code will take 2 images (background.jpg & icon1.jpg) it will then get the pixel colour from postion 0,0 in icon1.jpg and make that the transparent color for the child image to be generated. icon1.jpg is then superimposed onto background and the resulting image is displayed (this image is then destroyed, or your server will run out of memory very quickly) - You could easily recur through this to add other icons etc.

Although I have used jpg's here you are probably better using the PNG filetype as GD can handle transparency and colour manipulation better with PNG
__________________
SELECT everything FROM everywhere WHERE something = something_else;
> 42
BuddhistPunk is offline   Reply With Quote
Reply



Forum Jump


All times are GMT +1. The time now is 02:17.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2002 - 2018