Quickly refreshing NSViews

anarchie
Unregistered
 
Post: #16
If you're not running NSApplication, or you're in a separate thread from the running NSApplication, you have to make the current run loop run...
Quote this message in a reply
Member
Posts: 370
Joined: 2002.04
Post: #17
Hey thanks! It works now. Now I have to speed it up... Rasp I'm getting 25 fps with two sprites on the screen, only one of which moves Sad
Steven
Quote this message in a reply
Member
Posts: 370
Joined: 2002.04
Post: #18
Ok; I'm up to 208 FPS. The problem is that when it refreshes it this fast, the screen isn't in sync. It jumps again. Can I force the info to be dumped to the screen ASAP instead of when the OS feels like doing it? Thanks guys,
Steven
Quote this message in a reply
Member
Posts: 370
Joined: 2002.04
Post: #19
Well I got it to be not jumpy by moving it out of a thread; but now I'm only getting 43 FPS. How can I get it to go faster?
Steven
Quote this message in a reply
anarchie
Unregistered
 
Post: #20
Using Obj-C in place of Java would make it go a bit faster.
Quote this message in a reply
Member
Posts: 370
Joined: 2002.04
Post: #21
Well I know Java but I dont' know Obj-C. Rasp
Steven
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #22
If you know Java, it should take you a couple of hours at the most to learn 90% of ObjC...
Quote this message in a reply
Member
Posts: 370
Joined: 2002.04
Post: #23
My point is that why learn both the API and the language at the same time when I could just learn the API? I don't think that coding it in Obj-C is going to make too much difference...
Steven
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #24
The point isn't really that ObjC will make your game go faster, but that people will be more able to help you, and that there are excellent profiling tools available that will tell you which parts of your code are slow.

I'm using Lua for the bulk of my uDevGame entry, which is significantly slower than Java, and I'm doing more complex stuff than you are by the sounds of it, and I don't have any performance problems. It should therefore not be a problem to get your frame-rate up Smile
Quote this message in a reply
Member
Posts: 370
Joined: 2002.04
Post: #25
Ok; I'll work on it more after I finish up my uDG entry.
Steven
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Quickly determining if a closed polyline is clockwise or counter-clockwise TomorrowPlusX 6 8,975 Apr 9, 2011 04:03 PM
Last Post: Skorche
  Refreshing NSViews Steven 13 5,128 Oct 26, 2002 04:08 PM
Last Post: OneSadCookie