Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

1076012 Posts in 44157 Topics- by 36123 Members - Latest Member: gas13

December 30, 2014, 01:23:38 AM
  Show Posts
Pages: 1 ... 19 20 [21] 22 23 ... 93
401  Developer / Technical / Re: The grumpy old programmer room on: July 11, 2011, 08:31:30 PM
Edit: Uhhh.... it fixed itself after restarting the computer.
That's terrifying
402  Developer / Technical / Re: The grumpy old programmer room on: July 11, 2011, 08:15:53 PM
Chris* points out:

Quote
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:
Code:
unsigned char grid[MAX_GRID][MAX_GRID];
unsigned char solidGrid[MAX_GRID][MAX_GRID];

Code that works:
Code:
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:
Code:
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! Hand Knife Right Evil Hand Knife Right

edit:
It seems to always crash when i = 1 and j = 2040  Screamy
Just out of curiosity... what happens if you do


Code:
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;
    }
}
404  Player / General / Re: What are your favorite bees? on: July 11, 2011, 08:02:34 PM
I don't really like bees.
405  Developer / Technical / Re: The grumpy old programmer room on: July 11, 2011, 06:26:18 PM
Hm, that is extremely interesting, however, there's little chance I'm going to install XCode 4 again :|
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!
407  Developer / Technical / Re: The grumpy old programmer room on: July 10, 2011, 03:42:31 PM
Really I just want lambdas and "auto".
408  Developer / Technical / Re: The grumpy old programmer room on: July 10, 2011, 02:53:02 PM
The urge to start using C++0x is becoming uncontrollable

But, portability
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.
415  Player / Games / Re: My Little Pony on: July 09, 2011, 10:31:28 PM
So does this work as just a general thread for games about My Little Pony: Friendship is Magic?

Because if so, there's this:

http://jayisgames.com/games/friendship-is-magic-story-of-the-blanks/

It is very An Indie Game.
416  Developer / Technical / Re: A few questions about making 2D games on: July 09, 2011, 08:47:22 AM
OpenGL is very "low level" so CW is it's better to use systems built on top of OpenGL (like sfml) rather than using OpenGL directly.
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).
419  Community / Jams & Events / Re: SF/Bay Area get together 5! [Sun. July 10th] on: July 07, 2011, 07:25:43 PM
I'm sorry, I won't be making it to this one after all. See you guys next time though!
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.
Pages: 1 ... 19 20 [21] 22 23 ... 93
Theme orange-lt created by panic