Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411276 Posts in 69323 Topics- by 58380 Members - Latest Member: bob1029

March 28, 2024, 12:45:55 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)The happy programmer room
Pages: 1 ... 273 274 [275] 276 277 ... 279
Print
Author Topic: The happy programmer room  (Read 672976 times)
oahda
Level 10
*****



View Profile
« Reply #5480 on: June 11, 2019, 10:23:47 AM »

Probably combined with custom attributes to mark what should actually be bound, but C++ doesn’t have that either. Durr...?
Logged

qMopey
Level 6
*


View Profile WWW
« Reply #5481 on: June 11, 2019, 10:26:22 AM »

I don't believe in markup attributes either  Cool

<bombing the happy programmer room with grumpyness>
Logged
Schrompf
Level 9
****

C++ professional, game dev sparetime


View Profile WWW
« Reply #5482 on: June 12, 2019, 02:19:42 AM »

I, on the other side, would love to have this. But alas, they deferred it AGAIN, it's not even coming to C++20.
Logged

Snake World, multiplayer worm eats stuff and grows DevLog
oahda
Level 10
*****



View Profile
« Reply #5483 on: June 12, 2019, 03:48:18 AM »

Certainly getting an itch to play around with a programming language of my own again from all this... And it would work both as a compiled and an interpreted language, making binding at all obsolete. Well, hello there!
Logged

gimymblert
Level 10
*****


The archivest master, leader of all documents


View Profile
« Reply #5484 on: June 12, 2019, 05:13:57 AM »

SO I learned Ionic for my webdesign training
Which mean I had to look at angular
which mean I had to learn CLI
which mean I had to look at shadow dom
which mean I had to look at typescript

meh it's not complex, overkill for a single dev on smal project, and hide its simplicity under a lot of layer of jargon

