• Content count

  • Joined

  • Last visited

Community Reputation

96 Neutral

About EvilNando

  • Rank
    Advanced Member
  1. [quote name='jonbonazza' timestamp='1317663149' post='4868624'] I am a little confused on what you are trying to accomplish. Initially, you mention tiles which would imply that you are working with tile maps. However, further on, you mention objects in Mario which is a platformer and, like other platformers, doesn't use tiles at all. So my question to you is, Are you using actual tile maps or are you really just looking for simple object collision? [/quote] mario IS tile based he is asking for collisions with BOTH tiles and sprite OBJECTS is it actually that hard to grasp the meaning of the op's initial question?
  2. OpenGL Big problem sorting sprites

    dont worry Ive solved my problem now thanks for trying to help tho also thanks to everyone love gamedev as always
  3. OpenGL Big problem sorting sprites

    [quote name='Katie' timestamp='1318085291' post='4870500'] Probably the best solution to sort the vertex list by texture and render it in three goes, but doing that on the host might be more expensive in terms of host CPU and transfer. It might actually be faster to render the VBO several times, binding a different texture each time. Set a uniform to tell the vertex shader which texture is bound. If it's the "wrong" one, it can just output (0,0,0). That'll be degenerate quads/tris and there should be no frag runs at all. You should be able to do this in the vshader without an if statement by suitable application of the built-in functions. (Using divisions/floor/ceil etc to arrive a number which is either 0.0 or 1.0 depending on if this pass is invalid or valid and then multiplying the final output by that) The reason for doing this is that branches are *extremely* expensive operations in the large parallel nVidia/ATI architectures; it's actually faster in many cases to do more work and multiply by zero at the end than to branch around the instructions. Things like array-of-sampler are annoyingly driver/card dependent. Try them and if the compiler says yes, then hurrah, but you need a fallback plan. [/quote] I guess what Ill be doing is sort all my draw calls FIRST then start a new batch every time the next quad in the queue uses a different texture than the currently active?
  4. OpenGL Big problem sorting sprites

    [quote name='FlyingDutchman' timestamp='1318078882' post='4870480'] So u want to bind 3 textures and than use one call to draw? IMO its not possible. why don't u pack all 3 textures in one big texture? Than u create 3 Texture Buffers with the different coordinates and switch this one than ... [/quote] Because the amount of needed textures can vary (the minimum being 3)
  5. So Ive made a little 2D engine using OpenGL. It uses VBO and VBA for storing batches of quads before sending those to the GPU my current problem is that my game requires at minimum 3 different textures to be able to render a whole scene ( this cannot be changes so please dont suggest to only use one texture instead ) Ive manages to overcome this problem by using 3dtextures the problem is that the extension that allows me to do this is only available on DX11 hardware which is unacceptable for our intended target platforms So what Im looking for is a way to be able to switch textures withing a single glDrawElements call ( Which Im thinking is impossible ) Thanks
  6. Why is destructor getting called

    [quote name='Wooh' timestamp='1317959501' post='4869973'] [code]my_class_instance = MyClass(constructor_params);[/code] First you create a temporary MyClass object with [i]MyClass(constructor_params)[/i]. Then you assign this object to my_class_instance using operator=. The temporary object will not exist after this line so the destructor is called. [/quote] Oh ok but even if I do it like this my_class_instance(constructor_params); the destructor gets called why?
  7. I have a custom class lets call it MyClass so in my program I have this class Game.h { MyClass my_class_instance; void Init(); void Run(); } class Game.cpp { void Game::Init() { my_class_instance = MyClass(constructor_params); // destructor getting called here } void Game::Run() { my_class_instance.DoSomething(); // instance still valid here } }
  8. Where to start?

    Hi Im looking for some tutorials on how to get started into multiplayer programming most of the books Ive seen are way too old and windows only so Im not conviced I should buy one of those books
  9. Collision detection?

    well pretty much what I was thinking.. I guess theres no other way
  10. Im planning to build an isometric game, but given the requirements I see no need to implement a tile grid for rendering the world, instead I was thinking of just displaying one sprite for the land and multiple sprites for the level props (houses, trees...) The problem is I have no idea of a good way to handle collisions in this kind of situation. My initial thought is to just assign rotated rectangles that somehow match the area where the collision should be Im open to better alterantives
  11. vs2010 post build events

    c++ but the ide is on C# settings (shortcuts and all that stuff)
  12. vs2010 post build events

    [quote name='EJH' timestamp='1312489985' post='4844682'] [quote name='EvilNando' timestamp='1312489083' post='4844673'] I currently have some copy commands on my post build events, everything works find whenever Im making changes to the code but when I have no changes on the code the post build event is not getting executed is there a way to circunvent this? [/quote] Did you change "Run the Post Build Event..." to "Always"? [/quote] no I cant find that in the options...
  13. I currently have some copy commands on my post build events, everything works find whenever Im making changes to the code but when I have no changes on the code the post build event is not getting executed is there a way to circunvent this?
  14. sine wave shader

    I love you
  15. sine wave shader

    [IMG]http://i38.photobucket.com/albums/e121/evilnando/rendermonkey1.png[/IMG] I finally made it happen... my only problem is that the waves are very slow. I am not sure if this is because Im using rendermonkey or maybe its my code anyways heres the code [code]uniform float fTime0_X; uniform sampler2D Texture0; varying vec2 texCoord; void main(void) { vec2 aux = texCoord; aux.x = aux.x + (sin(aux.y*fTime0_X*.5)*0.05); gl_FragColor = texture2D( Texture0, aux ); }[/code]