Search found 76 matches

by PaperDuckyFTW
Fri May 21, 2010 10:54 pm
Forum: Programming Discussion
Topic: Small gap when landing in platform game
Replies: 8
Views: 619

Re: Small gap when landing in platform game

With the tile collision things, ive played around with the numbers, an example is the: bounds.y+bounds.h > y*32-1
Of btw, the bounds rect is the player rect.
by PaperDuckyFTW
Fri May 21, 2010 10:52 pm
Forum: Programming Discussion
Topic: Small gap when landing in platform game
Replies: 8
Views: 619

Re: Small gap when landing in platform game

Ok, here is the picture of the problem: http://i47.tinypic.com/2hx4n02.png Here is some code... //TILE COLLISION bool tile_collision() { for( int x = 0; x < 20; x++ ) { for( int y = 0; y < 20; y++ ) { if( map1[y][x] == 2 ) { if( ( bounds.x+bounds.w > x*32 ) && ( bounds.x < x*32+32 ) &&am...
by PaperDuckyFTW
Fri May 21, 2010 10:24 pm
Forum: Programming Discussion
Topic: Small gap when landing in platform game
Replies: 8
Views: 619

Small gap when landing in platform game

Good day to evarywun!!!!!!! As the title says, I've come across a cedundrum. In the platofrm game I am making, after implimenting tile based collision I implimented gravity and jumping. All three work fine-however when the player lands there is a small gap maybe 2-5 pixels in height, that is under t...
by PaperDuckyFTW
Wed May 12, 2010 4:48 am
Forum: Programming Discussion
Topic: Concepts behind platformererer
Replies: 5
Views: 561

Re: Concepts behind platformererer

yay!!! I was about to post a problem but my internet decided to cock up just before i prssed "submit" and yerr my message got erased =( But then i had a go at fixing the problem and its all better now ^.^ Thanks everyone for you're help and thanks for the bullet idea xiphirx, i just feel s...
by PaperDuckyFTW
Sun May 09, 2010 11:37 am
Forum: Programming Discussion
Topic: Concepts behind platformererer
Replies: 5
Views: 561

Concepts behind platformererer

Hi yall Can any of you graciously tell me or provide a link to somewhere discussing the concepts behind a platform game? All im in need of is gravity and jumping. You dont have to go full out with inertia or calculating gravity using that 9.8ms-2 whatever - just something that gets the job done. Oh ...
by PaperDuckyFTW
Wed Apr 28, 2010 5:47 am
Forum: Programming Discussion
Topic: Who wants a challenge?! <SDL/C++>
Replies: 2
Views: 456

Re: Who wants a challenge?! <SDL/C++>

Sorry, i meant i have an idea on how to make the map have collision.
by PaperDuckyFTW
Wed Apr 28, 2010 5:39 am
Forum: Programming Discussion
Topic: Who wants a challenge?! <SDL/C++>
Replies: 2
Views: 456

Who wants a challenge?! <SDL/C++>

Hiyah its that noob thats annoying and cant really use english good. That was a fail attempt at being funny. But yes, i am a noob and to some maybe annoying and sometimes i type inunderstandable things. The challenge to you if you chose to take it is tile cillision! Yep, its pretty much the same as ...
by PaperDuckyFTW
Fri Apr 16, 2010 4:12 am
Forum: Programming Discussion
Topic: PLEASE!! Tile map collision help!!! ( C++/SDL )
Replies: 12
Views: 2082

Re: PLEASE!! Tile map collision help!!! ( C++/SDL )

hi again. Sorry if this is annoying ot irritating or tme-consuming but i was wondering if anyone could post a link to a tile map tutorial site, or file with tile map code or somehitng discussing the conceptss beind it. thanks if anyone can =-]
by PaperDuckyFTW
Thu Apr 15, 2010 6:53 am
Forum: Programming Discussion
Topic: "Identifier not found" C++ SDL. Help please?
Replies: 7
Views: 1228

Re: "Identifier not found" C++ SDL. Help please?

Hey man thanks for your reply. Your 1 Billion % right. Functions.h and tile.h both include each other and i thought this might be a problem but wasnt to sure. I'll knuckle down and think of how i can make either one included without the other. Yerr, ill try and fix it, sorry if that previous sentanc...
by PaperDuckyFTW
Wed Apr 14, 2010 11:12 pm
Forum: Programming Discussion
Topic: "Identifier not found" C++ SDL. Help please?
Replies: 7
Views: 1228

Re: "Identifier not found" C++ SDL. Help please?

okay heres the functions in the functions.h file that arent woking in the tile class void draw_surface( int x, int y, SDL_Surface* source, SDL_Surface* destination, SDL_Rect* clip = NULL ) { SDL_Rect pos; pos.x = x; pos.y = y; SDL_BlitSurface( source, clip, destination, &pos ); } bool check_coll...
by PaperDuckyFTW
Wed Apr 14, 2010 5:49 am
Forum: Programming Discussion
Topic: "Identifier not found" C++ SDL. Help please?
Replies: 7
Views: 1228

Re: "Identifier not found" C++ SDL. Help please?

thanks for your reply and sure. oh the draw_surface function is exactly the same as the apply_surfae, but i prefer it as draw because i dont think of it as applying, and i would refer to it as drawing heres the parts of the ode thats cocking up. The errors are both in the tile class file. void Tile:...
by PaperDuckyFTW
Wed Apr 14, 2010 3:42 am
Forum: Programming Discussion
Topic: "Identifier not found" C++ SDL. Help please?
Replies: 7
Views: 1228

"Identifier not found" C++ SDL. Help please?

Heya *waves spastically* A few weeks ago i made a topic asking help on a tile map system. I couldnt get any collision working so i decided jsut to go the hard way and impliment Lazy Foo's tilemap from his tutorial. So far my computer hasnt exploded so thats a good thing, but when i build it i get 2 ...
by PaperDuckyFTW
Mon Apr 05, 2010 2:23 am
Forum: Programming Discussion
Topic: PLEASE!! Tile map collision help!!! ( C++/SDL )
Replies: 12
Views: 2082

Re: PLEASE!! Tile map collision help!!! ( C++/SDL )

hi again i dont know what im donig wrong but i impliment both but the collision didnt work, i can still just walk through them. I have no clue as what to do to make the tiles collidable im completely stumped. I place your IsCollidable code before drawing the tiles, after drawing the tiles, after and...
by PaperDuckyFTW
Sat Apr 03, 2010 11:40 am
Forum: Programming Discussion
Topic: PLEASE!! Tile map collision help!!! ( C++/SDL )
Replies: 12
Views: 2082

Re: PLEASE!! Tile map collision help!!! ( C++/SDL )

okay thenks for your help =D i was born with a rare disease call dumbassretard disease and need some help deciphering the code. I understand the concept but i just dont understand the values. bool Player::IsCollision(int tile_x, int tile_y) { if(x < tile_x) return false; if(x+w < tile_x+32) return f...
by PaperDuckyFTW
Sat Apr 03, 2010 9:36 am
Forum: Programming Discussion
Topic: PLEASE!! Tile map collision help!!! ( C++/SDL )
Replies: 12
Views: 2082

Re: PLEASE!! Tile map collision help!!! ( C++/SDL )

oh sorry bout that, its a one dimensional array something like this: for example map[5][5] = { { 0, 0, 0, 0, 0 } { 0, 0, 1, 1, 0 } { 0, 1, 1, 1, 0 } { 1, 0, 1, 0, 1 } { 0, 1, 1, 1, 0 } }; And the loop just checks to see if there is a '0' in it, draw sky and it shere is a '1' in it, draw a brick. Can...