|
402
|
Developer / Technical / Re: The grumpy old programmer room
|
on: July 11, 2011, 08:15:53 PM
|
Chris* points out: the only thing i can think of is that the two lines declaring grid and solidGrid may be declaring them on the stack together they're 8 MB of data might be blowing the stack right? I think he's actually got it-- you say this is part of a class definition? Where and how is the object declared? If it's declared statically (on the stack), most compilers will place sort of a limit on valid stack space; maybe "grid" is within the valid limit but solidGrid manages to barely pass outside it. Try: - Allocating the object dynamically (with new) rather than statically - Adjusting your compiler settings to increase the amount of allowed stack * He's this guy, you don't know him. He's pretty cool
|
|
|
|
|
403
|
Developer / Technical / Re: The grumpy old programmer room
|
on: July 11, 2011, 08:13:11 PM
|
MAX_GRID is #define'd to be 2048 Class definition header: unsigned char grid[MAX_GRID][MAX_GRID]; unsigned char solidGrid[MAX_GRID][MAX_GRID]; Code that works: for(unsigned int i=0;i<MAX_GRID;i++) for(unsigned int j=0;j<MAX_GRID;j++) grid[i][j] = 0;
Code that crashes: for(unsigned int i=0;i<MAX_GRID;i++) for(unsigned int j=0;j<MAX_GRID;j++) solidGrid[i][j] = grid[i][j] = 0;
EXC_BAD_ACCESS! edit:It seems to always crash when i = 1 and j = 2040  Just out of curiosity... what happens if you do for(unsigned int i=0;i<MAX_GRID;i++) { for(unsigned int j=0;j<MAX_GRID;j++) { grid[i][j] = 0; solidGrid[i][j] = 0; } }
|
|
|
|
|
406
|
Developer / Technical / Re: Auto-indenters
|
on: July 10, 2011, 04:41:58 PM
|
I would really have to look more closely in vim manual, though I think this could be possible by using some addon.
No addons needed, just: ggVG= (gg goes to the top of the file, V enters visual (select) mode, G selects to the end of the file, and = does the indentation). <3 vim That works perfectly, but is terrifying!
|
|
|
|
|
409
|
Developer / Technical / Re: Auto-indenters
|
on: July 10, 2011, 12:56:08 PM
|
rivon thanks. In emacs you just make sure the right major-mode is active (major-modes essentially say what language you're using. If you have the right extension .c, .cpp, .xml, etc you don't have to worry about it much), then you select all the code (Cx-h) and press <tab>.
Hm. Please excuse the stupid questions but... So I open the file in emacs. At the bottom it says "Java/l Abbrev" which I assume means it got the right major mode. I type control-x, then I type h. It says: "Mark set" Then I press tab. Nothing happens. Did I do something wrong?
|
|
|
|
|
410
|
Developer / Technical / Re: Auto-indenters
|
on: July 10, 2011, 12:47:25 PM
|
|
I want it to throw out all the whitespace and replace it with new whitespace as appropriate for human readability and the language of the current file
|
|
|
|
|
411
|
Developer / Technical / Re: Auto-indenters
|
on: July 10, 2011, 12:32:40 PM
|
|
What would be the auto-indent command and/or addon to invoke for emacs/vim?
I shall choose to treat emacs as less heavyweight than Eclipse/Windows
|
|
|
|
|
412
|
Developer / Technical / Auto-indenters
|
on: July 10, 2011, 12:01:04 PM
|
|
So sometimes I feel like it would be nice to have a script or a program or something that would take a source file and auto-indent it.
There is this "indent" command line tool on the computer already but it has really weird rules and does not understand things such as Java.
Any advice?
An optimal solution would not require me to boot up any especially heavyweight support software like Eclipse or Microsoft Windows just to run it.
|
|
|
|
|
413
|
Developer / Design / Re: What worlds should I insert?
|
on: July 10, 2011, 09:08:16 AM
|
|
- Burning Man Festival - Interior and/or surface of Io - The human vascular system - Burmese rice paddy - Urban Afghanistan, occupied by martians, their organic machinery growing over everything in the vicinity of the bases gradually like plants, occasionally accidentally nabbing and gradually enclosing unwary human/animal passerby who are slowly incorporated into the framework
|
|
|
|
|
414
|
Developer / Design / Re: Logo screens
|
on: July 10, 2011, 09:03:15 AM
|
somewhat related: what is you guys' opinion on title screens
lately i've been thinking title screens are bad and the game should just start, right into the action, without a title screen, at least the first time you play (blueberry garden did this, as did most atari 2600 games)
but that has the problem in that you can't adjust the game options (since usually the options are on the title menu) before you begin the game
nonetheless the idea of starting right in the game without a title screen when you double click a game's icon appeals to me, and i wish there were a way to do it feasibly
This is something I also keep wanting to move toward but am never quite sure how. One way around the specific "options" problem though could be, when the game starts a little floater in the corner of the screen fades in saying "click here for options" or "F1 for options" and then it disappears if you walk four feet or something.
|
|
|
|
|
417
|
Developer / Business / Re: Your biggest traffic sources
|
on: July 08, 2011, 10:43:29 PM
|
|
I don't even have this information. I just have tons of old apache logs, some of which I may have lost or got eaten by a rotator or configuration error something. :sad:
I really need to set something up that will regularly munch my apache logs and spit out nice formatted data.
|
|
|
|
|
418
|
Developer / Technical / Re: FBO on ATI vs Nvidia
|
on: July 08, 2011, 09:43:30 PM
|
Would it make sense if the problem was caused by me not setting the min and mag filters of the empty texture I created?
Let me put it like this. If that turned out to be the problem, I would not be even the littlest bit surprised. I would highly suggest against using glCopyTexSubImage2D if it is avoidable, I'm sure it will murder your performance on some machines (although having it as a fallback for machines that don't support FBOs-- they really do exist!-- might be nice).
|
|
|
|
|
420
|
Developer / Technical / Re: The happy programmer room
|
on: July 05, 2011, 09:35:34 PM
|
|
In order to debug a program that crashed on windows, repeatedly added fprintfs throughout the entire program, each time rebuilding and sftping to a windows machine, until I found the exact line it was crashing on. When I found that exact line I found a small bug in Polycode. Hah! Well that's satisfying.
|
|
|
|
|