Website Feedback
Closed Threads
IRC Chat irc.quakenet.org #teamliquid
IRC Web ClientTeamSpeak 3 (50 users) | |
|
| peacenl January 08 2012 22:24. Posts 452 | Profile # |
| I was wondering if anyone managed to read out sc2replay files in this thread, basically so far I came accross alot of posts explaning how to unpack the binary code or the bitstream. But when trying this myself I notice that the first part of the replay file is not bit stream at all! |
| - One does not simply walk into a bar and start calling the shots.
- Failure doesn't mean you are a failure it just means you haven't succeeded yet. |
|
|
| fabiano Brazil. January 08 2012 22:44. Posts 3813 | Profile Blog # |
If by read you mean parse it, use phpsc2replay.
I've used it to create a SC2 launcher that simulates iCCup ladder and it works perfectly (http://ladderlauncher.tk), but I found SC2 to be a really boring and uneventful disgusting game compared to BW so I put the project to rest.
Was thinking about releasing it to TL users to use but it might contain ladder abusable holes so I decided to not do that. |
| | "When the geyser died, a probe came out" - SirJolt |
|
|
Kentor United States. January 08 2012 23:46. Posts 5776 | Profile Blog # | |
|
|
| shannn Netherlands. January 09 2012 00:20. Posts 2860 | Profile Blog # |
A quick question to the more experienced game programmers or any other experienced programmer.
My iOS game that I'm making right now with Cocos2D has a lot of code. There are a lot of improvements to be done and regarding one of these improvements I'm currently wondering how much does a statement cost in performance or how can I check the performance of my game other than looking at the FPS.
E.g. There is a schedule method called update (how convenient ^^) is called every frame. My current capped framerate is at 30 fps. How big does it affect the game performance if I had like a couple of for leaps and other statements in this schedule method? At first I had a lot of code called in this schedule method and now reduced by 2/3rd compared to before. My FPS won't drop below 30 right now and when I set the fps cap at 60 it usually runs at 45-55ish fps and almost never at 60.
Does anyone know or know how I can check for these performances? I've searched on the cocos2d forums and other community sites but the threads are old and I don't understand them very well yet Hoping some experienced TL'er could explain it to me in a more beginner way  |
| | http://www.teamliquid.net/forum/viewpost.php?post_id=6321864 Epic post. |
|

|
| peacenl January 09 2012 00:47. Posts 452 | Profile # |
Sorry to hear that fabiano and thanks for the link . |
| - One does not simply walk into a bar and start calling the shots.
- Failure doesn't mean you are a failure it just means you haven't succeeded yet. |
|
|
| heishe Germany. January 09 2012 00:55. Posts 2127 | Profile Blog # |
On January 09 2012 00:20 shannn wrote:A quick question to the more experienced game programmers or any other experienced programmer. My iOS game that I'm making right now with Cocos2D has a lot of code. There are a lot of improvements to be done and regarding one of these improvements I'm currently wondering how much does a statement cost in performance or how can I check the performance of my game other than looking at the FPS. E.g. There is a schedule method called update (how convenient ^^) is called every frame. My current capped framerate is at 30 fps. How big does it affect the game performance if I had like a couple of for leaps and other statements in this schedule method? At first I had a lot of code called in this schedule method and now reduced by 2/3rd compared to before. My FPS won't drop below 30 right now and when I set the fps cap at 60 it usually runs at 45-55ish fps and almost never at 60. Does anyone know or know how I can check for these performances? I've searched on the cocos2d forums and other community sites but the threads are old and I don't understand them very well yet  Hoping some experienced TL'er could explain it to me in a more beginner way 
We can't help you with this since we don't know your game. Also you're really vague. For loops and such things never matter, since you're not optimizing for a microcontroller (unless you want to make a game that looks really, really good. In which case microoptimizations like these are necessary. But even then you have to start at other points, like writing custom allocators etc.). 99.9% of your performance will be lost in macro-algorithms. Collision detection broad-phase, narrow phase, the way your entities interact, etc. This is really hard to say without seeing the game and the code.
Generally when you want to check which parts of your code need the most time you use profilers... but I imagine this to be rather difficult since you have to test the game on the actual iOS platforms. A trivial way that I can think of now is to simply manually stop the time of different parts of your code, then sum all parts of the code together and see which part needs the biggest % of time, and start looking for possible optimizations there.Last edit: 2012-01-09 00:57:19 |
| | If you value your soul, never look into the eye of a horse. Your soul will forever be lost in the void of the horse. |
|

