RE: Re: How to scroll over An Image
Maurice Sibrandi <[email protected]> Fri, 14 Nov 2003 09:09:41 +0100
| Newsgroups | gmane.comp.games.mobile |
|---|---|
| Message-ID | <[email protected]> |
Try System.gc(); This wil run the garbage collector. And about scrolling over an image. Try using a tile-bases approach to save some memory. Off course this wil only work when the image is suitable to create tile/map from it (lots of the same pieces). Maurice > -----Original Message----- > From: Matt Benic [mailto:[email protected]] > Sent: vrijdag 14 november 2003 9:05 > To: [email protected] > Subject: RE: [m_game-dev] Re: How to scroll over An Image > > > that reminds me of something I was wondering about.. I have written a > comprehensive streaming engine in c++, but there I had the > advantage of > explicitly allocating and freeing resources.. how would one get around > the fact that objects are only destroyed by the garbage collecter in > java? I know the resource should be released sometime after the last > reference to it is released, but is there a way to force that > (I want to > try and implement a simple image-streaming algorithm..why? because I > CAN!!! ;p ) > > > mattbenic > I-Imagine | +27 11 7859800 | [email protected] > <mailto:[email protected]> > "Sarcasm is just one more service I offer." > Are you an organ donor yet? 0800 22 66 11 > > -----Original Message----- > From: T [mailto:[email protected]] > Sent: Friday, November 14, 2003 2:50 AM > To: [email protected] > Subject: [m_game-dev] Re: How to scroll over An Image > > > Hi, > > My limited experience is you define a floating rectangle the size of > your display viewport and move it over the top of an offscreen buffer > that contains your big image. Each time you update your display you > blit the area of the big image that is underneath the > floating rectangle > to the screen. This gives the illusion of movement. If your > big image > is really big then you might get into trouble with having it > loaded into > memory on low memory hardware. > > A more complicated way to handle the problem is to break your > big image > into smaller ones. Then you load/unload small images from > memory, only > having a few in memory at any one time (eg. 4). The 4 you keep in > memory are the ones that coincide with the location of the floating > rectangle. When your floating rectangles border crosses the > borders of > your smaller images you will have to blit pieces of each > small image to > the display viewport. A little more work, but you could reduce your > memory footprint substantially. > > Hope this helps. > > > Ty > > "patil_java" < [email protected] > <mailto:[email protected]> > wrote in message > news:[email protected] > <news:[email protected]> ... > > > Hi all, > > I was just wondering how to scroll an backgroud Image so that > we get an > feeling of we are moving. > > And also I am not looking at just rolling over same segment > like falling > stars etc where we put that in loop but actully what I am looking is > moving over an Big Image. > > > > Thanxz > > Chandu > > > _____ > > Get Your Private, Free E-mail from Indiatimes at > <http://email.indiatimes.com> http://email.indiatimes.com > Buy The Best In BOOKS at http://www.bestsellers.indiatimes.com > <http://www.bestsellers.indiatimes.com> > Bid for Air Tickets @ Re.1 on Air Sahara Flights. Just log on to > http://airsahara.indiatimes.com <http://airsahara.indiatimes.com> and > Bid Now ! > > To unsubscribe from this group, send an email to: > [email protected] > > > > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service > <http://docs.yahoo.com/info/terms/> . > > > > Yahoo! Groups Sponsor > > ADVERTISEMENT > > <http://rd.yahoo.com/SIG=12ccp4gs2/M=267637.4116719.5338353.12 61774/D=eg roupweb/S=1705006497:HM/EXP=1068857413/A=1853618/R=0/*http://www.netflix .com/Default?mqso=60178338&partid=4116719> click here <http://us.adserver.yahoo.com/l?M=267637.4116719.5338353.1261774/D=egrou pmail/S=:HM/A=1853618/rand=843405852> To unsubscribe from this group, send an email to: [email protected] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service <http://docs.yahoo.com/info/terms/> . To unsubscribe from this group, send an email to: [email protected] Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ ------------------------ Yahoo! Groups Sponsor ---------------------~--> Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada. http://www.c1tracking.com/l.asp?cid=5511 http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/hWFolB/TM ---------------------------------------------------------------------~-> To unsubscribe from this group, send an email to: [email protected] Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/