Jump to content

  • Log In with Google      Sign In   
  • Create Account


DarkHorseKnight

Member Since 11 Jul 2011
Offline Last Active Nov 20 2012 11:34 AM

#4996851 Left over garbage pixels from copying a pixel value to new location? C/SDL

Posted by DarkHorseKnight on 03 November 2012 - 07:40 AM

bump


#4942460 How can I track the mouse cursor position and then draw a line ?

Posted by DarkHorseKnight on 23 May 2012 - 01:23 AM

Dude my code is messed up because I leave stuff that I can in my code so I can come back to it later and my program flow is fine I can render 3d models to the screen and rotate the camera around with np and see them. I even coloured the models with no tex cords for fun and got this really cool model texture effect. Posted Image

I was asking how to draw a line under the mouse cursor not a course of fixing my so called problems ??? that were needed enforcements for my ease of use. Some people prefer less stuff. I prefer more stuff Posted Image .

but good advice for someone who needs that :)


#4938442 Beginner's Problem with SDL in C++

Posted by DarkHorseKnight on 08 May 2012 - 11:48 AM

Basically you needed a while loop so the program is continous for ever until done is equal to true:

#undef main
#include <SDL/SDL.h>
int main( int argc, char **argv[] )
{
	bool done = false;

	SDL_Surface* hello = NULL;
	SDL_Surface* screen = NULL;

	SDL_Init( SDL_INIT_EVERYTHING );
	
	screen = SDL_SetVideoMode( 640, 480, 32, SDL_SWSURFACE );

	hello = SDL_LoadBMP( "hello.bmp" );

	SDL_Event event;

while(!done)
		 {

		SDL_BlitSurface( hello, NULL, screen, NULL );

		  while(SDL_PollEvent(&event))
				   {
					 switch(event.type)
								{

									case SDL_QUIT:
									return 0;
									break;

									  }

					 }

				SDL_Flip( screen );

			}
	  return 0;
}

Hopefully this works Posted Image

Here is a pastebin link

http://pastebin.com/bJSx40g5


EDIT:

and about cin and cout you need to #undef main at the top of your main.cpp and "remove linker flag -lSDLmain in your IDE linker settings"


#4930638 OpenGL .obj Parser/Rendering Problem Really Really Need Help!

Posted by DarkHorseKnight on 12 April 2012 - 12:38 PM

no luck nevermind


#4929172 is there a way to functionize this code? SDL

Posted by DarkHorseKnight on 07 April 2012 - 04:24 PM

fekoekfe


#4927915 Starting in Python: best graphics module?

Posted by DarkHorseKnight on 03 April 2012 - 10:33 AM

that teacher is an asshole I'm on jbadams side on this


#4911063 Animation is a blight and I can't figure it out ! help :(

Posted by DarkHorseKnight on 08 February 2012 - 03:08 PM

The timer declaration is just a int timer = 0; at the top of the cpp file as simple as that Posted Image and timer++ is not in a function.


#4908948 Where to start? C++/SDL/OpenGL?

Posted by DarkHorseKnight on 02 February 2012 - 07:17 PM

Don't like the fact that I should be ignored because people like you destroy my way of learning quite frankly and everything I said was truthfull so don't know where your going at???

I was wrong on the WIN32 API and MSVC++ stuff tho so you have me there got a realization problem :(


#4908759 Where to start? C++/SDL/OpenGL?

Posted by DarkHorseKnight on 02 February 2012 - 10:38 AM

pygame is tash but fun for simplisty


#4908755 Where to start? C++/SDL/OpenGL?

Posted by DarkHorseKnight on 02 February 2012 - 10:34 AM

For starting procedures of programming I would say go for the fastest language now that would be Binary/X86 Assembly but all in all most people in todays walks of life like most indie game companys/game companys Use C++ Programming Language for the speed and then use OpenGL for Cross Platform 3D Rendering,etc and SDL For Window Management.


There is other alternatives like using Win32 API ,QT Creator Kit ,freeGlut for Window Managements but I would personally guide you towards C++,SDL,OpenGL and to start you off in the right direction go for Lazy Foo Tutorials for SDL education and OpenGL your going to have to spam google and search through books and beg on irc if you want to learn anything its rather difficult otherwise for C++ learning watch thenewboston tutorials in C++ Posted Image

Hope this helps

for an IDE use Code::Blocks or Microsoft Visual Studio 2010 express free edition for C++


#4903376 Looking for a good language/API for website game/app.

Posted by DarkHorseKnight on 16 January 2012 - 03:14 PM

Java ftw ! Posted Image you can get the SDK from the java website here http://javadl.sun.co...?BundleId=58134 and then you can use the IDE Eclipse which you can get here http://www.eclipse.org/

the speeds on java are dam good but still not as good as C++ but its good anuff for what you want : )

and really javas your only choice that I know of unless you can embed C++ applications onto a website

could do it in flash : ) and ActionScript

download Adobe CS5 Flash and start coding in notepad++ http://notepad-plus-plus.org/


PARTNERS