![]() |
|
How to start an RPG game |
thirdy
Member #8,409
March 2007
![]() |
Hi! I'm a newbie, last sem, I had C programming class then started making games + allegro, and I manage to make a simple RPG and posted in the depot. Right now, we have java but I got dissapointed because java is soo sloow. Now I'm back to C to make another RPG game, search posts about rpg's and collision detections(w/c I didn't do b4). And I found this list of stuffs for programming an RPG game.
Any recommendations where can I find these tools and libs? how to's and tutorials? |
TeamTerradactyl
Member #7,733
September 2006
![]() |
thirdy: This list that you posted: is it what was recommended or required by your teacher/professor, or is this just something you wanted to do yourself? I would start with someone else's tilemap. You can get your game built and working, and at least know that it's drawing to screen correctly. Then you'll need to modify the tilemap so it's your own later so you're not just ripping off someone else's work. You can do collision detection with tiles in a few different ways. The two more common approaches are: My personal favorite is the latter for both side-scrollers and top-down games. For the image drawing/painting, check out some of the discussions on "good tile editors" here.
|
spellcaster
Member #1,493
September 2001
![]() |
I'd suggest that you start with a roguelike game. http://en.wikipedia.org/wiki/Roguelike I know that's not what you had in mind, but it's a task you can actually complete -- |
gnolam
Member #2,030
March 2002
![]() |
Short answer: you code them yourself. Slightly longer answer: you won't find libraries for all that (as that would, in fact, make a complete game sans the content). So you find libraries for the most difficult or tedious tasks and code the rest yourself. The answer you don't want: this project looks like it might be over your head. Try starting with something simpler, like, say, a Tetris clone. -- |
Paul whoknows
Member #5,081
September 2004
![]() |
Begin with these, in this order: 1 : Sprite Animation manager. Handles drawing and animating sprites. 2 : Tilemap manager. Handles drawing the tilemap. 3 : Basic collision detection. Collision detection between sprites and the tiles. After you finish those, come back again. ____ "The unlimited potential has been replaced by the concrete reality of what I programmed today." - Jordan Mechner. |
Jonatan Hedborg
Member #4,886
July 2004
![]() |
A simple text-based RPG could be a good start. It can have all the parts of a regular RPG (story, character-advancement, items, combat etc), and it can be done using only ANSI C functions
|
thirdy
Member #8,409
March 2007
![]() |
Ok, maybe I'm not a newbie, but I still consider myself one. Not to boast, here's what I did last year, http://allegro.cc/depot/ProjectJem/, took me 2 long weeks to make it. I did that prototype rpg game without even knowing that the stuff on my list existed, I don't even know what a tilemap exactly means until now. How do you code for restricting the player from overpassing a road? |
spellcaster
Member #1,493
September 2001
![]() |
Take a look at this: -- |
Simon Parzer
Member #3,330
March 2003
![]() |
Quote: How do you code for restricting the player from overpassing a road?
The most basic approach: Every tile in the map has an attribute: "solid" which is either 0 or 1. |
Neil Black
Member #7,867
October 2006
![]() |
That's how I did my early RPG, which was in QBASIC and never fully completed, actually I got to the point where I had the character walking around, then I got to the point where I moved to C++, so I never actually got to the point where I worked on that again. spellcaster said: Take a look at this I saw that one before, it looked pretty good.
|
thirdy
Member #8,409
March 2007
![]() |
So if I have a large bitmap as my background map, divide it into a grid of squares. Then, every squares would have a walkable flag of 1 or 0?
Is this a good implementation? |
Trezker
Member #1,739
December 2001
![]() |
Ow, nasty function there. I'd have only one parameter for direction with values 1-8, one for each direction and use defines to name each.
|
thirdy
Member #8,409
March 2007
![]() |
Ow, that function is different.. |
Tobias Dammers
Member #2,604
August 2002
![]() |
Quote: So if I have a large bitmap as my background map
Usually, you don't, which is part of the tile map beauty.
Then your tilemap is simple a 2D array (or a 1D array with clever functions to make it work like a 2D one) of indices (ints) into the global tiletype table. The next thing you need to understand is that a tile grid has its own coordinate system, or 'space'. I use the terms 'world space' (or 'screen space') and 'tile space' to distinguish between them. The character walks in world space, but tile coordinates are in tile space. To convert between them, you need to multiply or divide by the tile size. So if you want to know which tile the character is on, you do this: tx = character.x / tile_w; ty = character.y / tile_h;
Note that this works only for point-shaped characters that have no logical size (they are exactly zero pixels high and wide). world_x = tx * tile_w; world_y = ty * tile_h;
Putting it together; to find out whether the character can move from point (ax;ay) to (bx;by), you need to do the following: --- |
|