Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Custom Query (296 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (13 - 15 of 296)

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Ticket Resolution Summary Owner Reporter
#17 fixed Height Map Terrain bottac bensch
Description

A HeightMapTerrain is a class, that reads in a grey-scale image. Black is low terrain, White is high. Like this it should be very easy possible, to create good looking landscapes.
The process is called displacement and can also be applied to other bodies than flat surfaces. ⇒ Ideas?

  • The class must be able to
    • read in a texture as an SDL_surface.
      bool Material::loadImage(char* imageName, GLuint* texture)
      {
        char* imgNameWithPath = searchTextureInPaths(imageName);
        if (imgNameWithPath)
          {
            SDL_Surface* map;
            Image* pImage = new Image;
            map=IMG_Load(imgNameWithPath);
            if(!map)
      	{
      	  PRINTF(1)("IMG_Load: %s\n", IMG_GetError());
      	  return false;
      	}
            pImage->height = map->h;
            pImage->width  = map->w;
            pImage->data   = (GLubyte*)map->pixels;
            if( !IMG_isPNG(SDL_RWFromFile(imgNameWithPath, "rb")) && !IMG_isJPG(SDL_RWFromFile(imgNameWithPath, "rb")))
      	for (int i=0;i<map->h * map->w *3;i+=3)
      	  { 
      	    GLuint temp = pImage->data[i];
      	    pImage->data[i] = pImage->data[i+2];
      	    pImage->data[i+2] = temp;
      	  }
            this->applyItToAHitghtMap (pImage, texture);
          }
        else
          {
            PRINTF(1)("Image not Found: %s\n", imgNameWithPath);
            return false;
          }
      }
      
    • then it should apply what it learnt to the heightMap (use the struct given below to pass info)
        struct Image
        {
          int rowSpan;    //!< The count of the rows this Image has.
          GLuint width;   //!< The width of the Image.
          GLuint height;  //!< The height of the Image.
          GLuint bpp;     //!< BitsPerPixel
          GLuint type;    //!< Type of the Image.
          GLubyte *data;  //!< The Image Data comes here! DANGER: uncompressed data. Delete it!
        };
      
    • Then Transform the mesh, pack it into (multipe) display lists, and give it back to orxonox.
  • Look out!
    • Loading will heappen at levelstart, so it can use some time.
    • During the Game-runtime there may be no delay.
    Look, that your algorithm covers this.
#18 fixed implementing SkyBox nobody patrick
Description

the goal is to implement a skybox. a box that includes the hole world. on the innerside of the walls, there are textures that look like the sky… a skybox… giving the illusion you are enclosed in a detailed world

  • concrete use:
    • simulating a sky far-far away
  • requirements:
    • very simple to use
    • loading during init-phase - after this, the resources used must be minimized
  • implementation:
    • implementation as a c++ class
    • class is controlled by the world-class
    • interface to set the wall texture-images
    • use of 2DMipMaps
  • ideas:
    • perhaps you will be able to add some lightning-features… how knows…
#19 fixed Implementing SoundEngine simon patrick
Description

Interface to the sound card. You will use the SDL-Mixer and eventually some other libraries to decode compressed sound-files.

  • requirements:
    • playing background music
    • managing a list of background music sounds, they can be played in this queue
    • playing game sound-effects with a minimal delay
    • playing sound/music with individual sound volumes
    • use of compressed music/sound like mp3, ogg
    • setting the background music volume and the sound effect volume indipendently
    • fading away background music
    • bonus: mixing two music tracks
  • implementation:
    • SoundEngine is a singleton class
    • attribute: background sound-queue, containing all background sounds (List)
    • init() function, that initializes and starts all SDL sound modules
    • uninit() function, that free the SDL sound modules
    • destroy() frees all resources
    • playBackSoundList() function, to start playing the background music queue
    • playBackSoundList(int tracNr) function to play a specific backsound in the list given as a number
    • playBackSoundLoop(Sound* background) function to start playing the list one by one
    • stopBackSound() function, to stop playing the background music
    • pauseBackSound() function, to pause the background music
    • playEffectSound(Sound* effect, float volume) function to play effect sound with individual effect volume
    • playEffectSound(Sound* effect) function to play effect sound
    • addBackSound() adds a back-sound to the internal queue
    • removeBackSound() removes a back-sound from the internal queue
    • clearBackSound() clears the back-sound list
    • setBackVolume(float) [0, 1] function to set the background volume, values between [0,1]
    • setEffectVolume(float) [0, 1] function to set the sound effect volume, values between [0,1]
  • what you have to think about:
    • sounds happening far away (explosions etc) should have a lower volume, is this possilbe?
    • sound format to use, we prefere open source formats, keep this in mind
  • proposed work flow:
    1. read some stuff on the internet about this topics, namly:
      • SDL_mixer, sound channels, mixer, volumes, supported sound formats, performance needs
      • mp3, ogg, wav sound formats and other you might find
    2. look at some examples on the net and make your own. develop a test environment that comes close to the requirements
    3. implement the framework for the SoundEngine, just the function bodies
    4. make some short doxygen tags. you can use the short descriptions i made under implementation
    5. implement the SoundEngine
    6. test it, also on the other computer platforms
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Note: See TracQuery for help on using queries.