• Advertisement

pitxardo

Member
  • Content count

    5
  • Joined

  • Last visited

Community Reputation

126 Neutral

About pitxardo

  • Rank
    Newbie
  1. [quote name='FLeBlanc' timestamp='1350683219' post='4991949'] You could always go with the technique outlined here: [url="http://www.gamedev.net/page/resources/_/technical/game-programming/tilemap-based-game-techniques-handling-terrai-r934"]http://www.gamedev.n...ing-terrai-r934[/url] Essentially, each type of terrain has a set of alpha-blended transitions intended to be drawn over neighboring terrain. [/quote] [quote name='zacaj' timestamp='1350683430' post='4991954'] In order to achieve #2, the easiest way would be to draw the bottom layer, then draw the top layer with alpha blending, setting each corner specifically based on what kind of gradient you want [/quote] Thanks! I think that I need to apply a mix of this two techniques :-)
  2. [quote name='zacaj' timestamp='1350678874' post='4991914'] Are you using shaders? [/quote] No, there is no shaders and not idea how to apply it. My level with OpenGL is very basic :-(
  3. Hi everyone! I'm working in a tile based game that uses OpenGL and QUADS to draw each tile. In these two images you can see an example: [img]http://i49.tinypic.com/2rwtjpj.jpg[/img] [img]http://i46.tinypic.com/dfkh7r.jpg[/img] You can see that there is a ground and water tiles, each one with its own texture. Also there are different gradient colors depending of the depth or altiture of the tile. The red square is a provisional cursor. The game background logic works with bidimensional array of tiles. Here is a full capture without zoom: [img]http://i46.tinypic.com/95ufz7.jpg[/img] You can see the game has a retro/ugly style that I want to change. At least, I want to beauty that squared-as-a-hell tiles with some transition between them. There is some taken into account options: [b]1.[/b] I can try with a good tileset like this: [img]http://www.saltgames.com/wp-content/uploads/2009/12/tileset.png[/img] Source: [url="http://forums.tigsource.com/index.php?topic=9859.0"]http://forums.tigsou...hp?topic=9859.0[/url] And change the tile's texture depending of the neighbor tiles. But... I want a very high variety of tiles and texture, so the combination of them could be in a ver high and complex tileset. [b]2. [/b]Multi-texturing the tiles: I can mix texture in one tile, but I have no idea how to do it and have a nice result... The ideal approach is to do something like this: [img]http://i47.tinypic.com/30hu1sn.jpg[/img] Of course, I must take in care the 4 corners. But I only know to do something like this: [img]http://i45.tinypic.com/2f0521j.jpg[/img] :-( [b]3.[/b] My last idea was embrance the retro style and leave the tiles as they are. Any suggestion or idea for a good looking tile map? I tried with some terrain tutorials, but they are never based on tiles or texture per tile that I want. I think the idea is near to the multitexturing and blending, but I have not too much idea about multitexturing and different types of blending :-(
  4. Quote:Original post by jpetrie The name of your "Universo.h" header makes me think you may be running into problems associated with "master" header files. Thank you very much!!! Solved!!! The problem was the include of Universo.h, like the article says. Finally I changed my Entidad.h to: #ifndef ENTIDAD_H_INCLUDED #define ENTIDAD_H_INCLUDED #include <stdlib.h> #include <iostream> class Entidad { protected: float pos_x, pos_y, size_w, size_h; public: Entidad(); ~Entidad(); void actualizar(float planeta_x, float planeta_y, float planeta_z, float tamano_planeta, float rotacion_planeta); float getX(); }; #endif // ENTIDAD_H_INCLUDED and now works fine! :-)
  5. Hi! I'm having this error when I go to compile: Quote: C:\...\Ciudadano.h|6|error: expected class-name before '{' token| The code of Ciudadano.h: #ifndef CIUDADANO_H_INCLUDED #define CIUDADANO_H_INCLUDED #include "Entidad.h" class Ciudadano : public Entidad { private: int foto, trasla; Sprite *grafico; public: Ciudadano(); ~Ciudadano(); void renderizar(); }; #endif // CIUDADANO_H_INCLUDED I tried to make a Foward Declaration, but like I suspected, it gives me error: Quote: C:\...\Ciudadano.h|8|error: invalid use of undefined type `struct Entidad'| C:\...\Ciudadano.h|6|error: forward declaration of `struct Entidad'| The code of Ciudadano.h with Foward Declaration: #ifndef CIUDADANO_H_INCLUDED #define CIUDADANO_H_INCLUDED #include "Entidad.h" class Entidad; class Ciudadano : public Entidad { private: int foto, trasla; Sprite *grafico; public: Ciudadano(); ~Ciudadano(); void renderizar(); }; #endif // CIUDADANO_H_INCLUDED The header of Entidad.h: #ifndef ENTIDAD_H_INCLUDED #define ENTIDAD_H_INCLUDED #include "Universo.h" class Entidad { protected: float pos_x, pos_y, size_w, size_h; public: Entidad(); ~Entidad(); void actualizar(float planeta_x, float planeta_y, float planeta_z, float tamano_planeta, float rotacion_planeta); float getX(); }; #endif // ENTIDAD_H_INCLUDED I'm getting crazy trying to fix this error :( [Edited by - pitxardo on January 20, 2010 4:01:27 AM]
  • Advertisement