• What are you working on?
    5,004 replies, posted
I never really did anything with graphics, but here's what I always thought... The concept of a quaternion is relatively simple in application, and you don't need to understand group theory and the quaternion group in order to use it. Same thing with calculus. You don't need to understand how to take antiderivatives, usually it is best to do things numerically. But you definitely need to know trig and linear algebra. This sound right?
[QUOTE=chimitos;50103686]Advice: if you just want to make a game, just use an engine like Unity or GameMaker. You COULD build a whole rendering engine but it's about a year's worth of part time work and you could get the same results with a few afternoons of tutorials for a pre-existing engine.[/QUOTE] Yeah but the feeling of doing everything yourself (except for the libraries) feels so much better, I like building my own engine than trying to fight Unity's weird architecture. That way my shitty code can get along with my shitty engine code instead of trying to fit a square peg into a round hole. Talking about rendering, I finally implemented light volumes in my deferred pipeline: [t]http://i.imgur.com/UgFyf71.png[/t] It doesn't look a whole lot different, and its a good thing it doesn't. Now it ~[I]should[/I]~ be more efficient than what I was doing before in glsl shaders and rehauling this also cleaned up my code quite a bit and I realized I few mistakes I made. Some other big changes I also made was switching over to glfw for window creation, which imho I like much better. Input is less shitty to actually process, and since it doesn't carry around it's own rendering backend it's supposedly lighter on size (although you can build sdl2 without it I can't be bothered). Among that I also switched my building from VS to CMake, which allows me to build my code under linux without porting or any of the sort. I also changed my engine's architecture into more of a modular setup, the engine is now technically a library referenced by the game project so now there is more clarity where the engine ends and the game begins, compared to my previous setup where everything is in one executable. Other miscellaneous changes is now the object factory is merged with the entity class because cycle dependencies sucks. You can now render meshrenderers with custom shaders for my light volume rendering. Now to fix shadows :v:
[QUOTE=fewes;50104708] If you're interested in understanding physcally based rendering specifically I'd recommend giving [URL="https://docs.google.com/document/d/1Fb9_KgCo0noxROKN4iT8ntTbx913e-t4Wc2nMRWPzNk/edit"]this Google Doc[/URL] a read.[/QUOTE] Thanks for that, I wasn't quite sure of the differences between my renderer and a more traditional physically based renderer until now. Looks like I'll have to implement support for a few extra texture maps in the future.
[QUOTE=fewes;50104708]That said, if you're looking for a quick and thorough way into SFML I'd recommend [URL="http://www.amazon.co.uk/SFML-Game-Development-Jan-Haller/dp/1849696845/"]this book[/URL] (covers pretty much every aspect of the library (plus has a lot of engine design theory in it) and is reasonably up to date, although there might be newer options that I don't know of). If you're interested in understanding physcally based rendering specifically I'd recommend giving [URL="https://docs.google.com/document/d/1Fb9_KgCo0noxROKN4iT8ntTbx913e-t4Wc2nMRWPzNk/edit"]this Google Doc[/URL] a read.[/QUOTE] I envy people who can sit down and read a book about stuff like this. I can't learn from books or tutorials, I just skim through them and find code and break it apart and figure out how it works. It works for me but I lose out on the complex maths behind a lot of the operations which is a handicap in the long run.
[QUOTE=thatbooisaspy;50106187]Yeah but the feeling of doing everything yourself (except for the libraries) feels so much better, I like building my own engine than trying to fight Unity's weird architecture. That way my shitty code can get along with my shitty engine code instead of trying to fit a square peg into a round hole. [/QUOTE] "if you just want to make a game" Building an engine is a wonderful challenge and experience. I've done it myself. If that's what you want to do, more power to you. If you just want to make a game or play with lighting effects, save yourself a few hundred hours of work and use an engine. I don't care about "how it feels", I want results.
[QUOTE=chimitos;50106506]"if you just want to make a game" Building an engine is a wonderful challenge and experience. I've done it myself. If that's what you want to do, more power to you. If you just want to make a game or play with lighting effects, save yourself a few hundred hours of work and use an engine. I don't care about "how it feels", I want results.[/QUOTE] It should be noted, however, that in certain situations "just using an engine" requires as much time learning its architecture as writing a basic boilerplate yourself would take. For example, if you wanted to fiddle with lighting effects, you could spend a couple of hours max writing a simple WebGL boilerplate that lets you quickly test new shaders. It's all subjective I guess. Some people [sp]cough me cough[/sp] are never happy unless the work is understood, usually by method of it being their own work. I agree that there are appropriate and inappropriate times to go to those lengths - the key is to figure out "would using an engine actually save/cost me time in proportion to the level of understanding I might lose/gain?" My excuse is that I've tried a lot of different engines/frameworks and have so far generally found that even if I like one, I wish I had full control/fully understood what was going on. And, that I'm not interested in trying to make money yet (another huge factor of the above question). </essay>
Every time I start a new project, I create a new engine and almost give up before I get to the project itself. Fun for me, though.
Making even a basic 2D engine is a pain in the ass, but rewarding. One day I want to get into learning Unreal though.
[QUOTE=Handsome Matt;50106789]just use unity or ue4???[/QUOTE] Well, Unity and UE4 both don't have Lua APIs. And UE4 is a pain to use on the C++ side(and the editor doesn't run on my laptop very well). I'm not a fan of C#. Thus I write my engines entirely in Lua. Because Raisins.
[QUOTE=Naarkie;50105374][IMG]http://i.imgur.com/usOHurY.png[/IMG] so I finished implementing steam openID auth for my API but I needed a way to send over the steamID and token from browser to the desktop application. I settled on just starting a websocket server for a few seconds from the desktop application and having the browser send the data to the server when the page loads. as long as I have https on my server and a secure websocket connection it should be okay right?[/QUOTE] Assuming it's all on localhost, you probably won't be able to use TLS without at least one authentication error displayed to the user (unless you manually install your cert but there are normally problems with that). Just limit your server to only accept connections from [I]localhost[/I] and there's no security gain from TLS anymore, meaning you can just use plain HTTP/websockets to talk with it. [editline]10th April 2016[/editline] Assuming this is .NET, you might just as well open a browser window in your application. IIrc it hosts IE, but I highly doubt that makes any difference if you properly get rid of it afterwards.
[QUOTE=Map in a box;50106848]Well, Unity and UE4 both don't have Lua APIs. And UE4 is a pain to use on the C++ side(and the editor doesn't run on my laptop very well). I'm not a fan of C#. Thus I write my engines entirely in Lua. Because Raisins.[/QUOTE] May I recommend Love2D? Alternatively, resurrecting one of your old/defunct engines for a new project with the goal of improving that engine per-project and thus never having to start from 0? This way you could naturally develop a useful underlying engine while also giving yourself room to actually start projects. [editline]10th April 2016[/editline] Rationale: this is why [URL="https://github.com/jonnopon3000/ProtoGL/tree/structural-changes/"]ProtoGL [/URL]exists and why I've been spending the few weeks running up to [URL="http://www.ludumdare.com"]Ludum Dare[/URL] making general improvements to the engine. After it hits a certain point, it'll be improved as and when projects require new features. Before ProtoGL was "formalised," the only time I've ever started from 0 with a new project was during my first project (in Java + LWJGL back then) and then when I switched to JS + WebGL. Maintaining a boilerplate is invaluable for progression.
[QUOTE=jonnopon3000;50106870]May I recommend Love2D? Alternatively, resurrecting one of your old/defunct engines for a new project with the goal of improving that engine per-project and thus never having to start from 0? This way you could naturally develop a useful underlying engine while also giving yourself room to actually start projects[/QUOTE] Not a fan of Love2D. The devs love changing and removing things for no reason and have a very odd idea of development. My current engine is written entirely in LuaJIT w/ its FFI (save for libraries like SDL, freetype, etc) [vid]http://tatr.cf/uploads/2016-03-02_03-23-13.mp4[/vid]
[QUOTE=foszor;50106497]I envy people who can sit down and read a book about stuff like this. I can't learn from books or tutorials, I just skim through them and find code and break it apart and figure out how it works. It works for me but I lose out on the complex maths behind a lot of the operations which is a handicap in the long run.[/QUOTE] I can learn from theory books and code, but not tutorials. Which is a problem because my maths courses are written that way :suicide: (It still works out somehow, but it's a lot more tedious if I don't know where I'm going with what I'm supposed to learn.)
This is my first time coding game networking mostly from scratch! [img]http://i.imgur.com/Ky6lxBm.png[/img] You can check out the source code here: [url]https://github.com/qwook/ComputerHome/[/url] It still has a rubber-banding issue which I don't know how to fix other than smoothing out player movement with lerping... . . [b]Explanation:[/b] I modeled the networking after this: [url]https://developer.valvesoftware.com/wiki/Source_Multiplayer_Networking[/url] I set it up so that THREE.js exists on both the server and client. The server takes snapshots every tick but only broadcasts a snapshot every 20 or so ticks. When the client receives a snapshot it replays its keypresses. The client's current keypresses also change the "history" of the server, so that the server re-simulates the last few snapshots with the new history.
[QUOTE=foszor;50106497]I envy people who can sit down and read a book about stuff like this. I can't learn from books or tutorials, I just skim through them and find code and break it apart and figure out how it works. It works for me but I lose out on the complex maths behind a lot of the operations which is a handicap in the long run.[/QUOTE] I do own that book but to be fair I've just skimmed through and and ripped some code out of it pretty much like you described. It looked good though :v:
[QUOTE=jonnopon3000;50106582]It should be noted, however, that in certain situations "just using an engine" requires as much time learning its architecture as writing a basic boilerplate yourself would take. For example, if you wanted to fiddle with lighting effects, you could spend a couple of hours max writing a simple WebGL boilerplate that lets you quickly test new shaders. It's all subjective I guess. Some people [sp]cough me cough[/sp] are never happy unless the work is understood, usually by method of it being their own work. I agree that there are appropriate and inappropriate times to go to those lengths - the key is to figure out "would using an engine actually save/cost me time in proportion to the level of understanding I might lose/gain?" My excuse is that I've tried a lot of different engines/frameworks and have so far generally found that even if I like one, I wish I had full control/fully understood what was going on. And, that I'm not interested in trying to make money yet (another huge factor of the above question). </essay>[/QUOTE] For me it's usually: "Oh, this new engine is free now! Putting art in seems easy so far... now how do I [elegant programmy thing]? Oh, it's [not supported/the API is (very) cumbersome (and doesn't follow any useful conventions) (for anything not (totally) basic)/I can't use modern language features because _____] and to fix that I'd have to [write a(n inefficient/ slow) middleware solution/add the feature directly to the engine itself/"just" work with the ugly code for all eternity] :suicide:" I prefer working with frameworks instead of engines because that way I can make my code much more reusable and more easily remix my ideas. I'm by now relatively decent at making my own components and middleware though, so it usually takes me only a few days to get a given subsystem into a usable state (if I haven't already done so for a different project. Subrepostories make project sharing seriously easy).
[QUOTE=Tamschi;50106857]Assuming it's all on localhost, you probably won't be able to use TLS without at least one authentication error displayed to the user (unless you manually install your cert but there are normally problems with that). Just limit your server to only accept connections from [I]localhost[/I] and there's no security gain from TLS anymore, meaning you can just use plain HTTP/websockets to talk with it. [editline]10th April 2016[/editline] Assuming this is .NET, you might just as well open a browser window in your application. IIrc it hosts IE, but I highly doubt that makes any difference if you properly get rid of it afterwards.[/QUOTE] Oh yeah I'll just do that. And I'm not gonna do a browser control in my program cause the user has no way to confirm they're actually at the real steam login page and not a phishing page I set up
[QUOTE=Tamschi;50106857]Assuming this is .NET, you might just as well open a browser window in your application. IIrc it hosts IE, but I highly doubt that makes any difference if you properly get rid of it afterwards.[/QUOTE] On Windows 10 it should open Edge instead, since that's the new built-in browser.
Yeah its a definite nono to not have an external browser go to it. But at this point you might as well just use steamworks so you can use the steam clients' login depending on what youre using it for [editline]10th April 2016[/editline] [QUOTE=ECrownofFire;50107393]On Windows 10 it should open Edge instead, since that's the new built-in browser.[/QUOTE] It wouldn't.
[QUOTE=Map in a box;50106884]Not a fan of Love2D. The devs love changing and removing things for no reason and have a very odd idea of development. My current engine is written entirely in LuaJIT w/ its FFI (save for libraries like SDL, freetype, etc) [/QUOTE] Eh? Another Space Station 13 clone?
Would you guys recommend a chunk system for a brick building game? I'm thinking I'd have to have some sort of mesh combining system, in order to support massive buildings and structures, like a city. Edit* Yeah, I can almost confirm that Unity would explode trying to handle that many objects/meshes/transforms I would most definitely want support for more complex bricks like slanted pieces, or windows/doors. And I'm not sure how I would "combine" those into one chunk?
Question for all you lovely wizards. I'm designing an Entity Component System architecture for ProtoGL. I'm at a point where I could reimplement the demo game, but I've hit a conceptual snag with making a "class" of Entities behave differently to other "classes". In the old inheritance structure, at the application level I'd create an "Enemy" class as a child of the engine's (abstract) Entity, and in Enemy I'd override the tick() function in which I'd then place special behavior that only Enemies perform. In the new structure, at the application level I have an "Enemy" assembler that just produces Entities with a Transform2D component (2D position, 2D velocity, etc) and a Sprite component. The engine's "Physics2D system" is responsible for applying default linear motion to every Entity with a Transform2D and the engine's Entity Manager is/will be responsible for grouping entities, collecting vertices, and telling the underlying Renderer what to do in as few calls as possible. Since these Enemies differ in no way from my Player Entity except in that the Player has a "PlayerControl" component, they naturally behave the same way by default. [B]My question therefore is:[/B] Without creating a new component and therefore having to create a new system at the application level that deals with giving Enemies specific behavior, is there a (valid) way to replicate the kind of flexibility I had with the tick() override? The answer to this question might also help me figure out how to give each "class" of Entity a specific collision response directive, too. Sorry for the essay, I've been trying to come up with a solution to this for a good while now - been doing OOP inheritance patterns for way too long for composition to come naturally to me.
What kind of effect did they use for SuperHot enemies texture? Specular? Looks like there's more to it [IMG]http://horo-game.com/wp-content/uploads/2016/02/SUPERHOT-Start-to-DirectX-9.jpg[/IMG]
[QUOTE=Naarkie;50107332]Oh yeah I'll just do that. And I'm not gonna do a browser control in my program cause the user has no way to confirm they're actually at the real steam login page and not a phishing page I set up[/QUOTE] [I]Technically speaking[/I] it would definitely be possible for a local application to forge that, but I guess it would improve trust with casual users. (Most large desktop programs really do just open a browser control for this, though.) Note that if the website requires a pre-approved application key (like Twitter), there's no way you can run the process safely on an end-user's device. [editline]11th April 2016[/editline] [QUOTE=jonnopon3000;50107773]Question for all you lovely wizards. [...] [B]My question therefore is:[/B] Without creating a new component and therefore having to create a new system at the application level that deals with giving Enemies specific behavior, is there a (valid) way to replicate the kind of flexibility I had with the tick() override? [...][/QUOTE] Which language do you use? If it's dynamic, you can just reserve a method name for each configurable "slot" in your behaviour and set them to whatever you need. A full-blown framework is most likely either already provided by the language or would be over-engineering here, but if you do make one I suggest adding validation ("all slots required by other methods are filled") and defaulting ("these behaviours have a certain generic dependency, so a default will be supplied", though that's optional). If it's C++ and you don't need runtime composition, then use multiple-inheritance and virtual base classes. That's probably about the cleanest you can get in this regard, and it validates all your classes implicitly. If you use a different statically typed language that doesn't have multi-inheritance but does have reflection, or if you need statically typed runtime composition, [URL="https://bitbucket.org/Tamschi/components/src"]have a look at my implementation[/URL].
[QUOTE=Tamschi;50107064]For me it's usually: "Oh, this new engine is free now! Putting art in seems easy so far... now how do I [elegant programmy thing]? Oh, it's [not supported/the API is (very) cumbersome (and doesn't follow any useful conventions) (for anything not (totally) basic)/I can't use modern language features because _____] and to fix that I'd have to [write a(n inefficient/ slow) middleware solution/add the feature directly to the engine itself/"just" work with the ugly code for all eternity] :suicide:" I prefer working with frameworks instead of engines because that way I can make my code much more reusable and more easily remix my ideas. I'm by now relatively decent at making my own components and middleware though, so it usually takes me only a few days to get a given subsystem into a usable state (if I haven't already done so for a different project. Subrepostories make project sharing seriously easy).[/QUOTE] I've had nothing but bad experiences with subrepos. Is there a significant improvement in Hg over how git does it?
[QUOTE=MadParakeet;50107665]Eh? Another Space Station 13 clone?[/QUOTE] What's that supposed to mean? :saddowns:
[QUOTE=Tamschi;50107804] Which language do you use? If it's dynamic, you can just reserve a method name for each configurable "slot" in your behaviour and set them to whatever you need. A full-blown framework is most likely either already provided by the language or would be over-engineering here, but if you do make one I suggest adding validation ("all slots required by other methods are filled") and defaulting ("these behaviours have a certain generic dependency, so a default will be supplied", though that's optional). If it's C++ and you don't need runtime composition, then use multiple-inheritance and virtual base classes. That's probably about the cleanest you can get in this regard, and it validates all your classes implicitly. If you use a different statically typed language that doesn't have multi-inheritance but does have reflection, or if you need statically typed runtime composition, [URL="https://bitbucket.org/Tamschi/components/src"]have a look at my implementation[/URL].[/QUOTE] ProtoGL is written in JavaScript, so I believe I could use your first suggestion - the reason I've asked here rather than just reserving a "collidedWithEntity" and "tick" member name on the Entity and using those in my assemblages to produce class-like behavior is that adding anything other than pure data to an Entity seems to go against the concept of the ECS architecture, in which Entities themselves are supposed to be data only. To be fair, I don't really care too much about adhering to the architecture, I was just wondering if there was a more "valid" way - but, thinking about it again, any way that [i]isn't[/i] having an overridable/replaceable reserved method on Entity itself would be really messy. I'll get something working, and post back here to see if it's not completely retarded. [sp]disclaimer: I might not have any fucking idea what I'm talking about. This is always a possibility[/sp]
[QUOTE=Map in a box;50106884]Not a fan of Love2D. The devs love changing and removing things for no reason and have a very odd idea of development. My current engine is written entirely in LuaJIT w/ its FFI (save for libraries like SDL, freetype, etc) [vid]http://tatr.cf/uploads/2016-03-02_03-23-13.mp4[/vid][/QUOTE] Do you mean that [I]everything [/I]is written in lua, and that libraries and stuff is abstracted through a lua api? That's freaking cool, does it help with development time (aka I don't have to wait five years for it to compile)? About the Unity debate, I always end up just creating my own framework in Unity because of it's asinine architectural decisions (seriously, every script has to be attached to a gameobject?) and have to abuse singletons to get what I want. I made my engine to be less "OOP" for that reason, and if you look at my previous (failed) Unity projects a lot of my engine architecture is inspired by them. Unity also been annoying me each time I use it, just being slow and fighting with VS, it's getting less buggy each update which is nice.
[QUOTE=thatbooisaspy;50108218]Do you mean that [I]everything [/I]is written in lua, and that libraries and stuff is abstracted through a lua api? That's freaking cool, does it help with development time (aka I don't have to wait five years for it to compile)? About the Unity debate, I always end up just creating my own framework in Unity because of it's asinine architectural decisions (seriously, every script has to be attached to a gameobject?) and have to abuse singletons to get what I want. I made my engine to be less "OOP" for that reason, and if you look at my previous (failed) Unity projects a lot of my engine architecture is inspired by them. Unity also been annoying me each time I use it, just being slow and fighting with VS, it's getting less buggy each update which is nice.[/QUOTE] Definitely. Its actually kinda a port from my C++ engine -- got fed up with compile times, so I'm very much enjoying a "ctrl+s and F5" kind of game where it just ~runs~. I don't use the Lua C api at all, everything uses FFI, see: [code] ffi = require 'ffi' ffi.cdef[[ typedef char ALboolean; typedef char ALchar; ... void alDistanceModel(ALenum distanceModel); void alEnable(ALenum capability); void alDisable(ALenum capability); ALboolean alIsEnabled(ALenum capability); const ALchar* alGetString(ALenum param); void alGetBooleanv(ALenum param, ALboolean *values); ... ]] local module if(jit.os == 'Linux') then module = ffi.load( 'bin/libopenal.so' )--interference from linux openal must be prevented else module = ffi.load( 'openal' ) end local al = setmetatable( {}, {__index = module} ) return al [/code]
[QUOTE=hakimhakim;50107775]What kind of effect did they use for SuperHot enemies texture? Specular? Looks like there's more to it [IMG]http://horo-game.com/wp-content/uploads/2016/02/SUPERHOT-Start-to-DirectX-9.jpg[/IMG][/QUOTE] Looks like it's just a low poly model with no smoothing and then some chrome-like material on a flat color.
Sorry, you need to Log In to post a reply to this thread.