getpixel()

Ideas for Game Editor evolution.

getpixel()

Postby trajecto » Thu Mar 03, 2005 3:02 am

I would love to see getpixel() added to Drawing Functions!

The GetPixel function retrieves the red, green, blue (RGB) color value of the pixel at the specified coordinates.
User avatar
trajecto
 
Posts: 86
Joined: Fri Jan 16, 2004 3:12 pm
Location: Michigan, US
Score: 6 Give a positive score

Postby willg101 » Thu Mar 03, 2005 9:12 pm

I like that idea :!:
http://www.wish-games.com
Old betas now available!!
User avatar
willg101
 
Posts: 473
Joined: Thu Dec 16, 2004 12:08 am
Location: West Michigan
Score: 5 Give a positive score

Postby jazz_e_bob » Fri Mar 04, 2005 1:11 am

If you can put you should be allowed to get! ;-)

What is your application for this function by the way?

Image processing perhaps?
Controlling complexity is the essence of computer programming.
User avatar
jazz_e_bob
 
Posts: 742
Joined: Tue Jul 01, 2003 9:38 pm
Location: Bloke from Cockatoo Creek Australia
Score: 14 Give a positive score

Postby trajecto » Fri Mar 04, 2005 1:55 am

I have written something in Turbo Pascal which has GetPixel(). I had microbes hunting around for food particles. They could "see" them by looking around at surrounding pixels with GetPixel().
User avatar
trajecto
 
Posts: 86
Joined: Fri Jan 16, 2004 3:12 pm
Location: Michigan, US
Score: 6 Give a positive score

Postby jazz_e_bob » Fri Mar 04, 2005 2:19 am

Brilliant. I love AI stuff.
Controlling complexity is the essence of computer programming.
User avatar
jazz_e_bob
 
Posts: 742
Joined: Tue Jul 01, 2003 9:38 pm
Location: Bloke from Cockatoo Creek Australia
Score: 14 Give a positive score

Postby JonGoten » Mon Jan 15, 2007 10:49 pm

I NEED this function to my next game.

I thought it was, but now I can´t see it :shock:

Dammm I´ve started the game already.
User avatar
JonGoten
 
Posts: 15
Joined: Sun Dec 10, 2006 7:50 pm
Score: 0 Give a positive score

Postby Fuzzy » Tue Jan 16, 2007 11:31 am

What about referencing an array that stores the contents of any location?


If you dont have a lot of critters or food on screen, it will be easier to make an array that points to each actor. perhaps not real pointers, but each actor could store his x and y there when it moves. If you use the actors old x and y, then you simulate synchronous movement, where no critter gets an advantage by moving first. in this case, use two arrays.

1. look in the old content array and decide what to do; move, eat, whatever.
2. move
3. store your actor.x and y in the current array
4. go to the next actor starting at step 1
4. after all the critters have moved, you copy the current array into the old array.

If you have a whole screen of critters, it may be simpler to use two arrays for every location on screen.
Mortal Enemy of IF....THEN(and Inspector Gadget)

Still ThreeFingerPete to tekdino
User avatar
Fuzzy
 
Posts: 1068
Joined: Thu Mar 03, 2005 9:32 am
Location: Plymostic Programmer
Score: 95 Give a positive score


Return to Feature Requests

Who is online

Users browsing this forum: No registered users and 1 guest