Jump to content
  • Advertisement

djdduty

Member
  • Content Count

    5
  • Joined

  • Last visited

Community Reputation

109 Neutral

About djdduty

  • Rank
    Newbie

Personal Information

  1. Ok, So do you have any Idea of what the code or psuedo code would look like for locating a pixel and determening the type of object to go there? I actually found a demo called wald, it comes with source and uses this exact method I think wald is world in german http://3d.benjamin-thaut.de/?p=7 but I cant build the source as I use visual studio and there is no project files and when i tried to make a project out of them tutned out there was no header files? But this demo is almost exactly what I want to acheive
  2. You can build simple levels using a text file - the text file contains a grid, and each section of the grid corresponds to a different "thing" in that location. A more sophisticated solution is to use an image, and put a green dot for a tree, a blue dot for a collectable item, a red dot for an enemy, etc. You would build the tree in a seperate application, a modelling application, and then just "instance" it in your game. For more advanced stuff you need a world editor. These editors are dedicated to building the world, not building the meshes and models / textures. Sadly there isn't much in the way of free level editors around, so you have to probably do one yourself. [/quote] The imaged based way of doing it with dots sounds very very useful because I also need to cover the ground in grass and that would really take forever even with a text document, I do plan on making a level editor in the future, but I have to start with the basics first, and this would be the basics. Do you happen to know what the method using an image is called because I cant find anything pertaining to this on google, and I'm not all to great enough to do something like this without a little tutorial or something... I actually suppose the text document way would be easy to do and I could probably do that. but it will still take forever. anyways, Thank you for the response and the help [/quote] You need to be able to load images from file. There are a few libraries which can do this, when I was doing opengl and c++ dev I used SOIL. You simply need to open the image, get the raw data, then iterate over it; wherever you get a green pixel, instance a new tree there, and so on. For the ground (It sounds like you want terrain) you should use a height map texture - this is a monochrome texture (usually) where white is the highest point and black the lowest. This technique is well documented online, search for terms such as heightmap and terrain heightmapping. [/quote] Thank you for the response again. I have used heightmaps before and have a heightmap terrain. I can also load an image but I dont fully understand the code required to determine where a certain colored pixel is, and then make it decide where the pixel is in a multmatrix format to put it in the same spot even if i do 1 pixel = 1 float point unit and if I have a 512x512 image thats completly green(for all grass) with some blue dots(for trees)? I have been googling intensly the last couple of hours to try to find an example of this and have come up empty handed. But I was able to create a program that reads from a text file and it works well, but now i have to place all the grass... I have over like 400 quads of grass and it is very hard. I'm thinking of making a world editor as I found a nice documentation for a mdi and it could be easily built upon and make export, and I may just do this, but the image way of doing it sounds much simpler for larger foresty levels. would it work with buildings? like, a square a certain size is a type of building but a bigger size is a bigger type of building?
  3. You can build simple levels using a text file - the text file contains a grid, and each section of the grid corresponds to a different "thing" in that location. A more sophisticated solution is to use an image, and put a green dot for a tree, a blue dot for a collectable item, a red dot for an enemy, etc. You would build the tree in a seperate application, a modelling application, and then just "instance" it in your game. For more advanced stuff you need a world editor. These editors are dedicated to building the world, not building the meshes and models / textures. Sadly there isn't much in the way of free level editors around, so you have to probably do one yourself. [/quote] The imaged based way of doing it with dots sounds very very useful because I also need to cover the ground in grass and that would really take forever even with a text document, I do plan on making a level editor in the future, but I have to start with the basics first, and this would be the basics. Do you happen to know what the method using an image is called because I cant find anything pertaining to this on google, and I'm not all to great enough to do something like this without a little tutorial or something... I actually suppose the text document way would be easy to do and I could probably do that. but it will still take forever. anyways, Thank you for the response and the help
  4. What is the method of reading each pixel of an image and using it to place objects in a 3D world called? does anyone know? Thank you in advance
  5. hello djdduty,
    I'd be happy to share with you my code, although I'm not sure how much help it'd be.
    What you're asking for is scattered throughout my code, but the core of it is in two functions:
    btConvexShape* objToCollisionShape(GLMmodel *model);
    and
    void createBulletPhysicsBody(GameObject *);
    How would it be best for me to share these functions ...
  • 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!