View previous topic - View next topic |
Author |
Message |
Gardon Scholar
Joined: 05 Feb 2006 Posts: 157
|
Posted: Mon Feb 06, 2006 6:50 am Post subject: |
[quote] |
|
Yes, that's what I meant.
Basically I experimented with the attack bitmap. I loaded it when the attack function was called, and unloaded it at the appropriate time.
And about the bitmap... the funny thing is I thought it was better to keep all images in one bitmap than to have 104 separate ones (13 x 8).
Maybe I'm wrong on this, but in either case you're right, it still is too much.
And the spacing between bitmaps isn't anything. I wrote a program to take the original 64 x 64 bitmaps and put them into one big bitmap, taking all the different directions in clockwise order.
However, what I could do is cut down on the actual bitmaps themselves (I could probably get like 50 x 50 instead of 64 x 64 and rid myself of all that black space).
But isn't it better to have stuff by powers of 2? Would having 50 x 50 slow it down more than having it 64 x 64?
Thanks,
Jason
|
|
Back to top |
|
|
RuneLancer Mage
Joined: 17 Jun 2005 Posts: 441
|
Posted: Mon Feb 06, 2006 7:07 am Post subject: |
[quote] |
|
That's what I meant. Your sprites could probably fit in smaller spaces.
Powers of two are for textures. I don't remember if SDL needs them, but OpenGL does: not having powers of two can make graphic cards treat textures in a wonky way. However, this isn't a problem for your sprites, just the bitmap itself.
Look up the documentation on loading images. You'll learn things a lot faster experimenting on your own than waiting for a reply from people on a message board (for instance, the whole time needed to load a large bitmap thing comes to mind..)
And again, if you're worrying about performance for your first game, you're worrying about too much. Work with a small spriteset to begin with for your first project and it won't be a problem. _________________ Endless Saga
An OpenGL RPG in the making. Now with new hosting!
|
|
Back to top |
|
|
Gardon Scholar
Joined: 05 Feb 2006 Posts: 157
|
Posted: Mon Feb 06, 2006 7:14 am Post subject: |
[quote] |
|
Ah, words of the wise.
Thank you kindly,
Jason
|
|
Back to top |
|
|
LeoDraco Demon Hunter
Joined: 24 Jun 2003 Posts: 584 Location: Riverside, South Cali
|
Posted: Mon Feb 06, 2006 7:40 am Post subject: |
[quote] |
|
RuneLancer wrote: | College teaches you a lot. [...]
That's about all I remember. The rest, I learned on my own, just like you're doing. So don't sweat the "formal training" college supposedly gives you, most of the time you'll just be plain bored and "learning" concepts you already know. :P |
That's hardly a fair assessment: you get out of college exactly what you put into college, just like everything else in life; your experience in college will not be like anybody else's experience.
Personally, while the introductory courses were, yes, a bit low brow, the farther I progressed in my degree, the more neat, awesome things I stumbled upon in my studies; a Comp-Sci degree is a whole lot more than just programming, you know; half of the questions that Jason has are covered by courses offered at most colleges. (Even if the lecture/textbook is moderately useless, as you seem to suggest, there is always the miniscule coding experience to be gained by the courses. As well as the introduction to formal reasoning and thinking.)
College also has the benefit of opening the eyes, on furthering the social development of the individual. It is hardly a complete waste of time.
Quote: | Forget about books. Books will teach you what does what. You'll forget about 2/3rds of it after you finish one. Hands-on experience will teach you how you can go wrong and force you to try to work out just what went wrong on your own (no fancy tutorials to compare your work to!) You'll realize and understand a lot of things as you experience them. |
Again, that depends upon both the book and upon the individual; while those silly "Programming Games for Dummies" books are rather as you describe, good, solid textbooks generally have the "why" --- you know, that "science" bit of "computer science"? --- behind the "what" or the "how". That is, in my opinion, completely necessary to the development of good programming. And some people, you may be surprised to discover, do learn better via book-osmosis rather than through other methodologies.
Jason: I do tend to agree with most of the points raised here; however, if you are a relative neophyte to programming, you might consider tackling smaller, non-game related projects before you start mucking about with graphics.
Also, if you are fearful of the horrors that are the Windows, you might consider switching to something else. Like the Linux. (Although, I grant that may not be an entirely feasible option; for all I know, your family has only a single machine, and your mother plays solitare on it after work each night.) _________________ "...LeoDraco is a pompus git..." -- Mandrake
|
|
Back to top |
|
|
Nephilim Mage
Joined: 20 Jun 2002 Posts: 414
|
Posted: Mon Feb 06, 2006 8:06 am Post subject: |
[quote] |
|
Gardon wrote: | 1) Tilemap editors. It seems there are so many out there, so should I make one? I've always learned my stuff by hard-coding things, and quite honestly I wouldn't know where to start on making a map editor. Heh, I think I just answered my question, but for future reference is it better to make one to design levels? |
Writing map editors is harder than just writing a map engine, IMHO, since they basically have to do everything the RPG tile engine needs to do and more.
I would take it in two steps. First, make a tilemap engine that can read a simple text format that you can edit in a text editor. Then, bump up to a tilemap editor like Tiled when you have it stable enough that you can write something that can talk to a generic tile editor tool. You don't want to spend time writing an editor unless (a) you've pretty much finalized what features you need your tile engine to have, and (b) existing tilemap editors can't do what you need.
Gardon wrote: | So going back to relating to RPG's, what should I do to keep it simple? |
Here are some things you can do to keep things simple:
* One playable character, not a party.
* Use a horizontal-vertical grid of tiles, as opposed to 3D or isometric.
* Draw your map with a single layer from a sheet of tile graphics. Don't try to composite layers of terrain on the fly.
* Don't have a scrolling tilemap - do screen by screen. (This reduces map sizes and eliminates scrolling code.)
* Don't do pixel-level control of character motion; instead move characters in increments of your tile size. (This way you only have to store what "tile" they are on. You can still animate between the positions if you want smooth-looking animation down the road.)
* Have a list of items that exist in the game, so you can just store a character's inventory as numerical references. (As opposed to having dynamic weapon upgrade systems, charges for magic items you have to remember from game session to game session, and the like.)
* When you talk to a character, they just say the same thing every time, as opposed to having a long conversation engine.
* Don't have NPC's like townspeople wander around - give them a fixed location.
* Keep your rules system as simple as possible. Worry about things like status effects (poisoned, cursed, etc.) later. You can even drop magic to make things really simple.
* Store everything you can in human-readable text files, at least until you are ready to write an editor.
Anyway, the list can go on, but I think you get the idea. This should give you some ideas about how to make your game engine easier to build. And almost anything you leave out to keep things simple can be added back in later with a little refactoring.
Also, note that with a bit of clever storytelling, most of these things aren't a problem. For instance, if you can tell a story with a lone hero, then only keeping track of one character's stats isn't that big an issue. And limiting the travel within the game world will cut down on the amount of graphic tiles you need to draw.
Gardon wrote: | But what's a realistic goal? Do I just want to shoot for a basic world that my main character can move around in, with items to pick up and a couple enemies to battle and then be done with it? Just the rudiments of another game? |
That might be a good start, but remember that what you want to build is a game engine, not a game. The "game" is your game engine plus the art and story assets you create that the game engine plays back. Ideally, your game engine doesn't care how many maps it ends up loading throughout the course of the game, or how many NPC's you talk to. (You'll want to keep this reasonable from a production standpoint, but the engine shouldn't care.)
By way of example, Sacraments just has a series of maps, stored as text files, with exit tiles. The exit tiles indicate what map to load up when you step on 'em. The game could have two maps or a million - it doesn't care, because it just loads up the map that the current map tells it to. All it needs to know is how to read the map and move the character around until he steps on an exit tile. Adding a new area is as simple as creating a new map and adding an exit tile that points to it on some other map - no code involved.
This is good from a coding perspective, because it actually makes things simpler, but it's also good from a creative perspective - once you get your game engine "settled," you can more easily focus on creating the narrative of your game because you don't have to delve down into code to advance the story - you just create new maps, new NPC's, etc., using whatever format you specified in the engine.
Gardon wrote: | And what about hardware acceleration. Should I focus now on creating the RPG just in SDL which I am most comfortable with, or learn OpenGL and then attempt the game? |
I'd stick with SDL for now. You're going to have your hands full with handling all the RPG stuff. Just try to keep your drawing code separate from everything else (look into the "Model - View - Controller" programming model if you haven't already), and then you can always refactor your game to use OpenGL later if you end up needing hardware acceleration. Again, remember that there were plenty of RPG's built before modern hardware acceleration was available - if you don't try to compete with current-generation RPG's while you're learning, you'll make life much easier on yourself. _________________ Visit the Sacraments web site to play the game and read articles about its development.
|
|
Back to top |
|
|
Gardon Scholar
Joined: 05 Feb 2006 Posts: 157
|
Posted: Mon Feb 06, 2006 4:43 pm Post subject: |
[quote] |
|
Thanks again everyone,
Jason
|
|
Back to top |
|
|
|
Page 2 of 2 |
All times are GMT Goto page Previous 1, 2
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|