Advanced game-animations issues!

I am developing 2D-games in Applets and I need at least to 20 fps in 640x480.
This has turned out to be quite troublesome and I've tried the traditional dubbel-buffering techniques but without enough performance. Therefore I read about the "fullScreenExclusive" mode and tried that. It works ok and I suddenly got better performance but I would still like to have my applet running in a window in the browser instead of running in full screen... VERY grateful for your help!
However, if I go for the fullScreenExclusive mode I still need help with a major bug! When I Alt-Tab to a different program and return to the game, nothing happens and everything is dead! I cannot make my full screen applet resume its animation!

Each time you introduce a level of indirection, you consume at least a small amount of processing power. For example:
String s = "hi";
System.out.println(s);is faster than
String s = "hi";
System.out.println(s.toString());even though String.toString() simply returns the object itself, because you have to go through the extra hop of calling that method. Because the method doesn't really -do- anything, though, the amount of processing power consumed by this is almost negligible.
Object-oriented programming can be slower than procedural programming, but it isn't necessarily. A decent compiler (at pre-run or runtime) tends to strip away most of those problems.
Your best bet is to locate the portions of your code which are most time-consuming with a profiler. I recommend this one:
http://mjp.sourceforge.net/
It requires Windows and is a little tricky to set up but, presuming that's not a problem, it works like a dream and is completely free.
I have scanned the forum and found that the full-screen exclusive problem that you seem to be encountering has to do with the OS reclaiming video memory at your expense. To verify that this is the problem, see if your program runs correctly using the "-Dsun.java2d.noddraw=true" command line parameter. I am not familiar with applets, so I do not know how you will have to adapt your application to do this.
Some possibly-helpful links:
http://forum.java.sun.com/thread.jsp?forum=57&thread=246368
http://forum.java.sun.com/thread.jsp?forum=31&thread=246154

