Sign in to follow this  
Geri

OpenGL Hints for my new engine (v3)

Recommended Posts

Geri    367
When i made my graphics engine in 2006, wich i updated since that many and many times to fit the requiretments (however, i always keeped it around 5 year lag with the newest technologies for security reasons) i suspected that i will be able to use it for 6-7 year.

This was a correct suspection from me. My engine was around middle class for a lot of times, and if it begined to fall down to low class, i just added some features to compensate it. My hint was i can do this for 6 year without punishment. This is correct, but now my code reached the level wich is not any more maintainable, i must rewrite it.

However, my current engine will be in use for more, i will not replace it with a new technologoy, its unnecessary.

Of course, i will not to delete everything from the code, there is a lot of code wich will usable in the next version also, but i must thow out its structure, the operating principle, i will change verything at the roots.

Also my new engine must be compatible with my old engine, at function level, for example, my Maker3D should work with the new also. I thing i will write a wrapper interface to keep this.

So now i want to share my plans, the new structure of the engine, and i wait ideas, hints, what you ppls tough about my plan.

If you know some new technology (for example, a new, good looking effect) or you invented something but you cant use it for even, and you suggest and let me to implement it, please share it. It does not matter if its just exist as a never investigated and never implemented data sheet, or just an idea, or you just saw it somewhere, please share it
if you think it is good.


TEXTURE HANDLING:
-------------------------------
My new texture handler will use a new texturing track, what can take the textures to bounch and only load them when its necessary, in buckets, so it can process a lot of it with multithread. Or if the handler gets a flush. My engine alreday had unifyed texture handling, but it was uneffective and slow. The new code will even has the ability to dynamically delete the textures from the RAM, and load them again, if they needed.


MODELL HANDLING:
-------------------------------
Modell handling will be similar to texture handler. But i must redesign this fully to be correspondance with my new structure.


MEMORY HANDLING:
-----------------------------
This was complitely broken in my current engine. I will fix it, there is nothing to say about this. The old code was even optimised with Voodoo3.

KILLING GLOBALS:
----------------------------
There was too much global stuff, so i now will collect everything in monolithic global blocks, i building the levels and the blocks logically:
-main.c (includes)
-lgfx_thread_API.c (my multithreading codes)
-sallang_API.c (everything who does not fit to another place: memcpy_dualcpu, lgfx_atof...)
-filehandle_API.c (crossplatform fopen_lgfx, etc)
-Iinit_API.c (platform init, may 60-70 kbyte)
-Periferia_API.c (keyboard, mouse, joy, ~20 kbyte)
-modell.c (no specific calls, only the loaders, ~100 kbyte)
-fizika.c (phisics, collision, 30 kbyte)
-kamera.c (my existing camera codes being copyed there after a bit rework)
-grafika_API.c (deprecated and reworked version of my current graphics engine OR my new engine wich i will
speak later, ~400 kbyte, textures and models also being stored here)
-textura.c (textre loading, managing, decoding, ~70 kbyte)
-sprite.c (my new spritehandler will go here, 10 kbyte)
-audcodec.c (~ 10 kbyte)
-hang_hw.c (my current sound engine comes here, ~10 kbyte)
-engine.c (the passice engine structure and engine core, engine coordination, ground, anim handling, etc, ~300 kbyte)
-engine_effekt.c (some predefinied cpu time leet effects, ~100 kbyte)
-engine_compatibility.c (for compatibility wrapping my old engine, BASIC interpreter, ~300 kbyte)
-menu.c (my current code of opening screens, settings, loading screens, menu handlers, ~20 kbyte)
-game.c (the game, or a wrapper that inits the stuffs to my old engine)


SPRITE HANDLING:
-------------------------------------
Some parts stays as old, but i will rewrite a lot of extras in it. Snitts, flows... much more passive.

GRAPHICS:
-----------------
-I will keep my current OpenGL based graphics engine for compatibility purposes.

-My new graphics engine is a multi-cpu ray tracer. I want ideas for this. Texhnologies, effects, ideas, how to speed it up even more. I want to use this engine from ~2014 (if the world begin destroyed in 2012, not). I would be very happy to see your favorit effects related to this.


