Search found 18 matches

by fryz
Sun Aug 29, 2010 11:38 am
Forum: Game Development
Topic: Where to use classes, when creating games (newbie here)?
Replies: 8
Views: 1808

Re: Where to use classes, when creating games (newbie here)?

Okay, so basically you can write functions (declaring cariables and doing calculations) and simple variables to classes. If you'd write them to a class, you could use it just at some specific points, and easier, multiple times. That sounds nice. However, i have a question about those public and priv...
by fryz
Sun Aug 29, 2010 8:15 am
Forum: Game Development
Topic: Where to use classes, when creating games (newbie here)?
Replies: 8
Views: 1808

Where to use classes, when creating games (newbie here)?

I was reading about classes and reading... They are like defining variables. Like: class var { int armor = 100; int hp = 100; }; is equivalent to: int main() { int armor = 100; int hp = 100; } So what's the point of using classes at all? Or there's some another usage or something to make the code ea...
by fryz
Mon Aug 02, 2010 4:06 pm
Forum: Programming Discussion
Topic: Tile maps collision detection on top-down view. C++/Allegro.
Replies: 9
Views: 1851

Re: Tile maps collision detection on top-down view. C++/Allegro.

I think this might be the thing: http://alleg.sourceforge.net/stabledocs/en/alleg006.html#set_keyboard_rate But there aren't even a single explanation or example how to use it. Tried using it like a function, might define something, but no effect, also like a variable... Anyway, going to try the col...
by fryz
Mon Aug 02, 2010 2:08 pm
Forum: Art, Music, and Design
Topic: Any websites of free 2D images? I'm bad at PS...
Replies: 12
Views: 3959

Re: Any websites of free 2D images? I'm bad at PS...

Nice, thanks. And congratulations on your 1024th post, lol.
by fryz
Mon Aug 02, 2010 1:00 pm
Forum: Programming Discussion
Topic: Allegro help needed.
Replies: 10
Views: 1507

Re: Allegro help needed.

Okay, thanks for explanation, but anyway, how i understand this, is like i did before with the ball. Except i did it now in more efficient and controllable way, because this explanation has gave me a lot of ideas, about the gameplay and game features too. The ball is faster now. Working perfectly. A...
by fryz
Mon Aug 02, 2010 7:35 am
Forum: Programming Discussion
Topic: Tile maps collision detection on top-down view. C++/Allegro.
Replies: 9
Views: 1851

Re: Tile maps collision detection on top-down view. C++/Allegro.

Okay, thanks for the explanations, very nicely done, explained a lot, give me a few nice ideas how to do other, related stuff. But now i have tried to do that thing i was talking in the last post, tile movement: My tile size is 32px. When i write the code like this: if(key[KEY_DOWN]) { player_y = pl...
by fryz
Sun Aug 01, 2010 2:06 pm
Forum: Programming Discussion
Topic: Allegro help needed.
Replies: 10
Views: 1507

Re: Allegro help needed.

Aha, thanks for the explanation. So now as i see the code, it is like DeltaX and DeltaY is the number, by which the ball advances, speed of the ball. But i still don't get the code at this point: how to use that advancement, speed? I currently figured the collision out and made the speed this way: b...
by fryz
Sun Aug 01, 2010 1:58 pm
Forum: Programming Discussion
Topic: Tile maps collision detection on top-down view. C++/Allegro.
Replies: 9
Views: 1851

Re: Tile maps collision detection on top-down view. C++/Allegro.

Thanks for your explanation. So basically i understand the principle of tile collision yea, but how to do it i'm not sure: Check on what number in the map array player steps, and if it is (let's say the normal walkable ground is 0 and the wall is 1 for simplicity) 1, then just do nothing. Leave an e...
by fryz
Sun Aug 01, 2010 12:48 pm
Forum: Programming Discussion
Topic: Allegro help needed.
Replies: 10
Views: 1507

Re: Allegro help needed.

Hi. Sorry, i was busy for the past few days, as i wrote in the last post, now i can get back to programming, i think. So anyway, let me make sure, that i got it right, the code you gave me: int x; //ball's x. int y; // ball's y. int deltaX; // pong's x. int deltaY; // pong's y. int radius; // not su...
by fryz
Sun Aug 01, 2010 12:12 pm
Forum: Art, Music, and Design
Topic: Any websites of free 2D images? I'm bad at PS...
Replies: 12
Views: 3959

Re: Any websites of free 2D images? I'm bad at PS...

Thanks, that site looks pretty nice, a lot of nice sprites over there. :)
by fryz
Sun Aug 01, 2010 12:11 pm
Forum: Programming Discussion
Topic: Tile maps collision detection on top-down view. C++/Allegro.
Replies: 9
Views: 1851

Re: Tile maps collision detection on top-down view. C++/Allegro.

Hi. Sorry, i was very busy with other things past few days, looks like it's almost done (not programming), so it looks like i can be back to programming stuff. :) I'm doing pixel movement. But actually tile movement is quite a good idea for such a game, haven't even thought of "tile movement&qu...
by fryz
Sat Jul 24, 2010 3:55 pm
Forum: Programming Discussion
Topic: Tile maps collision detection on top-down view. C++/Allegro.
Replies: 9
Views: 1851

Tile maps collision detection on top-down view. C++/Allegro.

Hi everybody! I am again confused about some things. I don't actually know how to make tile maps detect, if you are entering in a forbidden tile! I think about it this way: You go trough road tiles (let's say array image number 1). If you enter array image number two, i are stopped, as it detects co...
by fryz
Sat Jul 24, 2010 3:51 pm
Forum: Art, Music, and Design
Topic: Any websites of free 2D images? I'm bad at PS...
Replies: 12
Views: 3959

Re: Any websites of free 2D images? I'm bad at PS...

Yea, i've searched, couldn't find many sprites, that's why i posted on these forums. :) Ummm, no competitions here, i'm a learning guy, who's very new at programming still. Especially Allegro, hehe. :) Currently was creating a snake clone, but i couldn't find any snakes from top-side, so i went to s...
by fryz
Sat Jul 24, 2010 3:35 pm
Forum: Art, Music, and Design
Topic: Any websites of free 2D images? I'm bad at PS...
Replies: 12
Views: 3959

Re: Any websites of free 2D images? I'm bad at PS...

Thanks, i found these fitable for the project, as i couldn't find anything better: http://openart.moosader.com/assets/imag ... ngDood.png.
by fryz
Sat Jul 24, 2010 3:05 pm
Forum: Art, Music, and Design
Topic: Any websites of free 2D images? I'm bad at PS...
Replies: 12
Views: 3959

Any websites of free 2D images? I'm bad at PS...

Hi everyone. I was looking for some nice sprites, for 2D games... Especially the games, where the view is from 'up' side. Like RPG games are. I couldn't find any that style of sprites. Though a lot of Side view sprites. So since i'm very bad on drawing things, is there any nice websites of those fre...