Finally it does not work on my student partition for some reason (can't access the cli after install from admin partition)

But I did learn many thing and I can replicate the organization with javascript anyway, so the methodology translate (without the shadow dom benefit)
Logged

kason.xiv
Level 0
***


View Profile
« Reply #5485 on: June 19, 2019, 09:12:22 AM »

Please don't mention anything JS related here  Beg Waaagh! No No NO

Or at least lead with a trigger warning...
Logged
gimymblert
Level 10
*****


The archivest master, leader of all documents


View Profile
« Reply #5486 on: June 19, 2019, 10:03:41 AM »

I love javascript.

I've been a C++ programmer for over 20 years. It was my favorite language up until a month ago. The ease and speed I can develop small games in javascript is far beyond what I could do in C++, UE4, or anything else I've used. The speed of iteration is just incredible. The amount of features available in vanilla javascript is astounding and the architecture is easy to grasp. It feels like a whole new world has opened up to me.

My advice for any programmer is make a small game in Javascript. Don't use any additional libraries, don't use any additional assets, keep it all in one html file. Use source control though. (Always practice safe coding.) You will have the time of your life. Check out this year's js1k games if you want some inspiration. Also I have been using Brackets to develop in, I would recommend using that if you need an editor. Have fun!
Please don't mention anything JS related here  Beg Waaagh! No No NO

Or at least lead with a trigger warning...

I didn't start that  Shrug
Logged

Schrompf
Level 9
****

C++ professional, game dev sparetime


View Profile WWW
« Reply #5487 on: June 19, 2019, 10:14:05 PM »

I'm satisfied I got my networked game to basic function. Using C++, my own framework + enet, static packet/entity type handling via variadic templates, somewhere in there my first templated lambda and my first spaceship operator. Took me about 15h of work, spread over >1 month because of job, child, band and democracy delivery simulators like Division2. Runs on Windows and Linux, headless server, client, local singleplayer, testclient which can spawn a few dozen automated testclients.

Now that the infrastructure is going, I'm slowly adding actual gameplay and looking out for an artstyle.
Logged

Snake World, multiplayer worm eats stuff and grows DevLog
oahda
Level 10
*****



View Profile
« Reply #5488 on: June 20, 2019, 02:01:17 AM »

Sounds cool! What kind of game is it going to be?
Logged

Schrompf
Level 9
****

C++ professional, game dev sparetime


View Profile WWW
« Reply #5489 on: June 20, 2019, 04:04:12 AM »

Will get a devlog in time. For now it's just a hobby: I was linked to http://slither.io had some fun with it but was quickly annoyed by the tech. So I want to do something like this, just smooooothly running and with more biology in it. Cells to pop, jellyfish, currents and the like. If it ever reaches playability and there's a bit of interest, I'm going to release it on Steam for free and try to earn a buck via cosmetics.

Of course the increased barrier by not being a web game is notable, but the existing Steam userbase and their infrastructure of following friends to online games might lend a helping hand. The whole "virtual goods" infrastructure is also already there. And I already have a game on Steam, so I roughly know how to play their APIs. The game shall be very small (<20MB maybe) and should start quickly (<1s) to accommodate the casual gameplay. No freemium, no ads, no daily gift, no "play energy", nothing mobily.
Logged

Snake World, multiplayer worm eats stuff and grows DevLog
oahda
Level 10
*****



View Profile
« Reply #5490 on: June 21, 2019, 03:28:16 AM »

Sounds quite technically involved while still very well scoped. Best of luck! Coffee
Logged

ProgramGamer
Administrator
Level 10
******


aka Mireille


View Profile
« Reply #5491 on: June 25, 2019, 04:02:51 AM »

In my quest to make my own programming language, I found out this weekend about Reflection.Emit in C#, which is a whole section of the standard library dedicated to dynamically generating .NET IL code. I've messed around with it a bit, and I pretty quickly managed to create an emitter that could generate an executable based on a simple abstract syntax tree structure I made. This article gives a good introduction on how to get started with it, since the MSDN documentation isn't very newbie friendly.

Anyway, it's nice knowing that I'll be able to pretty easily generate native windows programs from my language in the future!
Logged

gimymblert
Level 10
*****


The archivest master, leader of all documents


View Profile
« Reply #5492 on: June 25, 2019, 10:09:50 AM »

OH that's actually kewl!
Logged

oahda
Level 10
*****



View Profile
« Reply #5493 on: June 25, 2019, 11:19:57 AM »

Cool! Also when did all these threads get stickied? 0:
Logged

ProgramGamer
Administrator
Level 10
******


aka Mireille


View Profile
« Reply #5494 on: June 25, 2019, 11:25:34 AM »

I just did that, figured they were pretty active convos so I made it easier to find them again.
Logged

InfiniteStateMachine
Level 10
*****



View Profile
« Reply #5495 on: June 26, 2019, 04:08:11 PM »

Finished a deep dive on the unreal engine, significantly modifying some of their base pass shaders  and rendering code is no longer a dark art to me.

That said complex shaders with their crazy number of compilation permutations are hideous and crazy hard to debug. I kept saying to myself there must be a better way.

Either way I"m happy it's no longer a mysterious art and a bit frustrated with myself for not getting around to it earlier.
Logged

qMopey
Level 6
*


View Profile WWW
« Reply #5496 on: June 26, 2019, 05:37:54 PM »

Yes, modern graphics is typically over-engineered. Conditional compilation explosions are common.
Logged
oahda
Level 10
*****



View Profile
« Reply #5497 on: June 27, 2019, 07:52:53 AM »

I’m glad photorealism/PBR and the latest and greatest GPU features are of no interest to me. Tongue
Logged

gimymblert
Level 10
*****


The archivest master, leader of all documents


View Profile
« Reply #5498 on: June 27, 2019, 11:07:58 AM »

I’m glad photorealism/PBR and the latest and greatest GPU features are of no interest to me. Tongue
Aw I have some idea to make cheap GI for weak hardware, who I'm going to sell the idea too Tongue

More seriously, photorealism isn't interesting in itself, but the technique behind actually help a lot for anytime of rendering.

For example, energy conservation is a concept that benefit any type of rendering. WHY? because the idea of not having more light in vs out, actually make authoring any light set up easier, even non PBR one! It's less fiddly. And understandthing the various effect actually help you understand how to make the more artistic one. For example teh painting effect in skyward sword is inspired by depth of field.

But the compilation explosion has nothing to do with PBR stuff anyway, it's more an artefact of artistic shading complexity. In fact PBR helpt a bit making stuff LESS complex by bringing common paramaters (more defined material). But artist will always fill the void with extra stuff anyway, make thing simpler and they will make thing even more intricate!


Okay I'll sell my cheap GI solution because I'm a NERD, I always get excited to talk about idea I have. I'm sorry for you all ....

I'm preparing for an open world game, the end goal being to make a "no man's sky + spore + skyrim" lite. There was a number of feature I really wanted, like time of day "with shadow" (Yagni, just change the ambient) ... the target being a mali 400 mp gpu (like weakass sauce, on the level of between a ps2 and n64 but open gl es2.0). I was going for axis aligned cube primitive cast by sampling the cube parameter stored on a precomputed map. But since I also wanted to have volumetric curly hair with a YAGNI technique of casting ray in modulo space, I was reading a lot about raycasting.

The two together I realized I could use a GI solution that is super cheap, async, and basically just sampling texture (ie work on gles2.0).
- The first thing was to realize I would have very low poly environement with blurry texture, since GI is low frequency that work well even with 1m per pixel (enlighten does it), so no high frequency details breaking the result too much. Also update can be slow as (time of day) GI is generally slow moving. Also I'm on a freaking mali 400mp, I can handle some artefact and less realism for dynamism and artistic rendering.

Idea 1:
+ Box projected Cubemap, retroprojected on lightmap (LM) recursively
- work only on convex area

Idea 2, Inspired by this: https://copypastepixel.blogspot.com/2017/04/real-time-global-illumination.html
+ What if I take the surfel point data and store it into a random texture (nearest neighbor because unsorted data), store cluster data in mipmap, use that as Gbuffer. In another texture, bake the adress and weight (UV from the surfel map) of all the surfels (with a raycaster) visible, for each point of the LM (basically a tile for sampling, using a hash of the LM point position).Tilemap is bidirectional, you can use the light accumulated in the LM to reflect back onto the surfel (they see each other), however since many LM point see a surfel, you have to do it point by point.
- Three textures -> surfel Gbuffer, lightmap acculmulation, tilemap. Lightmap is limited by hardware max size and tile size, on mali it's 2048² texture, so tile of 64 samples (8x8) limit LM to 256²
A. realization 1, wait a minute, surfel don't compress greatly because data is mostly random, but if we pack them relative to surface ... it's a LIGHTMAP! so basically you use the tilemap to map back to the same texture, most data of GBUFFER are linearly interpolation friendly, so we can sample in between pixel too (to reason, surface on a lightmap can be spatially coherent but not together visible by the same point).
B. Thinking about implementation, what if I do away with the weight data if I simply don't accumulate ray that fall on the same surfel, also store them in order of casting order ... wait a moment, that looks like a sphere map, it's the hemisphere visibility of a point, OH that's half a cubemap in latlong format!!! Makes sense, GI is effectively integrating the hemisphere over a point ...

Idea3, why not both  Wizard :
+ Do away with the tilemap, render the scene inside a UV cubemap that is box projected. For every point of the lightmap, sample the box projection of the cubemap, use that to find another point of the LM to accumulate as lighting. Store cubemap into an atlas, and the index of the seen cubemap inside the LM to know wich cubemap to sample. It also have the nice property that dynamic object can also sample the LM lighting using cubemap box projection, therefore have all light change directly reflected on them (though they don't contribute). You can probably have the Dynamic object contribute to lighting by rendering them on another cubemap and merge the sampling of the two cubemap during GI update. Cubemap are store into octahedron mapping, which allow to use a full sphere representation in square format.

This has a lot of advantage despite the limitation. Box projection is a crude approximation of the scene geometry, but probably good enough for weakass hardware. Also it's basically doing all the lighting pass in texture for the environment, decouple from geometry complexity. And you don't have to do it every frame. It use only sampling so run any machine that does UV sampling.

Although I have conducting some test to test feasibility, I haven't fully implemented because I'm doing an internship in webdesign right now. Stay tunes to see result and actual limitation with a benchmark.

I'm also thinking about idea 4:
- Trying to find a way to remove cubemap, they duplicate data, as many cubemap can see the same point adress. If only I could just store "square face" on the surface of box projection volume, and find which face a single point can see, but it seems there is no easy CHEAP way to do it without complex structure and a few costly jump.
- Given we only need 2 data per cubemap we can store 2 cubemap on top of each other and sample them both in a single read. But that's useless, so storing hemisphere in a single tile, each on 2 channels.
- Using SH inside pixel to compensate a bit for the box projection approximation and recovering some more angular data.


EDIT:
Also turn out I have to experiment with Zonal Harmonic (ZH) for my shadow need. ZH are linear in complexity, so a ZH9 only have 9 coefficient instead of 81 like SH, probably can make it good enough for real time... Which mean that if we store ZH in 3RGB texture, we can bake time of day shadow (index by time) with a fine angular resolution,and use that as a mask on the direct lighting inside the LM Gbuffer ...
« Last Edit: June 27, 2019, 11:15:20 AM by gimymblert » Logged

ThemsAllTook
Administrator
Level 10
******



View Profile WWW
« Reply #5499 on: July 15, 2019, 08:40:13 AM »

This thread inspired me to take another crack at the lightweight object system I've been using in C, and rework it to fix some of the nagging issues I've had over the last several years. The basic principles are similar to any object oriented language, where classes can be instantiated and have methods that operate on them, can be subclassed, etc. However, my initial implementation used function pointers in the object struct for virtual methods, which meant that every single instance had to allocate memory for its own table of methods and initialize them when created. Wasted memory and a place where errors could easily creep in.

I just got it all put back together, and I'm in the process of updating all the code that uses it. Everything is looking good. In the new system, each object has a single pointer to a central vtable, which contains all of the necessary function pointers just once in memory. This also allowed me to implement some basic reflection methods, so I can take a generic object and determine whether it's a particular subclass by examining its vtable pointer. I got rid of some unnecessary repetition in class definitions where superclass had to be specified in two different places, leading to another potential error hotspot.

I use a lot of preprocessor macros to make this all as friendly as I can on the outside. There are still a lot of arcane conventions that have to be followed for it all to work, but since this is only for me, it does the job really well, and doesn't come with all the baggage I'd have to carry if I switched to a different language like C++ or something. It's weirdly satisfying to make a fundamental change to a core system, go through all of the code that uses it and fiddle with it to use the revised API, and see it all work under the new system.
Logged

Pages: 1 ... 273 274 [275] 276 277 ... 279
Print
Jump to:  

Theme orange-lt created by panic