|
| shannn Netherlands. January 09 2012 01:04. Posts 2860 | Profile Blog # |
On January 09 2012 00:55 heishe wrote: Show nested quote +On January 09 2012 00:20 shannn wrote:A quick question to the more experienced game programmers or any other experienced programmer. My iOS game that I'm making right now with Cocos2D has a lot of code. There are a lot of improvements to be done and regarding one of these improvements I'm currently wondering how much does a statement cost in performance or how can I check the performance of my game other than looking at the FPS. E.g. There is a schedule method called update (how convenient ^^) is called every frame. My current capped framerate is at 30 fps. How big does it affect the game performance if I had like a couple of for leaps and other statements in this schedule method? At first I had a lot of code called in this schedule method and now reduced by 2/3rd compared to before. My FPS won't drop below 30 right now and when I set the fps cap at 60 it usually runs at 45-55ish fps and almost never at 60. Does anyone know or know how I can check for these performances? I've searched on the cocos2d forums and other community sites but the threads are old and I don't understand them very well yet  Hoping some experienced TL'er could explain it to me in a more beginner way 
We can't help you with this since we don't know your game. Also you're really vague. For loops and such things never matter, since you're not optimizing for a microcontroller (unless you want to make a game that looks really, really good. In which case microoptimizations like these are necessary. But even then you have to start at other points, like writing custom allocators etc.). 99.9% of your performance will be lost in macro-algorithms. Collision detection broad-phase, narrow phase, the way your entities interact, etc. This is really hard to say without seeing the game and the code. Generally when you want to check which parts of your code need the most time you use profilers... but I imagine this to be rather difficult since you have to test the game on the actual iOS platforms. A trivial way that I can think of now is to simply manually stop the time of different parts of your code, then sum all parts of the code together and see which part needs the biggest % of time, and start looking for possible optimizations there.
Actually that edited idea of yours is not bad. Don't know why I didn't come up with it And I don't really understand profiling yet. I get to see the run time with all the allocations of objects and such in a graph but I seriously do not understand what all that means So the checking time is actually sufficient since I log every method and I can tell after summing all up where most time is at.
And I was talking generally so I couldn't really say it in a specific detail as it was a general question :D your post has helped so thanks :D |
| | http://www.teamliquid.net/forum/viewpost.php?post_id=6321864 Epic post. |
|

|
| tec27 United States. January 09 2012 05:13. Posts 2534 | Profile Blog # |
On January 08 2012 22:24 peacenl wrote: I was wondering if anyone managed to read out sc2replay files in this thread, basically so far I came accross alot of posts explaning how to unpack the binary code or the bitstream. But when trying this myself I notice that the first part of the replay file is not bit stream at all!
I'm working on a project to do just that atm (posted about it a little while back, but I guess you didn't see that ): https://github.com/tec27/comsat
Replays are MPQ files, so you have to extract them first (my project uses MPYQ to do that). Then you're left with a collection of files that each serve a different purpose (replay.message.events for chat, replay.game.events for game actions, etc.). Each of those files is formatted differently though, so you have to take that into account. This wiki has good documentation on the different files, although its wrong in a couple places: https://github.com/GraylinKim/sc2reader/wiki |
| | Can you jam with the console cowboys in cyberspace? |
|

