Search found 160 matches
- Tue May 11, 2010 5:44 am
- Forum: Programming Discussion
- Topic: error with switch statement
- Replies: 9
- Views: 591
Re: error with switch statement
Actually both versions are valid switch statements. Oh really? I had no idea, never seen that before. { and } just indicate a block, which is pretty much any piece of code with its own scope. So his code is syntactically valid, except for the case STATE_TITLE: line, because that gets preprocessed t...
- Tue May 11, 2010 5:32 am
- Forum: Programming Discussion
- Topic: Removing glow around pictures
- Replies: 24
- Views: 1807
Re: Removing glow around pictures
Yes, but using alpha colors will be slow as hell compared to colorkeying. Oh you musta been using SDL_HWSURFACE and other hw accelerated stuff... I forgot SDL had that ;) I think you two are talking about 2 different things. What K-Bal is doing is using PNG's that already have part of the image tra...
- Sun May 09, 2010 5:44 pm
- Forum: Programming Discussion
- Topic: Drawing items to the screen with scrolling
- Replies: 3
- Views: 420
Re: Drawing items to the screen with scrolling
It sounds like there's a signed int in there somewhere.
- Sat May 08, 2010 6:54 pm
- Forum: Programming Discussion
- Topic: Dilemma with SDL screen surface
- Replies: 7
- Views: 706
Re: Dilemma with SDL screen surface
You don't even need to have an SDL_Surface for the screen. All you have to do is when you initialize the screen, do "SDL_SetVideoMode(args);" then when you want access to the screen, you do "SDL_GetVideoSurface();"
- Wed May 05, 2010 3:53 pm
- Forum: Programming Discussion
- Topic: VC++ 2010 Express Release Problem
- Replies: 22
- Views: 1376
Re: VC++ 2010 Express Release Problem
I've had issues with VS2010 as well. I'd move back to 2008.
- Sun May 02, 2010 5:41 pm
- Forum: Programming Discussion
- Topic: Questions on Using Lua in my Engine
- Replies: 16
- Views: 1037
Re: Questions on Using Lua in my Engine
[quote="LeonBlade"] Also, I'm currently creating static functions for the lua scripts, example: lua_register(L, "CreateSprite", CreateSprite_Lua); int CreateSprite_Lua(lua_State *L) { // code goes here } Why don't you use toLua++? It should be able to handle anything you want.
- Sat May 01, 2010 6:14 pm
- Forum: Programming Discussion
- Topic: coding improvement
- Replies: 13
- Views: 1219
Re: coding improvement
I think you shouldn't free the buffer because it is managed by SDL and SDL might try to free the buffer after you've freed it, which would cause a segmentation fault. The segmentation fault that you're getting from freeing the surfaces means that you're trying to access those surfaces after they're ...
- Sat May 01, 2010 5:56 pm
- Forum: Programming Discussion
- Topic: coding improvement
- Replies: 13
- Views: 1219
Re: coding improvement
You free the surface when you don't need it anymore.
- Wed Apr 28, 2010 12:43 pm
- Forum: Programming Discussion
- Topic: Separating Axis Theorem For The Rest Of Us.
- Replies: 11
- Views: 6110
Re: Separating Axis Theorem For The Rest Of Us.
I found another tutorial. From what I've read so far, it seems to explain SAT pretty good. I was totally lost before reading this. Now I understand a bit more.
- Tue Apr 27, 2010 2:38 pm
- Forum: Programming Discussion
- Topic: SDL drawing to screen
- Replies: 3
- Views: 444
Re: SDL drawing to screen
Why don't you just do this?
Code: Select all
SDL_Rect area = {0, 0, 100, 100};
SDL_FillRect(buffer, area, 0xAAAAAA);
- Tue Apr 27, 2010 8:00 am
- Forum: Programming Discussion
- Topic: What does this code mean?
- Replies: 3
- Views: 399
Re: What does this code mean?
You should really learn to use google. So far, almost everything that you've asked about would be easily answerable using google. To answer your question, it fills in an SDL_Rect with the color that you tell it to. The first argument tells it where to fill in the rectangle. The second argument tells...
- Tue Apr 20, 2010 2:54 pm
- Forum: Game Development
- Topic: Your ideal free game development environment
- Replies: 23
- Views: 2525
Re: Your ideal free game development environment
Compiler/IDE: MS VS 2008 Express (going to get 2010) Don't get 2010, stick with the solid 2008 version imo ;) I have 2010 pro, got it the other day from msdnaa and i really like it so far, theres some really nice features. Don't be put off getting it ;) Unless they fixed it, SFML doesn't like 2010....
- Mon Apr 12, 2010 9:28 am
- Forum: Game Development
- Topic: Blade Brothers Engine: Creating my first 2D Game Engine
- Replies: 272
- Views: 37923
Re: Blade Brothers Engine: Creating my first 2D Game Engine
What's inflexible about it? you have drop-in OpenGL any-time, I believe it's made upon OGL. You have access to shaders. You wouldn't be doing much more if you did it in 2D OGL. You can always use bass if you really need to instead of the audio, but from what I've seen its good enough. I've never lo...
- Sun Apr 11, 2010 6:23 pm
- Forum: Game Development
- Topic: Blade Brothers Engine: Creating my first 2D Game Engine
- Replies: 272
- Views: 37923
Re: Blade Brothers Engine: Creating my first 2D Game Engine
Binary. Seriously though, I guess I meant "inflexible." I need to be more precise with my words.
- Sun Apr 11, 2010 6:20 pm
- Forum: Programming Discussion
- Topic: Issue with SFML
- Replies: 12
- Views: 1152
Re: Issue with SFML
Did you add "sfml-window-d.lib" to your linker?