Jump to content
  • Advertisement

linux_junkie

Member
  • Content Count

    5
  • Joined

  • Last visited

Community Reputation

100 Neutral

About linux_junkie

  • Rank
    Newbie
  1. linux_junkie

    Graphics Question from a Novice

    Again, an outline is insufficient data for creating a "fleshed out" character unless you want something paper thin or as low res as the original Star Fox models. That is, they will be like that if you do not keep checking with the player to see if your results match their expectations and having the program adapt to each answer. If you start working on this as a project, I promise that the time it will take for someone to work on a post explaining everything involved in one possible implementation is time you could spend studying and experimenting with results. I would be interested in what you come up with if you made progress. JTippetts link should prove pretty interesting, too. [/quote] Well, it's a completely 2D game, so being paper thin is actually all I need. Visually, I'm looking to create a "collage" type feel, kind of like South Park used in the early seasons, although with a different stylistic direction. Characters will be composed of (typically) simple shapes, representing the different limbs, and then attached by joints. Again, I am a complete novice in regards to 3D graphics, but this doesn't seem like it would be impossible or impractical to resolve, I'm just not quite sure how to go about it. My first idea was to break down the outlines by filling them in with rough quads, and then filling in the edges with triangles to give a less blocky shape. Afterwards, I'd just convert the quads into individual triangles to speed up rendering. The outline doesn't have to be perfect in its polygon form, since applying a curved texture with alpha transparency around the borders would make up for any blockiness along the outline. The only problem is that I ran into some issues with special case scenarios, where it just plain didn't work, especially if the outline was highly irregular and extremely concave, but this was probably more to do with a naive implementation. Thanks for the link JTippets, I'm going to read that now, since that sounds like exactly the solution I need. If I manage to get this working, I'll be sure to post the code, even though the majority of coders here will have little use for it, due to the 2D nature of the game.
  2. linux_junkie

    Graphics Question from a Novice

    I think that I forgot to clarify a rather important point in my design, which I think simplifies the problem. Characters will be constructed by separate limbs, each of which would be drawn individually, and then connected to each other via joints, to allow for easier animation. I imagine this makes things a bit easier, since most limbs wouldn't be of a very complex shape, typically. So, let me rephrase my question. How would I "flesh out" a shape drawn through an outline, to fill it in with polygons?
  3. I've been programming for about a decade now, but have just recently made the step from 2D software rendering to 3D hardware accelerated graphics. My current project is still a 2D game, but done with a 3D engine (Ogre) to take advantage of GPUs and all the other beautiful effects that are impractical otherwise. Since I am new to 3D graphics programming, a great deal of the common terminology and techniques are still unknown to me, despite extensive reading on the (vast) subject, so my question may seem naive and simple to all of you advanced individuals. Basically, what I'm hoping to do, is create a character editor in-game, so that users can draw their own characters to play with. I want it to be easy and intuitive to use, and hide the complex inner workings from the user, so that even a child could draw out a new character. Forcing the player to use an external program is very unappealing to me, since that will discourage many players from bothering at all. So, what I'd like, is for the character editor to allow the player to draw the character outline, just as if they were using any normal image editor. For internal representation, I'd then like to convert their outline into a mesh of polygons dynamically. Ideally, this would be done in such a way that the polygon count can be altered based on the user's video settings in-game, to optimize performance. I have a feeling that this is not only very possible, but probably somewhat common, only I haven't come across it yet in my readings, so I don't know what the proper term would be. Alright, now here are my questions: What is this technique called? How can I implement this, ideally with an existing library (that is free for commercial use, under LGPL, zlib, MIT, or whatever license (oh, and must be crossplatform) ) ? What particulars should I be aware of, and what issues might I have implementing this? Thanks to anyone who took the time to read this, and extra thanks to anyone who has an answer to any of the above questions.
  4. linux_junkie

    Need assistance with custom compression

    Thanks for your reply, it was very helpful. I'll probably still need a short for tile types, since it could potentially use more than 256 types. I'd also really like to use a full rgb range of colors, since some graphical effects (lighting, day/night cycles, etc) just look better with smoother transitions. Even keeping those values, implementing your other suggestions will drastically reduce memory consumption. I feel foolish for not having thought of packing the structs, but I haven't really needed to worry about memory too much with past programs of mine, so I rarely optimized for space (speed, on the other hand...). I appreciate your help very much, and now I can get back to getting some actual work done. I definitely wasn't expecting the first reply to my thread to solve my problem in such a simple fashion, since no other reply in my other threads yielded any really good results. Thanks for surprising me
  5. Okay, so here's what I'm struggling with. I'm programming a roguelike/RPG hybrid, which features a very large world. The world is composed of a grid of tiles, and, so far, each tile will need to store at least 28 bytes of data (assuming a worst case scenario that the target compiler makes each variable 4 bytes). With a planned world that's made up of 100x100 map segments, each of which holds 100x100 tiles, storage space required adds up *fast*. That's not even to mention the fact that the map has varying heights and depths in some regions, required additional 100x100 tile map segments at varying z levels. So, clearly, a very effective compression scheme is required. I've discussed this elsewhere before, but haven't had any luck finding a really good solution. The compression method needs to be both effective, as well as reasonably fast, to avoid noticeable load times when loading new map segments. Specifically, here is the minimum data that I've deemed necessary for each tile: unsigned int tile_type; unsigned char red; unsigned char green; unsigned char blue; int durability; int temperature; unsigned int fertility; The tile_type will reference the ID of the tile, which in turn will store all static data for that tile, significantly reducing storage space by eliminating the need to store unchanging information. Red, green, and blue are self explanatory, and are used for graphics. Durability is used for terrain deformations, like from tunneling or erosion. Temperature is used for handling climate, seasons, and weather effects, and does have a large impact on the constantly evolving game world. I've tried to think about a way to avoid storing this value for each tile, but for the more realistic effects I'm looking for, I need the higher granularity. Fertility is used for determining plant growth. I've done a fair bit of research into existing compression techniques, trying to find a method that is best suited to the way my data is modeled. I don't feel competent enough in this area to write a more optimized custom algorithm, so I've only really looked into existing ones. It seems that given the 2D representation of my map, that image compression would be a good match, with PNG seeming to be the best choice. So, I figured I could separate my tile data, and store the values as pixels in a PNG. The red, green, and blue values could actually be directly translated into pixel values, and so could go into a separate PNG. Another PNG could handle tile_type, represented in greyscale. Finally, durability, temperature, and fertility could go into the last PNG. This seems like it would be a good method, and would certainly compress a great deal, while also having the benefits of being fast and easy to implement. However, I don't want to commit to any particular method yet, since I'm sure a better compression scheme that's suited to my data is out there. Any ideas, anyone?
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!