Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Everything posted by NicoG

  1. Sorry, I hope this is the right forum.    Anyway, I would like to do something that looks like an old CRT-TV.    I already got the scan-line and vignette shader (GLSL), now my problem is that I need to slightly "bend" the surface on the edges to the back to create this illusion of an old CRT-TV surface. I am using Game Maker Studio, so I have only 2D capabilities and limited 3d functionality, like drawing models and manipulating matrices.    Can someone help me to get this started?   edit: A picture of what I mean in a game where I saw it. It is very subtle and I hope you can spot it in the screen well enough.
  2. NicoG

    Programming a "TV"

    How would such a bump map look like? Also, Game Maker can't really utilize bump maps :S.  Is there any other solution, except drawing a picture over the surface and faking it?
  3. I am.   I did not study. I had a large interest in cross platform way of doing games and graphics. So I stumbled upon OpenGL. I just started learning it over Nehe. Then with the years, I expanded my knowledge and so on and so forth. Was pretty exciting, but I am nowhere as good as professionals.  I can do quite some stuff with OpenGL though :):
  4. Glaubt nicht was ihr in der deutschen Presse über Dorner lest. Der Mann ist ein Held. Nichts anderes. Er hat korrupte Cops angezeigt und dafür wurde er gefeuert. Er bekämpft Korruption. Nichts anderes. Und selbst wenn er sich ergeben würde, würde er das ganze nicht überleben. Er muss für sein Leben und die Freiheit der Bürger in Kalifornien kämpfen.
  5. Thanks fixed it: dp = pow(abs(dot(wvPosition, wvNormal) + 1.0), rim_power);
  6. This is the error I get from YoYo's Game Maker: ############################################################################################ FATAL ERROR in Vertex Shader compilation ShaderName: sh_rimlighting C:\Users\xxxxx\AppData\Local\Temp\gm_ttt_77174\memory(182,8): warning X3571: pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them at gml_Object_obj3DPlanet_Draw_0 (line 27) - shader_set( sh_rimlighting ); ############################################################################################   This is the Vertex Shader I apply: attribute vec3 in_Position; // (x,y,z) attribute vec4 in_Colour; // (r,g,b,a) attribute vec2 in_TextureCoord; // (u,v) attribute vec3 in_Normal; // (x,y,z) varying vec2 v_vTexcoord; varying vec4 v_vColour; varying float dp; uniform float rim_power; //Increase to reduce the effect or decrease to increase the effect void main() { gl_Position = gm_Matrices[MATRIX_WORLD_VIEW_PROJECTION] * vec4( in_Position, 1.0); v_vColour = in_Colour; v_vTexcoord = in_TextureCoord; vec3 wvPosition = normalize((gm_Matrices[MATRIX_WORLD_VIEW] * vec4(in_Position, 1.0)).xyz); vec3 wvNormal = normalize((gm_Matrices[MATRIX_WORLD_VIEW] * vec4(in_Normal, 0.0)).xyz); //float power = 5.0; //Increase to reduce the effect or decrease to increase the effect dp = pow(dot(wvPosition, wvNormal) + 1.0, rim_power); } This is the GML Code I call:   var rim_power = shader_get_uniform( sh_rimlighting, "rim_power" ); d3d_transform_add_rotation_x( 90 ); d3d_transform_add_rotation_y( planet_angle ); d3d_transform_add_scaling( planet_scale, planet_scale, planet_scale ); d3d_transform_add_translation( x, y + offset_y, 0 ); shader_set( sh_rimlighting ); shader_set_uniform_f( rim_power, 5.0 ); d3d_model_draw( modPlanet, 0, 0, 0, background_get_texture(tex_mars) ); shader_reset(); d3d_transform_set_identity(); I do not know where this error is coming from. If I uncomment "float power = 5.0" and use it instead of the uniform rim_power, then it works.  I also get this error when I set rim power to any number that has anything different than .0 as last number. So e.g. 1.0 works, but 2.3 leads to this error.  Any hint or insight is appreciated.
  7. I uploaded this game to Steam Workshop, but it is not completly done yet! It is a light version of what I am planning to release later with more ships, more backgrounds and more bosses! Steam Workshop: http://steamcommunity.com/sharedfiles/filedetails/?id=107934091 In a nutshell, you fight evil ships that are coming at you and you level up while doing so! All 4 Levels ( limited atm ) you gain 1 perk point that you can spend. Perks like: 3 shots fired instead of 1 Base auto heal More damage against bosses and more The twist is, that everytime you fail to hit an enemy, it deducts 1 from your multiplier. Shooting them raises your multiplier, except for bosses! So pure button mashers will have a bad time reaching a good score. If you even let an enemy slip past, he is gonna damage your base. If it explodes, you lose, no matter how much health you have. I designed this as a score attack in a robotron style. There is also 1 additional ship with a different special weapon to unlock. I hope you have as much fun playing it, as I had making it! I really would like to get some feedback from you guys . Screenshots: Legal: Music is licensed under Creative Commons CC-BY-3.0 Deceased Superior Technician http://www.dreade.org/nosoap/faq.php The Font is Copyright © 2009, Matt McInerney (http://pixelspread.com|matt@pixelspread.com), with Reserved Font Name Orbitron. This Font Software is licensed under the SIL Open Font License, Version 1.1.
  8. Arma 2 detects it via the Key and then you become a one hit kill. I want to throw in another method: Make an extra torrent version. Like giving your actors in the game a piratehat or anything else that is just cute and funny. Then cut down the playtime and distribute it to the torrent network as official release by some unknown hacker group. Advantage is clearly more free attention for your game if it is good and the pirate hats might cause a lulz or two which is always good.
  9. Are there any? Torque2D has a good price, a good editor, but also some minor flaws like the handling in the editor, esp. for animations, and no cpu multicore support. I could not find anything like Torue2D which is not tailored towards iPhone and Android. What I am looking for is an engine that comes with an intuitive set of tools like an editor, scripting and modern accelerated rendering. I don't care for any smartphone support.
  10. Danke für alle Glückwünsche gestern. :D
  11. @V-Man Glew is a bad idea for OpenGL 3 and 4 since it uses deprecated ways to get the extensions and causes Warnings. @Asesh GL3w works on Windows and Linux as far as I can see. Yes, it is the same case. The python script generates a file dependant on your platform which you can include into your project.
  12. Use gl3w. It does the Job for you.
  13. I have uploaded the first TechPreview of AngelWing, my generic make-like program for Andreas' library AngelScript. You can download it here: http://code.google.com/p/angelwing/downloads/list Features: * Licensed with the famous MIT-License. * Executes makefiles with an easy to use api, where you do the actually build. * Supports compile-targets, so you can update only specific modules if you like. However, you have to do the structure by yourself atm, there is no automatism yet. But its on the ToDo-List. :) * Full Preprocessor using boost::wave, including its predefined macros. * Modular approach, the backend is usable in any program via a dll, however a frontend for the console is included. * Written in plain C++, AngelScript and Boost it should run on many platforms. The frontend is running with wxWidgets. @Linux-Users I didn't have the mood to write some makefiles, so there are no linux binaries yet :(. But the program runs fine with wine and the source is included in the program. @all http://www.microsoft.com/downloads/details.aspx?familyid=A5C84275-3B97-4AB7-A40D-3802B2AF5FC2&displaylang=en You will need this package to make this program working. It is NOT included. Make sure you have a look to the manual.pdf ( or manual.lyx if you prefer ), many things are explained there. Please let me know what you think :). With best regards Nico
  14. NicoG

    OpenGL Custom Vertex structure

    This is my vertex structure, also for 2D: struct NLVertexData { /// \brief Constructor NLVertexData() : x(0), y(0), z(0), r(1), g(1), b(1), a(1), s(0), t(0) {} /// \brief X f32 x; /// \brief Y f32 y; /// \brief Z f32 z; /// \brief Red f32 r; /// \brief Green f32 g; /// \brief Blue f32 b; /// \brief Alpha f32 a; /// \brief s f32 s; /// \brief t f32 t; }; That makes a size of 36 bytes per Vertex. That leads to the following Vertex Attribute Set: glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, sizeof(NLVertexData), 0); glVertexAttribPointer(1, 4, GL_FLOAT, GL_FALSE, sizeof(NLVertexData), (void*)(3*sizeof(float))); glVertexAttribPointer(2, 2, GL_FLOAT, GL_FALSE, sizeof(NLVertexData), (void*)(7*sizeof(float))); Shader-Layout: layout(location = 0) in vec3 Vertex; layout(location = 1) in vec4 Color; layout(location = 2) in vec2 TextureCoord; So yes, you need only 1 set of texture-coordinates per Vertex. Don't know why they use it like this in that tutorial. Why they are called S and T is something I did not figure out after reading 3 Books and an unknown amount of websites regarding the topic . I just take it as a given naming . Good Tutorial: Learning Modern 3D Graphics Programming Through OpenGL
  15. NicoG

    setup SDL for vc++ 2010

    Make sure to download 1.3, not 1.2. http://www.libsdl.org/tmp/SDL-1.3.zip They are flagged as unstable, but they run just fine.
  16. Well, go ahead then. Use that IDE if you insist. Who am I to question that . - it requires making a project file, even for compiling code with just a single C file[/quote] Spawn a console: gcc myfile.c -o myexe.exe
  17. Then use something like CodeLight if you want a leightweight solution. There are no excuses for using DevC++.
  18. I think he means Nehe. But thou shall not use DevC++ anymore.
  19. NicoG

    OpenGL Orthogonal matrix issue

    You might want to consider using glm. http://glm.g-truc.net/ It is a really nice math library for Vectors and Matrices especially designed for OpenGL and written against the GLSL ShaderSpec. It saved me a lot of time implementing that on my own.
  20. NicoG

    OpenGL 2D Animation in OpenGL

    SpriteSheets are the way to go. In my 2D Engine, I use this Tool: SpritesheetPackerVery nice and easy to use, even has a commandline tool coming with it. Implementation for a parser of the format: http://code.google.com/p/nightlight2d/source/browse/NightLightDLL/NLSpriteSheet.cpp And animating is just flipping the texture-coords. In my code, I just keep all frames in a vector, which are described in a xml document and all frames live on the same spritesheet. Then every X seconds or frames I flip the texture-coords of the sprite and voilá, decent animation . http://code.google.c...NLAnimation.cpp Thats the code without drawing the sprite, that is done in another class since this is a derived class only. But could give a clue about how to do it. The code should be easy to understand. Believe me, Spritesheets really speed you up and flipping the texture-coords is the most efficient way you can have when doing pic-by-pic animations. Thats at least what I researched.
  21. Fixed Functions is the non-programmable pipeline in OpenGL. As I said it is functions like glMultMatrix, glMatrixMode etc. On your other problem: If you want the same code with 2 different backends, use the pimpl-idiom. Like this, assuming C++: class OpenGL { public: virtual void draw_something() {} }; class OpenGL2 : public OpenGL { public: virtual void draw_something() {} }; class OpenGL3 : public OpenGL { public: virtual void draw_something() {} }; class FrontendAPI { public: FrontendAPI(int OpenGLVersion) { if ( OpenGLVersion == 2 ) { m_impl = new OpenGL2(); } else if ( OpenGLVersion == 3 ) { m_impl = new OpenGL3(); } }; void draw_something() { m_impl->draw_something(); } private: OpenGL* m_impl; }
  22. NicoG


    Version 0.0.3 has been delivered, featuring less dependencies and the installer/zip now delivers all dependencies, including needed boost-headers. It has a lot of bugfixes and performance updates. If you download it, please leave some feedback and please notice that work is still in progress! http://nightlight2d.de/ Complete Feature-List: Picture by picture animationSpritebatchingShadersTextrendering, static and dynamicallyRender to textureLoggingSimple Database-Wrapper for SQLiteConfiguration ManagementResource ManagementParallax Scrolling
  23. NicoG


    http://code.google.com/p/nightlight2d/ This library is my project, I am working on it since approx. 2 Years. Sounds a long time, but I had some breaks and also 2 Changes in the used OpenGL Version. Lately I changed to OpenGL 3.3 which gave me some headache, because finding good articles about 3.3 is a pain in the [s]butt[/s]. I ended up in a nearly complete rewrite, but, here it is. System Requirements: * DirectX10 Graphics Hardware, capable of OpenGL 3.3, ATI or NVIDIA. * Dual Core Processor or better * Windows XP or better. Developed on Windows 7 though. * Microsoft Visual C++ 2008 with SP1 in any Version, 2010 is not supported yet. Key Features: * Programmed Cross Platform. Theoretically it can run on any platform supporting OpenGL 3.3. All libraries are x-platform. Some external Tools are not though, but should run with WinE. * Using OpenGL 3.3. Core SDK only * Font Support via Andreas' BMFont * SpriteSheets supported via SpriteSheetPacker * Sprite Batching * Picture-by-picture animated Sprites * Shaders There is still a lot of Stuff to do. But theoretically you can already make Games with. You can download a precompiled Package with Tools, Samples and of course the library with it's .dll, docs and what not else, from the Project Website. Future: The Future Vision is to present a complete Toolchain including Scripting (like Kismet, but that still stands on the Edge), Gameplay-Editors etc. Help: I am currently looking for some things to be done by people with more knowledge in those areas than I have: * CMake or Bakefile Support for generating projectfiles * GUI - I would love some help here to get started If you feel like you got some time - contact me . It may not be the best - but it is working and it is made with love Thanks for reading.
  24. The main difference in 3.0 is, that all fixed functions are gone. No more glMultMatrix, glLoadMatrix etc. You have to do that with shaders. GLM is a library that helps here, since it is written against the glsl spec and can dirctly be transmitted to the shader. It also provides a replacement of glOrtho and glFrustum etc. capricorn already pointed out VBOs. Have a look here: Learning Modern 3D Graphics Programming Through OpenGL
  25. NicoG

    Volunteer 2d artist seeking a project!

    I am currently also looking for someone doing some sprites for my open source project. I cannot pay you, but maybe you like to contribute. Work must be delivered under a Creative Commons License: http://creativecommons.org/licenses/by/3.0/ PM me if you are interested .
  • 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!