|
| Jaso United States. January 09 2012 05:16. Posts 1505 | Profile Blog # |
Question:
I'm currently learning C using Harvard's cs50.net course; it's extremely helpful. However, as a sophomore in high school right now, I'm also hoping to take the AP Computer Science test before I apply for college which gives me about a year and some to teach myself AP-level Java. Unfortunately, my school does not offer APCS because it is small .
Does anyone have any recommendations? Should I get a strong foundation before moving to Java (even though I know it's more like obj-c), should I just buy an APCS book and jump in, or something else..?
Thanks! |
| |
|
| tec27 United States. January 09 2012 05:28. Posts 2534 | Profile Blog # |
On January 09 2012 05:16 Jaso wrote:Question: I'm currently learning C using Harvard's cs50.net course; it's extremely helpful. However, as a sophomore in high school right now, I'm also hoping to take the AP Computer Science test before I apply for college which gives me about a year and some to teach myself AP-level Java. Unfortunately, my school does not offer APCS because it is small  . Does anyone have any recommendations? Should I get a strong foundation before moving to Java (even though I know it's more like obj-c), should I just buy an APCS book and jump in, or something else..? Thanks!
I'd say just continue what you're doing and maybe a bit before the test, or whenever you feel comfortable with C, start learning Java. APCS is honestly a really easy test imo, just working on a bunch of your own projects and increasing your skill level that way should prepare you for it fine. |
| | Can you jam with the console cowboys in cyberspace? |
|

|
| aksfjh United States. January 09 2012 23:33. Posts 3485 | Profile # |
| I'm just wondering if anybody here has done any significant work in visual programming languages (LabVIEW, AppWare, etc.). I've been doing low level stuff in LabVIEW for about a year now, and was curious if anybody else on TL had experience with this method. |
|
|
tofucake United States. January 09 2012 23:58. Posts 11379 | Profile Blog # |
| I had to use LabVIEW in college and it was the devil. That's my only experience with it though. Were you looking for help or something? |
| | kwark > i will mentor you if you wish, but i'm like the absent drunk father you never wanted | |
|
|
| nakam Sweden. January 10 2012 00:04. Posts 205 | Profile # |
On January 09 2012 23:58 tofucake wrote: I had to use LabVIEW in college and it was the devil. That's my only experience with it though. Were you looking for help or something?
Haha, this exactly is my experience of LabVIEW! |
| | TL Local Timezone Script - http://www.teamliquid.net/forum/viewmessage.php?topic_id=277156 |
|
|
| aksfjh United States. January 10 2012 03:11. Posts 3485 | Profile # |
| I'm not having any problems with it at all. I'm using it at work to construct control and datalogging software at work. Why do you hate it so much? |
|
|
| tec27 United States. January 10 2012 12:15. Posts 2534 | Profile Blog # |
Because once you become proficient in a textual programming language it becomes super inefficient. Its like using graphical menus versus using the command-line. People that know how to use the command line can get things done a lot faster and tend to find themselves frustrated when they have to use a GUI to do the same thing.
Its fine if you're not that great at actual programming, but if you already know a lot when you start using it it tends to devolve into "I know how to do this programming-wise, I just can't find the way to do it in LabVIEW goddamnit". At least thats how it was for me. |
| | Can you jam with the console cowboys in cyberspace? |
|
|
| aksfjh United States. January 11 2012 00:09. Posts 3485 | Profile # |
So then it's a problem with familiarity. I'll admit that it can be difficult finding certain tools to do things at first, but it's like any language I've dealt with. The only difference in learning it is that it looks like it should be easier.
The one thing it really helps with for me is the ability to organize the code in an incredibly easy way. I don't have to create and continually reference diagrams in regards to program structure and flow, since I essentially program and organize simultaneously. The only thing that's hard to do is find ways to comment, but a lot of comments can be eliminated with visual layout.
Then again, maybe I don't know what I'm doing at all and that's why I find it easier to work with. Almost all my programming experience before this comes from stupid assignments at uni. =P |
|
|
| alwinuz Netherlands. January 12 2012 03:13. Posts 74 | Profile # |
On January 09 2012 01:04 shannn wrote: Show nested quote +On January 09 2012 00:55 heishe wrote: On January 09 2012 00:20 shannn wrote:A quick question to the more experienced game programmers or any other experienced programmer. My iOS game that I'm making right now with Cocos2D has a lot of code. There are a lot of improvements to be done and regarding one of these improvements I'm currently wondering how much does a statement cost in performance or how can I check the performance of my game other than looking at the FPS. E.g. There is a schedule method called update (how convenient ^^) is called every frame. My current capped framerate is at 30 fps. How big does it affect the game performance if I had like a couple of for leaps and other statements in this schedule method? At first I had a lot of code called in this schedule method and now reduced by 2/3rd compared to before. My FPS won't drop below 30 right now and when I set the fps cap at 60 it usually runs at 45-55ish fps and almost never at 60. Does anyone know or know how I can check for these performances? I've searched on the cocos2d forums and other community sites but the threads are old and I don't understand them very well yet  Hoping some experienced TL'er could explain it to me in a more beginner way 
We can't help you with this since we don't know your game. Also you're really vague. For loops and such things never matter, since you're not optimizing for a microcontroller (unless you want to make a game that looks really, really good. In which case microoptimizations like these are necessary. But even then you have to start at other points, like writing custom allocators etc.). 99.9% of your performance will be lost in macro-algorithms. Collision detection broad-phase, narrow phase, the way your entities interact, etc. This is really hard to say without seeing the game and the code. Generally when you want to check which parts of your code need the most time you use profilers... but I imagine this to be rather difficult since you have to test the game on the actual iOS platforms. A trivial way that I can think of now is to simply manually stop the time of different parts of your code, then sum all parts of the code together and see which part needs the biggest % of time, and start looking for possible optimizations there.
Actually that edited idea of yours is not bad. Don't know why I didn't come up with it  And I don't really understand profiling yet. I get to see the run time with all the allocations of objects and such in a graph but I seriously do not understand what all that means  So the checking time is actually sufficient since I log every method and I can tell after summing all up where most time is at. And I was talking generally so I couldn't really say it in a specific detail as it was a general question :D your post has helped so thanks :D
To optimize, first you need to measure what to optimize. Then you need to measure if your optimization is really an improvement.
For example: you can measure the average time that is spent in your update method (1) before, (2) after you changed the code. Then you have measured what your changes did to the performance.
That's what a profiler is for. I cannot get more specific because I don't know anything about Cocos2D. But when I google for cocos2d profiling I get lots of hits (protip: in the left bar you can tell google to only show recent result, for example written less than a year ago). |
|

|
| billy5000 United States. January 14 2012 06:00. Posts 610 | Profile Blog # |
programming nub w/ a question lol
so in java i figured out how to make a simple program that finds the distance between two points on a regular x y plane. however, the first time i tried it, the answer didn't come out right but when i just tweaked the formula, it's right.
1st method whose answer is off: double x = Double.parseDouble(args[0]); double y = Double.parseDouble(args[1]); double a = Double.parseDouble(args[2]); double b = Double.parseDouble(args[3]); double Dformula = Math.sqrt(Math.pow((b-y), 2) + Math.pow((a-x), 2));
2nd method whose answer is correct:
double x = Double.parseDouble(args[0]); double y = Double.parseDouble(args[1]); double a = Double.parseDouble(args[2]); double b = Double.parseDouble(args[3]); double Dformula = Math.sqrt((b-y)*(b-y) + (a-x)*(a-x));
Why does the second method work, but the first one doesn't?
I just remembered, I have a 2nd question..why does System.out.print('b' + 'c'); produce a number? |
| | Tiger got to hunt, bird got to fly; Man got to sit and wonder, 'Why, why, why?' Tiger got to sleep, bird got to land; Man got to tell himself he understand. Vonnegut |
|

|
| billy5000 United States. January 14 2012 06:21. Posts 610 | Profile Blog # |
3rd question:
trying to make a program that verifies cos squared + sin squared = 1
double a = Double.parseDouble(args[0]); double b = Double.parseDouble(args[1]); double cos = Math.cos(a); double sin = Math.sin(b); double formula = Math.pow(cos, 2) + Math.pow(sin, 2); System.out.print(formula);
Why isn't the answer exactly 1? this exercise even asks you why it isn't exactly 1. Also, how would you do this to make it always equal to 1? |
| | Tiger got to hunt, bird got to fly; Man got to sit and wonder, 'Why, why, why?' Tiger got to sleep, bird got to land; Man got to tell himself he understand. Vonnegut |
|
|
| Phunkapotamus United States. January 15 2012 06:42. Posts 238 | Profile # |
On January 09 2012 00:55 heishe wrote: Show nested quote +On January 09 2012 00:20 shannn wrote:A quick question to the more experienced game programmers or any other experienced programmer. My iOS game that I'm making right now with Cocos2D has a lot of code. There are a lot of improvements to be done and regarding one of these improvements I'm currently wondering how much does a statement cost in performance or how can I check the performance of my game other than looking at the FPS. E.g. There is a schedule method called update (how convenient ^^) is called every frame. My current capped framerate is at 30 fps. How big does it affect the game performance if I had like a couple of for leaps and other statements in this schedule method? At first I had a lot of code called in this schedule method and now reduced by 2/3rd compared to before. My FPS won't drop below 30 right now and when I set the fps cap at 60 it usually runs at 45-55ish fps and almost never at 60. Does anyone know or know how I can check for these performances? I've searched on the cocos2d forums and other community sites but the threads are old and I don't understand them very well yet  Hoping some experienced TL'er could explain it to me in a more beginner way 
We can't help you with this since we don't know your game. Also you're really vague. For loops and such things never matter, since you're not optimizing for a microcontroller (unless you want to make a game that looks really, really good. In which case microoptimizations like these are necessary. But even then you have to start at other points, like writing custom allocators etc.). 99.9% of your performance will be lost in macro-algorithms. Collision detection broad-phase, narrow phase, the way your entities interact, etc. This is really hard to say without seeing the game and the code. Generally when you want to check which parts of your code need the most time you use profilers... but I imagine this to be rather difficult since you have to test the game on the actual iOS platforms. A trivial way that I can think of now is to simply manually stop the time of different parts of your code, then sum all parts of the code together and see which part needs the biggest % of time, and start looking for possible optimizations there.
I agree with this heishe's reply. You can't really optimize without knowing what you're optimizing for.
Pre-optimization is a waste of time if you're going out of your standard coding style to do it. However, it is never a waste of time to change your style to utilize more efficient practices. With that in mind, know that it is also a waste of time to continually refactor your code to utilize these new practices. You will always be in a perpetual state of factorization because there will always be ways to improve.
You will need to profile and quantify your performance. Without this you will not know where your issues lie.
It isn't particularly difficult to write your own runtime profiler, and you may find it fun. There is an example of a decent runtime profiler in a Game Programming Gems book (I forget the version). I have seen profiler implementations similar to the Gems example in a few commercial game engines. It isn't perfect, but it gets the job done by drawing attention to potential problem areas.
There are also fun third party tools you can use depending on your developing environment. I dont' have any personal experience with iOS platforms, but I'm assuming your game also runs on PC for testing. You may still get some decent information by profiling on PC. |
| |

|
| Prev 1 2 3 4 5 6 7 8 9 10 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 200 293 294 295 296 297 298 299 300 301 302 303 Next | | |
|
|
| |
|
Sidebar Settings...

|