Similar Messages

  • Can we make advance payments and issue a new PO for undelivered goods?

    Hi Experts,
    Can we make advance payments and issue a new PO for undelivered goods?
    Regards,
    R

    Hi Rounak,
    Yes, you can create a standalone AP Down Payment Invoice and adjust  it against the invoice you create later or you can create a payment on account outgoing payment and then reconcile it with the invoice in the ougoing payment screen.
    Regards,
    Rakesh N

  • Writing an advanced game.

    I know I am new to java, but I think i have a pretty good grip on it now.
    I would like to start programming some more advanced games that are not text based. Can someone please tell me how to create 3d stuff, by directing me towards the the right java stuff.
    thanks

    prometheuzz wrote:
    h1. @others: please, do {color:#ff0000}NOT{color} feed the troll!Why not? Maybe if we distract him long enough, the sun will come up and he'll turn into stone.
    Uh oh, did I just feed the troll? Meh, it's Thursday. You can't hold me responsible for what my fingers type.

  • CR for VS2010 - Progress animation issue

    Hi,
    We are in the software business for years.Till last year, our software was windows application. Now we are releasing the web interface for it. In our windows application we use crystal report for reporting. We have registered license for crystal 8.5 and 11. Now for the web, we are planning to use the same crystal features.
    We downloaded CR for VS2010 and we changed configuration and everything. We tried to launch a report without parameters, it is working fine. When we trying to run a report with parameter it will show parameter popup and after giving parameter values when we press OK button it will show a progress animator and it will not close. This is what happening while pressing Next and Previous button. For Export button it is not showing any progress animation and it is working fine.
    NB:
    1.   We are developing reports using CR 11. The same report we are using for our Windows application and web application.
    2.   Our windows application is developed in VDF and front end and SQL server as backend. We are using CR 11 SDK in windows application. It is working fine.
    3.   Our web application is developed in VS2010, SQL server and CR4VS2010, which is showing progress animation issue as mentioned above.
    4.   We changed CR2VS2010 to CRXIR2 for VS2005 it was working fine. We have issue only with CR4VS2010.
    We are about to release our web application soon, so before releasing we want to buy the redistribution license for CR4VS2010 if there is any solution for this issue otherwise we need to think about CRXIR2.
    Thanks
    Baby C S

    Hi Ludek,
    As you mentioned I created a sample web application, it is working fine.
    But when I change the code as below it will show the problem.
    CrystalDecisions.CrystalReports.Engine.ReportDocument doc = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
    doc.Load("C:\Program Files\.......\Report1.rpt");
    this.CrystalReportViewer1.ReportSource = doc;
    Response.Write("Ok");
    While debugging I found the last statement Response.Write("Ok"); is causing the issue. If we remove that statement and run it will work fine.
    In our actual program we have created a class by inheriting ReportDocument and we are doing all the actions like assigning SelectionFormula, setting Database connection, dynamically assign values for some formula fields in the reports. (These all are part of customisation of our CrystalLayer). Just for a debugging purpose we put a Response.Write in our CrystalLayer class. That caused the issue. Now we removed it and it is working fine.
    NB: This issue was not there in CRXIR2. I think the progress animation is using some javascript and the Response.Write we are using in our program not allowing that animation to stop.
    Thanks
    Baby C S
    Edited by: babycs on Jan 19, 2011 5:05 AM
    Edited by: babycs on Jan 19, 2011 5:06 AM
    Edited by: babycs on Jan 19, 2011 5:20 AM

  • After Effects 4K Title & Animation Issue

    Hello,
    I am having an issue implementing titles for my project in PP that were created in AE. I had someone make me title animations and logo animations for me. He designed them for 1920X1080, but my footage and sequence is 4096 X 2160, and now he's on vacation for three weeks in Europe.  I have all the assets and project files for this project. I tried to do a simple change in the sequence settings of the comps but that didn't solve anything. I also tried scaling up the layers but then the animation paths got messed up. How can I re-size the titles so they match the sequence correctly?
    Thanks,
    Ben
    AE - 11.0.2.11
    MAC OS X - 10.8.3
    4K RED Footage - 4096 X 2160

    Check the comp resizer script that comes with AE and there's a similar, more advanced floating around on AEScripts or AEnhancers somewhere. Though the aspect ratios being slightly different you may still need to intervene manually. If ev erything is based on shape layers, vector artwork and text layers, enabling the collapse transformations switch might also allow scaling the pre-comps up without any loss of quality whiel retaining the animation...
    Mylenium

  • Looking for an advanced flash animation part-time course

    Hi folks,
    I am primarily a programmer, a games programmer by trade who happened to pick up Flash on the side and later through a series of coincidences became a full time flash developer. Most of my work thus far has been code heavy, and has focussed on such things as interacting with web services, localization with xml files, flash video, streaming video, networking etc.
    My employer recently lost one of its contractors who built a lot of animation heavy flash apps for them, and as I know my way around the Flash IDE quite well, and have created fairly complex animations in the past, they have asked me to assume a more animation orientated role. To this end, they have offered to send me on courses to get up to speed with Flash animation.
    As I know probably 90-95% of Flash's capabilities, and am comfortable with animating / easing / masking / filters / tweening and how to produce these effects programmatically, my interest would lie in a course that teaches fairly advanced uses / best practices of flash. For instance, I find that there are many ways to do things in Flash, but only a few approaches that will get you there without the entire IDE coming to a grinding halt (shape hints is a good one, or perhaps an approach has forced you into a corner with many tweened animations which now need a small alteration made to all of them).
    Are any of you aware of courses that can take a fairly advanced flash user's knowledge and turbo charge it with tips, tricks, best practices and approaches to complex animation? I've found plenty of courses that will teach you the basics, but going on them would be a waste of time and money. If any of you are familiar with the Programming Gems series of books, what they do for a game programmers knowledge of programming would be a good analogy for what I'd like a course in flash animation to do for me.

    I have no idea to offer regarding courses for what you request.  Since you seem to be confident of your skills, maybe you should just create a project for yourself that would involve needing to know the things you want to learn and pursue it with extreme prejudice--solving aspects one at a time as you encounter them.  That's pretty much the approach I took in learning AS3 and it helped alot.

  • Game Port Issue

    Sound Card: Sound Blaster Li've! Value
    Issue is I have my gamepad connected to the gameport. It detects it, but declares that it is not connected.
    Be aware that I am using the value driver not the Li've.
    How do I fix this issue?
    Also can I use the Li've update on the value?

    Have you added a gamepad to your Game Controller list? You would do this in Control Panel, Game Controllers, Add, and selecting e.g., 4-button gamepad. Clicking on the Advanced button lets you select your gamepad as the preferred device.

  • Game Center issue with Apple ID

    My son suddenly cannot log in to Game Center. When he tries it tell him: "This Apple ID has not yet been used in Game Center. Tap Continue to set up your account." He has been using his Apple ID and Game Center account since Christmas 2011. He didn't log out but one of his games asked him if he wanted to log in and he tried and this happened, almost like his log in time expired
    We tried different games, same thing happens.
    We have tried turning it off and turning it back on.
    He doesn't want to lose all of the things he has on Game Center so creating a new account isn't an option. I searched for answers and have come across several people having similiar issues since 2010 but there hasn't been a single answer from anyone.
    If anyone has any ideas or experience with this and could help I would GREATLY appreciate it,
    Thank you for you time!

    Yes. I have tried that. When I use the ID I had before, it sets it up as a new account and I don't want to lose my stats attached to my old account.
    Let's say that my old nickname was "user10" and I used the email, "[email protected]" for my apple id. I changed my apple id to "[email protected]" and it changed my game center account to "mynew" and somehow I am friends with my old acct, "user10". I tried getting a password reset for "user10" but I apparently don't know my own birthday, which is possible because I usually give a false one, but the same false one each time.

  • Flash as2 game animation, problem.

    hello i am making a flash animation game but i have a problem, i have my guy running and everything its all gifs, so when he stops its a gif its not one picture its 4 of em (gif) which i made them all compressed into a gif and added to my library then added that to my flash made it work blah blah blah-
    well my problem is when my guy runs left he turn right after i let go of the key i no whats it is doing it using my 1 animation i have in their for standing  i to add my other animation which he standing left basically he runs left after i press left then i let go he turns right, i need to know how to make it so either when i let go of the (LEFT) key it uses my animation ('still2') which is him facing left which i need i have him running right and he stays right after so thats good, or if u know if theres a way i can make the code say like after i let go of like left it uses gotoAndStop('still2') then for running right it uses gotoAndStop('still') so he dosent turn around after i let go of left! well i hope u can find out, and its all animated, so dont just make it so it dosent stop using the animation of left or right, cause then hes running in place for enternity thanks heres my code.
          var rollSpeed = Number=14;
         ichigo_mc.onEnterFrame = function() {
          if (Key.isDown(Key.RIGHT)) {
           this._x += rollSpeed;
           this.gotoAndStop("right");
          } else if (Key.isDown(Key.LEFT)) {
           this._x -= rollSpeed;
           this.gotoAndStop("left");
          } else {
           this.gotoAndStop("still");

    no its actually not a school project just i want to know how to make a game, and i dont know really anything about flash, but i have in my picture of my guy another layer so theres each indivudual layer like i have in my pic of my guy the still still2 running animation 1 n 2 and both my attack things, if you would to see my project so far ask me and i send the file and it should show my guy and his animations...
    heres my code so far.. idk y but i like putting at the end
       var rollSpeed = Number=14;
         var facingRight = true;
         ichigo_mc.onEnterFrame = function() {
          if (Key.isDown(Key.RIGHT)) {
           this._x += rollSpeed;
           this.gotoAndStop("right");
           facingRight = true;
          } else if (Key.isDown(Key.LEFT)) {
           this._x -= rollSpeed;
           this.gotoAndStop("left");
           facingRight = false;
       } else if (Key.isDown(Key.SPACE)) {
        this.gotoAndStop("atack2");
          } else {
           if (facingRight) {
             this.gotoAndStop("still");
           } else {
             this.gotoAndStop("still2");

  • Safari - Animated GIF not Animating Issue

    I am frequenting site and have noticed animated gifs not animating properly on this page. The site is http://www.woot.com
    Problem Detail:
    There are two "whirly lights" on each side of a progress bar under the item currently for sale. The left light starts to animate while the page is loading but stops while the right light continues its animation.
    This particular site may usually only uses these images every once in a while so if no one checks this in the next couple days the images will no longer be there. I created a web archive the site which I could send if this page does go away. The issue does not happen in Firefox or Internet Explorer.

    Hi and Welcome to Apple Discussions
    I get the same effect as you in Safari. Loaded with no problem in Firefox. Page does have coding errors, which can lead to inaccuracies in how the page is rendered. Safari is much more strict about correct coding than Firefox, adhering to web standards set out by Web Standards Project.

  • Animation issue in Adobe photoshop cs6

    This is an annoying issue within photoshop. I am working on an animation for a video and when I try to change the position of a charater on a new frame it also changes the positioning on all of the frames previous of it.
    I am making a walk cylcle and  I want the character to walk from one end of the screen to the nextl but, when I make a new frame, move him to the opposite end of the screen on a NEW FRAME it changes the previous frames position to match the current one I am on.
    How do I fix this reoccuring problem.
    HERE IS A VIDEO DISPLAYING THE PROBLEM(Sorry, no mic):

    Read the help on how frame animation actually works.
    Mylenium

  • Withholding Tax on Advance paid having issues with Document splitting

    Dear Experts
    Our client deducts TDS on the Advance amount paid and on posting of Invoices from the Vendors. The documents are posted with withholding Tax types configured for these purpose in F-48 and FB60 respectively. Document splitting has been activated in the system with all required configuration.
    The problem arises when we try to clear the advance amount against the Invoice along with the balance payment in F-53 if the invoice has more than one expense line posted to different Cost Centers in FB60. The system gives an error message " Balancing field "Profit Center" in line item 004 not filled ". Please follow the example given below for better understanding.
    Advance posting:
    vendor a/c....dr   (Profit center 3)
    To bank Clearing (Profit center 3)
    To TDS on payment
    Invoice:
    Expense ....dr  (Cost Center1 / profit Center 1)
    Expense ....dr (Cost Center 2 / Profit Center 2)
    To vendor a/c
    To TDS on Invoice
    Up to here the document splitting works fine with Profit Centers and segments getting displayed in all line items in GL view. The issue comes when we select both the documents in F-53 and try to pay out the balance amount.
    Please note the issue does not crop up if we do not populate the withholding tax code while posting the advance entry. The system automatically posts to the relevant profit centers and segments in F-53. But this is not the business scenario.
    Please let me know if somebody can throw some light on the above issue.
    Edited by: sid_das on Dec 12, 2011 5:32 PM

    Resolved at our end by tweaking the splitting rule to match the Business requirement.

  • SB- Xtreme Gamer - Microphone issues

    $ Hello,
    I was wondering if anybody could help me out with the issue i'm having. The problem is that i can hear myself in my microphone through my headphones/speakers... but i cant get my microphone to work e.g trying to do sound record in windows or playing games in speaking ingame like counterstrike source.
    Running windows 7
    q6600
    2.4ghz
    Intel quad core
    Please respond asap

    I muted the mic in console.
    [IMG]http://i68.photobucket.com/albums/vv75/Michaelped/Capture-2.jpg[/IMG]
    Muting the mic in console fixed the issue with hearing myself throught speakers/headphones. The mic still seems not to work.
    [IMG]http://i68.photobucket.com/albums/vv75/Michaelped/Capture.jpg[/IMG]

  • Full res retina iPad and Edge Animation issues

    OK So I have been building folios for the new iPad (retnia) and the only way I can get a full page animation built in edge to work is to build it on a stage that is half res (1024x768). If I build a full screen edge animation (2048x1536) it just shows a blank screen on that page on the iPad. Anyone have any tips on this? The folio is built at 2048x1536. So when i place a 1024x768 oam file I have to stretch it and use "scale to fit". Although the animation works like this it is not as pretty as the full res pages that follow. Ideas?

    Alright. So I did a bunch of testing. Good news is that text created in indesign looks identical in quality regardless of if the indesign file is 1024 or 2048 when using PDF as the folio format. Bad news is that images (i.e. placed psd files) look not as great. Definantly better than when i was trying to upscale in folio Automatic from 1024 to 2048 but not as good as a indesign file created at 2048.
    Wish there was a way to solve the image quality issue. Oh and of course all the Edge animations work like a charm using PDF and 1024. They still are not as sharp or high quality as Edge animations built at 2048 but at least they work.

  • Moving views and split screen (AS3 games development issue)

    How do you move the workspace dynamically using AS3 (say in a platform game where the viewable area pans around the player)?
    One suggestion was to make everything move relative to the player:
    Is there a way to group all movie clips together, without creating and iterating through an array?
    For example there could be one holder movie clip which all viewable objects (apart from the background image) are attached to.
    Each of the objects could have x and y coordinates relative to the holder movie clip.
    I don't know how to do this though.
    Is there a better way (i.e. changing the x and y offset of the workspace dynamically)?
    Say if one was to make a multiplayer game where each level is over 4000x4000 px in dimensions.
    How do you split the screen with AS3 so that each player has their own view of the level?
    Thanks in advance for any replies

    After doing some further research I found that a genius named Bryan Heisey has invented a an opensource virtual camera using actionscript 3.
    I.e. a movie clip stores a snapshot of its current position as bitmap data which it draws on to the stage.
    After hours  of painful trial and error, I've modified the Actionscript 3 version of VCam, to be contained in an external actionscript file and to support split screen mode.
    I'm not sure if I've ironed out all the glitches out yet though as my trial version has expired and I'm still waiting for delivery of the registered version .
    I'll try and have a tutorial up and running in a week or 2...

Maybe you are looking for