Jemme

Members
  • Content count

    17
  • Joined

  • Last visited

Community Reputation

153 Neutral

About Jemme

  • Rank
    Member

Personal Information

  • Interests
    Programming
  1. C# + AS3 + C++?

    Most still use of for editors, check out game coding complete, it has a pretty good editor section about using XML for objects , dynamic UI and communication with the engine. It's a. Great kick start to experiment with.: https://www.amazon.com/dp/1133776574/ref=olp_product_details/146-9356820-0862526?_encoding=UTF8&me= Unfortunately I haven't used boost, most would say STL is not good enough or boost isn't and use your on, but chances are the people that wrote STL know what there doing.i haven't bothered replacing STL yet but do use slot maps and things for hawing instead of there map. To clarify the degree comment, I meant a pure mathematics degree rather than an applied field, for example my degree was computer animation (awful) they covered the bare minimum without showing how it works etc. Lengyel book focus alot on proofs and accurate math notation which can be good and confusing if you want to quickly learn and apply seeking many sources might help. I prefer drawing maths to understand it on a whiteboard or visualising things, although I would not recommend trying to visualise quaternions xD. Lengyel engine series book is alot cleaner and more of a best hits which is a great spring board. Doing the framework just lets you separate talking to the computer and implementing structures to manage that communication. For example the engine doesn't care how stuff gets drawn, like dx11 or even a. Ray tracer it just wants to say draw this thing. And the framework doesn't care gown ngine structures a scene or scene graph it just gets given data and outputs a result. Also the editor is a separate program but uses the engine but as a editor DLL version so in a way it goes: Framework > engine > engine DLL editor layer > editor Specific knowledge can be gained from books, game cording complete has a big section on scene graph, a scene manager just stored scene and loads them etc. The thing is alot of these company's built there engines along time ago and learned the ropes , then they just iterate adding and removing over time. Like fallout 4 is still gamebryo at its core there geck is still probably based on Todd's original core, although interns of usability engineering it's not a smooth tool to use.... You won't get to the same level as they have because it takes a long time and alot of people, so aim for something a bit more realistic for example make a framework to render this scene: https://developer.nvidia.com/orca/amazon-lumberyard-bistro Have some particle effects, some butterfly etc. Don't aim to have for example a full animation engine that lets you build and tweak themselves just make an animation engine that plays them back and blends them and that's it. My advice would be if you really want a job in a specific engine filed focus on that, building a full engine isnt worth it without a very specific goal like portfolio or its part of some special commercial project like simulation of power plants or others.
  2. C# + AS3 + C++?

    I learned math from tons of different books and articles, lengyel book is very mathy in the sense it's quite difficult to understand for non degree people. This book is a bit easier for newer people: https://www.amazon.co.uk/Foundations-Game-Engine-Development-Mathematics/dp/0985811749/ref=sr_1_1?ie=UTF8&qid=1512679107&sr=8-1&keywords=Eric+lengyel I would say figure out your purpose for doing this, what exactly do you want to do this for? That answer will decide the path you take, for example if you want to be a render programmer just build a render , physics ? Then use someone else's render engine and just do the physics. If you want to do everything then break it down for example I'm building a framework a bit like SDL and SFML but with more render APIs and custom physics. The key is that is NOT an engine it's not as big as something like unity or unreal but will be modern rendering etc. You can then add the "engine" separately to supply scene manager , entity systems etc. Splitting them apart makes it alot easier to develop. Check SFML and SDL source, look at XNA structure and check out eberly engines: https://www.geometrictools.com
  3. C# + AS3 + C++?

    Learning and understanding math is probably the most important asset when developing engines, especially back then. People like carmack used papers and reference books like Computer Graphics: Principles and Practice when developing there engines. Carmack used papers by Bruce Naylor when writing the BSP tree used by the doom engine. He popularized the use of different techniques within games that nobody did before or at least as far as I know. To summarize, engines are built from the work of many different people, usually people who specialise in specific areas or algorithms. From there papers engineers when the resources become available implement them practically in three respective fields. And that's basically no it goes, there's books on graphics,physics,collision etc. And those books wouldn't be possible without earlier research and that research without earlier discoveries in math etc. So it goes way back
  4. 2D game programming book

    Howdy, This very much depends on what you want to "achieve" exactly, do you want to learn to develop engines or program games? Do you want to focus on the high level or the low-level? That book is quite good, it walks you through developing tile engines with a tile editor, collision an some extremely simple AI but inst about engine development (Note: Monogame is the community replacement for XNA, 2nd link) https://www.amazon.co.uk/XNA-4-0-Game-Development-Example/dp/1849690669 http://www.monogame.net/ If you want to Build a complete "Engine" from low-level then your not going to get that from 1 book, the books i have on my desk at the moment are: Mathematics for 3D game programming Game Engine Design Game Engine Architecture Game Coding Complete Fourth Real Time Rendering Frank D Luna, DX11/DX12 Real time Collision Detection Useful site: Eberly's wild Magic Engine
  5. C# + AS3 + C++?

    Different studios have different programmers and skills, they probably allow them to work with what there comfortable using. I emailed Jason Gregory recently about tool chains, because it's relevent I'll share his responce. "It seems to me that there are a lot of factors that go into a decision like which UI toolkit to use for building your game studio's tool chain. I can tell you what Naughty Dog does and why, but of course your mileage may vary. At ND, we use primarily C# and Python Qt (pyqt) for tool user interfaces, and we also do a lot of HTML5 web-based interfaces for tools that "talk" to back-end databases etc. The reasons for this are partly because those toolkits were the ones with which the programmers were familiar. Also Python integrates well with Maya (which now uses Python as its primary scripting language)." - Jason Gregory I guess the key bit is "which the programmers were familiar." , Allowing your team to use what there comfortable in is probably the most important thing to do as it keeps the team productive ithout having to find new employee etc.. As long as it doesn't heavily impact the quality or performance then it should be okay.
  6. C# + AS3 + C++?

    They used scaleform in some of there older games so maybe they still need to support it? but there modern games mostly likely use a custom framework?
  7. C# + AS3 + C++?

    Frostbites various tools are written in C# using WPF, like Kylotan says there are some action script driven game UI frameworks which is probably where AS comes in rather than for the editor it's self.
  8. Open Source Direct3D 12 Game Engine?

    For my new "engine" I've decided to create a split between the system and what a traditional engine supplies. By this I mean I have a layer of libs called OSL which contains libs for: maths(vectors, magic etc) graphics(render, render states , render.cpp (dx11, dx12, to etc.)) System (memory, time, thread, config string etc.) So on... This is essentially a small media layer a bit like SDL but more like sfml or xna, from this I can then create games or most importantly create the OSL_Engine which implements scene manager, entity component systems, AI, physics etc. But doesn't have to know about the low level stuff as that's handled separately. The engine can then be used to make a DLL for an editor etc. Be interested in hearing about your approach.
  9. You haven't mentioned things like your experience and role or contact info for follow up.
  10. Howdy Ive got a WPF level editor and a C++ Directx DLL. Here are the main functions: public static class Engine { //DX dll //Init [DllImport("Win32Engine.dll", CallingConvention = CallingConvention.Cdecl)] public static extern void Initialize(IntPtr hwnd, int Width, int Height); //Messages / Input [DllImport("Win32Engine.dll", CallingConvention = CallingConvention.Cdecl)] public static extern void HandleMessage(IntPtr hwnd, int msg, int wParam, int lParam); //Load [DllImport("Win32Engine.dll", CallingConvention = CallingConvention.Cdecl)] public static extern void Load(); //Update [DllImport("Win32Engine.dll", CallingConvention = CallingConvention.Cdecl)] public static extern void Update(); //Draw [DllImport("Win32Engine.dll", CallingConvention = CallingConvention.Cdecl)] public static extern void Draw(); //Shutdown [DllImport("Win32Engine.dll", CallingConvention = CallingConvention.Cdecl)] public static extern void ShutDown(); } Okay so what is the proper way to get the window hosted inside a control and the pump the engine? At the moment i have it inside a (winfom) panel and use: protected override void OnSourceInitialized(EventArgs e) { base.OnSourceInitialized(e); HwndSource source = PresentationSource.FromVisual(this) as HwndSource; source.AddHook(WndProc); } private static IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled) { Engine.HandleMessage(hwnd, msg, (int)wParam, (int)lParam); Engine.Update(); Engine.Draw(); return IntPtr.Zero; } But there's just a few problems: Messages come from everywhere not just the panel (due to using the main window) The input doesn't actually work It's super duper ugly code wise In terms of c++ side the normal enigne (non-editor ) uses this pump: while (msg.message != WM_QUIT) { while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) { TranslateMessage(&msg); DispatchMessage(&msg); //Input if (msg.message == WM_INPUT) { //Buffer size UINT size = 512; BYTE buffer[512]; GetRawInputData((HRAWINPUT)msg.lParam, RID_INPUT, (LPVOID)buffer, &size, sizeof(RAWINPUTHEADER)); RAWINPUT *raw = (RAWINPUT*)buffer; if (raw->header.dwType == RIM_TYPEKEYBOARD) { bool keyUp = raw->data.keyboard.Flags & RI_KEY_BREAK; USHORT keyCode = raw->data.keyboard.VKey; if (!keyUp) { Keyboard::SetKeyState(keyCode, true); } else { Keyboard::SetKeyState(keyCode, false); } } } } time->Update(); engine->Update(time->DeltaTime()); engine->Draw(); } Not the nicest loop but works for now for testing and things. Now the Editor versions code is: //Initalize enigne and all sub systems extern "C" { //Hwnd is a panel usually DLLExport void Initialize(int* hwnd, int Width, int Height) { engine = new Engine(); time = new Timer(); time->Update(); if (engine->Initialize(Width, Height,(WINHANDLE)hwnd)) { //WindowMessagePump(); } else { //return a fail? } } } extern "C" { DLLExport void HandleMessage(int* hwnd, int msg, int wParam, int lParam) { //Input if (msg == WM_INPUT) { //Buffer size UINT size = 512; BYTE buffer[512]; GetRawInputData((HRAWINPUT)lParam, RID_INPUT, (LPVOID)buffer, &size, sizeof(RAWINPUTHEADER)); RAWINPUT *raw = (RAWINPUT*)buffer; if (raw->header.dwType == RIM_TYPEKEYBOARD) { bool keyUp = raw->data.keyboard.Flags & RI_KEY_BREAK; USHORT keyCode = raw->data.keyboard.VKey; if (!keyUp) { Keyboard::SetKeyState(keyCode, true); } else { Keyboard::SetKeyState(keyCode, false); } } } } } //Load extern "C" { DLLExport void Load() { engine->Load(); } } //Update extern "C" { DLLExport void Update() { time->Update(); engine->Update(time->DeltaTime()); } } //Draw extern "C" { DLLExport void Draw() { engine->Draw(); } } //ShutDown Engine extern "C" { DLLExport void ShutDown() { engine->ShutDown(); delete time; delete engine; } } Any advice of how to do this properly would be much apprcieated. p.s in my opinion the loop should kind of stay the same? but allow the wpf to psuh the message through some how and the loop within c++ calls the update and draw still so : //Gets message from C# somehow while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) { TranslateMessage(&msg); DispatchMessage(&msg); //Input } time->Update(); engine->Update(time->DeltaTime()); engine->Draw(); //returns back to c# ^ some how have that in c++ as the message pump called from wpf Thanks
  11. Optimizing Tile Maps

    Ah right im such an doughnut :D ive been programming for years in stuff like XNA, jumped to c++ engines like 6 months ago built a few but never used  profiles till recently (after watching Mike Actions cpp con cache talks) so never took notice of the performance hit they have.  err right anyway its running at 1665 fps now lol, lessons learnt, time to finish the editor.... :)
  12. Optimizing Tile Maps

    MAP_WRITE_DISCARD is used in the Update Buffer on the graphics device, removed D3D11_CREATE_DEVICE_DEBUG, same issue. i think its more than likely the calculation of the vertices of each quad every frame which feels quite dumb as in calculating the top left,right and bottom right and left vertex position. The quad size never changes just the position and  the uv's, so i need to find a way i can do the position and offset without recalculating every single quad.  
  13. Optimizing Tile Maps

    Hmm you see i'm rendering around 1280 on a small 1024 x 720 res (its just a randomly chosen one) and the fps is averaging around 7 fps o.0. Ill do a per render Constant Buffer for view projection so thats handled on the GPU rather than CPU and update this on the results. The only thing the engine does atm is render these tiles so it is a pretty bad problem  :unsure: .
  14. Howdy Tile map rendering is a simple topic that has been around since the beginning of game development, but what about rendering them efficiently? The basic approach I've taken so far is: Created a sprite Batch (batch by texture i.e no state change for large groups) Use a texture atlas dds created from my custom dds compiler in the editor Render only the tiles that are visible on the screen. Each tile consists of 16 bytes per vertex : x, y, u, v All tiles vertices are calculated and stored in a big Vertex Buffer Drawn to screen so some optimization that can be done: using index buffers to reduce 8 bytes per quad Some how use a single quad and transform it and change UV coords for each "instance" The issue is a index buffer will be the same data over and over 0, 1, 2  0,2,3 (made that up) accept because its one vbuffer it will go up and up and up even though in reality there are only 4 vert's just the position and UV changes. The idea of instancing seems good, but how do you handle the positions and the fact that your UV's are different for the tile Index into the tile atlas? Any-who, whats the general consensus from the wise gray-beards of graphics programmers? :D Thanks 
  15. billiard game physics

    You haven't provided any detail at all, what engine? They may have physx or bullet for you to use.