• Advertisement

thugkilla

Member
  • Content count

    79
  • Joined

  • Last visited

Community Reputation

138 Neutral

About thugkilla

  • Rank
    Member
  1. SDL Animation?

    Hello everyone, I'am using SDL to work on a game. I'am not expected to finish it I just want to use it to learn from practice. Ok so I have arrive to the point where I have to use animation. I'am kind of stuck on how I should do it.The Sprite sheet I'am using is 128 by 192 and its a basic 4 by 4 sprite sheet for walking having up,down,left,and right with backround color black. Any ideas on how to do it?
  2. Hello again everyone i decided to make a thread on what programming books you have and how you would rate them. Here are mine(big list for me). -C by Example(3.5/5) Good source if you are trying to learn C for beggininers in my opinion. -Multiplayer Game Programming.(4/5) Very good book ,good examples , very good writing style makes me want to keep reading. -OpenGl SuperBible 3rd Addition(5/5) Very good book one of my favorites ,sadly I cant find time to read it =( -Focus on SDL-(5/5)- Probable the best SDL Reference I have seen it doesn't go deeply into the game programming itself such as animation and all , but none the less is one of my favorites. -Beginning C# Game Programming (3/5)Just bought this today so far so good. -Game Programming All in one 2nd edition(5/5) Even though I don't use Allegro anymore I still find this an excellant source this book showed me how a game was made and how it works. -Beggining C++ Game Programming (5/5) Perfecet beginning C++ source. -C++ Primer Plus (4/5) Its a good Problem Solver not something you would want to reading as a book.
  3. If I was you I would narrow it down to this. Even this is a whole lot. If you knew all this you would be a programmer God in my opionin. By the way just memorizing functions from a book and reciting them isn't enough you need to be able to put them into action. Mess with them alittle, add your own features. Java C# C++ DirectX 10 3D Studio Max Linux Networking OpenGL D3D [redundant, same as Direct3D] STL AI (Developement)
  4. Visual Basic keep going or stop?

    Just slips out I guess. Some questions about C# does it have any other libraries except Direct X managed? C# does it have network functions and all integrated in? Is there any other Compiler Besides the Microsoft Compilers something more simple? Basically thats all.
  5. Visual Basic keep going or stop?

    Thanks for the information guys I have decided to return this book and get one on C#. For C++ I'am a pretty good programmer I have been at it for maybe 2 years or so. I consider myself a novice for C++.
  6. Hello everyone recently I have bought a programming book on Visual Basics 6 called "Visual Basics 6 For Dummies". I was wondering should I keep going or return the book and buy something else ? Basically these are my decisions Should I just keep going on with C++ and get into OpenGl Because I'am familar with SDL as well or should I spread my variety and learn Visual Basics?
  7. Memory Allocation?

    Thanks guys that was an excellant explanation.I understand now.=) @Vodka:I don't really have a source code right now.I'am just trying to get the point of memory allocation.
  8. Memory Allocation?

    Yes,I'am talking about new and delete.I just don't get why they are used and when during a game.
  9. Memory Allocation?

    Ok,Heres the thing I get how to use memory allocation,but I don't understand when and why I would use it in a game.An example would be helpful or a tutorial
  10. OpenGl with glut or SDL?

    Hi guys again I know C++ pretty well and I know SDL okay.I got a book on OpenGl and I want to start it soon and I'am thinking should I use Glut or SDL with OpenGL?I want some opinons to help me make up my mind.
  11. Check out Chronoxdesign

    http://chronoxdesign.com/ Check it out our site tell us what you think and visit da forum if you are bored
  12. More SDL problems....

    Thanks man.
  13. More SDL problems....

    #include <SDL/SDL.h> #include <cstdlib> const int screenwidth=640; const int screenheight=480; SDL_Surface* Displaysurface=NULL; SDL_Surface* aliensurface=NULL; SDL_Rect srect,drect; SDL_Event move,quit; int speed; int main(int argc,char*argv[]) { SDL_Init(SDL_INIT_VIDEO); Displaysurface=SDL_SetVideoMode(screenwidth,screenheight,0,SDL_ANYFORMAT); aliensurface=SDL_LoadBMP("alien.bmp"); srect.w=drect.w=aliensurface->w; srect.h=drect.h=Displaysurface->h; drect.y=100; drect.x=100; speed=5; Uint32 color; color=SDL_MapRGB(aliensurface->format,255,0,255); SDL_SetColorKey(aliensurface,SDL_SRCCOLORKEY,color); Uint8* keys; SDL_Event event; keys = SDL_GetKeyState(NULL); for(;;) { SDL_BlitSurface(aliensurface,&srect,Displaysurface,&drect); SDL_UpdateRect(Displaysurface,0,0,0,0); while (SDL_PollEvent(&event) ){ if ( event.type == SDL_QUIT ) { return 1; } if ( event.key.keysym.sym == SDLK_ESCAPE ) { return 1; } if(event.key.keysym.sym==SDLK_DOWN &&event.type==SDL_KEYDOWN) drect.y+=speed;} } return 0; } I cant get da alien to move while da button is down and it is the down button.It movez once and stops.
  14. Moving my Alien around

    There are no errors ,but I cant figure out how to move my alien around here is my source #include "SDL/SDL.h"; #include <cstdlib>; const int screenwidth=640; const int screenheight=480; SDL_Surface* Displaysurface=NULL; SDL_Surface* aliensurface=NULL; SDL_Rect srect,drect; SDL_Event move,quit; int main(int argc,char*argv[]) { SDL_Init(SDL_INIT_VIDEO); Displaysurface=SDL_SetVideoMode(screenwidth,screenheight,0,SDL_ANYFORMAT); aliensurface=SDL_LoadBMP("alien.bmp"); srect.w=drect.w=aliensurface->w; srect.h=drect.h=Displaysurface->h; drect.y=100; drect.x=100; Uint32 color; color=SDL_MapRGB(aliensurface->format,255,0,255); SDL_SetColorKey(aliensurface,SDL_SRCCOLORKEY,color); for(;;) { SDL_BlitSurface(aliensurface,&srect,Displaysurface,&drect); SDL_UpdateRect(Displaysurface,0,0,0,0); if(SDL_PollEvent(&move)==SDLK_DOWN) { --drect.y; } } return 0; }
  15. #include SDL/SDL.h; #include "stats.h" int main() { SDL_Init(SDL_INIT_VIDEO); return 0; } #ifndef STATS_H_ #define STATS_H_ struct stats { int x,y; int health; enum mode { dead, alive, shootin }; }; #endif I get these errors still. Compiler: Default compiler Building Makefile: "C:\Dev-Cpp\Makefile.win" Executing make... make.exe -f "C:\Dev-Cpp\Makefile.win" all g++.exe Untitled1.o Project1_private.res -o "Project1.exe" -L"C:/Dev-Cpp/lib" -mwindows -lmingw32 -lSDLmain -lSDL C:/Dev-Cpp/lib/libSDLmain.a(SDL_win32_main.o)(.text+0x39c): In function `console_main': /home/hercules/public_cvs/SDL12/src/main/win32/SDL_win32_main.c:249: undefined reference to `SDL_main' collect2: ld returned 1 exit status make.exe: *** [Project1.exe] Error 1 Execution terminated
  • Advertisement