SOUND HANDLING:
----------------------------
Maybee i should write realtime environmental audio handling based on the ray tracer, for example, real time calculated environment effect if the voice comes out from the bathroom. Maybee i should write 3d audio positioning. I have never doned such things before, i got no experience, so i will use temporally my current sound code. Suggestions?

PHISICS:
--------------
This was shit until now also, but i cant made anything with it. I will write some new stuffs to it, for example, falling dow item wich brokes, etc.


OTHERS:
---------------
I wait for ideas, for everything, except for:
-What compilers, languages, ideologies, platforms should i use.
I dont care about your fetishes and about your virtual lovers.

I WOULD LIKE THE FOLOWING BENEFITS FROM THE NEW ENGINE COMPARED TO THE OLD
-----------------------------------------------------------------------------------------------------------------------------------
I will introduce this engine only after my old engine fully become obsolete. These engines are for my personal use
to create my softwares in them, so i want not blow up all of my rockets for the first shoots.
-Possibility to write brutal graphics (this also will need modellers, however)
-Simplyer maintaince, modular built-up
-Faster, easyer develop.
-Much smaller memory demand
-Better automatic caching and loading
-Compatiblity with my current stuffs at function(); level
-Better gaming experience
-Simply to create support for new platforms later (who knows what will be is after 5-6 year)
-Independent from everything


Thank you!

Share this post


Link to post
Share on other sites
Hodgman    51323
The one thing that you don't mention is how content is created, and how this content is delivered to the engine's runtime. There's no planned workflow or asset pipeline. These parts of the engine are just as important as the runtime itself.

Do you have an existing tool-chain that you'll be reusing?

Share this post


Link to post
Share on other sites
Geri    367
[b] sirpalee [img]http://public.gamedev.net/public/style_images/master/user_popup.png[/img] [/b]
[b] szecs [img]http://public.gamedev.net/public/style_images/master/user_popup.png[/img] [/b]
The engine (its a base engine) itself would not be public, the previous releases was also not public. So it does not matters how i call the stuffs, or how other peoples would enjoy coding it. The things i build on this engine are the important (for example, Maker3D), not the engine itself. It must satisfy only my needs, and of course, deliver technologies that gamers and end-users would enjoy.

[b] Hodgman [img]http://public.gamedev.net/public/style_images/master/user_popup.png[/img][/b]
I dont plan to change that parts of the engine (hint: check Maker3D)
However, i decided not to create new graphics engine. I will upgrade my current code instead of it.
I alreday started, for example, i coded texture cacher (automatic free-up from the memory), resizeable windowing, modifyed sprite engine... recoding every thing would take too much time (years). And i started to remove deprecated codes also.

I would like to hear ideas instead. Anyway, thank for the replyes.

Share this post


Link to post
Share on other sites
sirpalee    759
The level editor, the scripting and the asset pipeline is part of any game engine. (and maker3d is basically with your engine, without a native API and with some limitations - so the API design, the scripting is important for your users)


And don't write anything yourself, there are a lot of already great opensource / multiplatform tools, that are heavily tested and used in many application. For example you can use OpenImageIO for texture caching / loading in the system ram (you can specify the amount of memory it uses etc... and pretty fast too!), or instead of using your own "shader language", Open Shading Language is there for your raytracer (since I guess it's cpu only, or with some modifications even for the GPU).

Is there any game in development with Maker3D?

Share this post


Link to post
Share on other sites
Geri    367
[color="#000080"][i][size="1"]is part of any game engine[/size][/i][/color]
Yes it is, but i currently want ideas mostly for the graphics engine, and technologies depthly inside the code. Maker3D relies on this also, but Maker's editor or script language / etc does not affects this. I am not needing any suggestions related on this at the moment. So i am currently only curious about the things i have mentioned.

[color="#000080"][i][size="1"]there are a lot of already great opensource [/size][/i][/color]
I not writing everything myself ofc. I using some existing format loaders when necessary. But i dont think i would let any third party code in the rendering core, even if it is opensource or public domain, even if its mutch faster. If a bug appears in it, fixing would be very painfull, maybee also would strict me away from some later platforms, or would decrase the scalability or the flexibility of my code.

[size="1"] [color="#000080"][i]Is there any game in development with Maker3D? [/i][/color][/size]
I have no such informations.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

  • Similar Content

    • By cebugdev
      hi all,

      i am trying to build an OpenGL 2D GUI system, (yeah yeah, i know i should not be re inventing the wheel, but this is for educational and some other purpose only),
      i have built GUI system before using 2D systems such as that of HTML/JS canvas, but in 2D system, i can directly match a mouse coordinates to the actual graphic coordinates with additional computation for screen size/ratio/scale ofcourse.
      now i want to port it to OpenGL, i know that to render a 2D object in OpenGL we specify coordiantes in Clip space or use the orthographic projection, now heres what i need help about.
      1. what is the right way of rendering the GUI? is it thru drawing in clip space or switching to ortho projection?
      2. from screen coordinates (top left is 0,0 nd bottom right is width height), how can i map the mouse coordinates to OpenGL 2D so that mouse events such as button click works? In consideration ofcourse to the current screen/size dimension.
      3. when let say if the screen size/dimension is different, how to handle this? in my previous javascript 2D engine using canvas, i just have my working coordinates and then just perform the bitblk or copying my working canvas to screen canvas and scale the mouse coordinates from there, in OpenGL how to work on a multiple screen sizes (more like an OpenGL ES question).
      lastly, if you guys know any books, resources, links or tutorials that handle or discuss this, i found one with marekknows opengl game engine website but its not free,
      Just let me know. Did not have any luck finding resource in google for writing our own OpenGL GUI framework.
      IF there are no any available online, just let me know, what things do i need to look into for OpenGL and i will study them one by one to make it work.
      thank you, and looking forward to positive replies.
    • By fllwr0491
      I have a few beginner questions about tesselation that I really have no clue.
      The opengl wiki doesn't seem to talk anything about the details.
       
      What is the relationship between TCS layout out and TES layout in?
      How does the tesselator know how control points are organized?
          e.g. If TES input requests triangles, but TCS can output N vertices.
             What happens in this case?
      In this article,
      http://www.informit.com/articles/article.aspx?p=2120983
      the isoline example TCS out=4, but TES in=isoline.
      And gl_TessCoord is only a single one.
      So which ones are the control points?
      How are tesselator building primitives?
    • By Orella
      I've been developing a 2D Engine using SFML + ImGui.
      Here you can see an image
      The editor is rendered using ImGui and the scene window is a sf::RenderTexture where I draw the GameObjects and then is converted to ImGui::Image to render it in the editor.
      Now I need to create a 3D Engine during this year in my Bachelor Degree but using SDL2 + ImGui and I want to recreate what I did with the 2D Engine. 
      I've managed to render the editor like I did in the 2D Engine using this example that comes with ImGui. 
      3D Editor preview
      But I don't know how to create an equivalent of sf::RenderTexture in SDL2, so I can draw the 3D scene there and convert it to ImGui::Image to show it in the editor.
      If you can provide code will be better. And if you want me to provide any specific code tell me.
      Thanks!
    • By Picpenguin
      Hi
      I'm new to learning OpenGL and still learning C. I'm using SDL2, glew, OpenGL 3.3, linmath and stb_image.
      I started following through learnopengl.com and got through it until I had to load models. The problem is, it uses Assimp for loading models. Assimp is C++ and uses things I don't want in my program (boost for example) and C support doesn't seem that good.
      Things like glVertexAttribPointer and shaders are still confusing to me, but I have to start somewhere right?
      I can't seem to find any good loading/rendering tutorials or source code that is simple to use and easy to understand.
      I have tried this for over a week by myself, searching for solutions but so far no luck. With tinyobjloader-c and project that uses it, FantasyGolfSimulator, I was able to actually load the model with plain color (always the same color no matter what I do) on screen and move it around, but cannot figure out how to use textures or use its multiple textures with it.
      I don't ask much: I just want to load models with textures in them, maybe have lights affect them (directional spotlight etc). Also, some models have multiple parts and multiple textures in them, how can I handle those?
      Are there solutions anywhere?
      Thank you for your time. Sorry if this is a bit confusing, English isn't my native language
    • By dpadam450
      FINALLY, upgrading my engine to openGL 4. I was having some trouble so I started with a stripped down application and was wondering if VAO's are required, because I have a sample working, but if I remove the VAO then it doesn't seem to like drawing my triangle.
  • Popular Now