Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411528 Posts in 69377 Topics- by 58433 Members - Latest Member: Bohdan_Zoshchenko

April 29, 2024, 12:16:18 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)The happy programmer room
Pages: 1 ... 243 244 [245] 246 247 ... 279
Print
Author Topic: The happy programmer room  (Read 678811 times)
InfiniteStateMachine
Level 10
*****



View Profile
« Reply #4880 on: July 22, 2017, 06:49:03 AM »

I found a better language than C#, it's called F#. I never thought that one language could do so significantly better than C#. :O

To put F# to the test. I'm making a custom F# engine for my current game.

I love F# and ML type languages but I'm not sure they are a good fit for games considering all the immutability. I feel like to get a game running decent you have to break a lot of the rules for the engine.

I haven't really ever considered trying though so I could be wrong. Looking forward to seeing your results Smiley
Logged

oahda
Level 10
*****



View Profile
« Reply #4881 on: July 22, 2017, 11:10:12 AM »

Fixed my networking a while ago BTW but then wanted JSON to use it to send more complex data more easily and ended up falling into the rabbit hole of implementing the JSON library myself. Tongue

Now the logging from the client is rerouted to the server at least (solved that by making a little interface to override the default logging implementation globally, which knows nothing about the client, but the client uses it to take control, and passes any output on to the server instead of actually logging it, and the server gets a little package with the log level and the log tag as well):



Will make it a lot nicer to figure out if anything goes wrong on any of the platforms that are more annoying to get output from, like having to use logcat for Android. But of course I'm going to also extend it later to send commands to the game while it's running and so on, and at some point integrate that with an editor.

For now I think I'll leave this aside for a bit and move on to a solid modular foundation that can be used to swap out things (including at runtime like I was experimenting with earlier), almost like LEGO pieces without breaking anything else. Will be interesting to see how far I can—and should—take it before it becomes unmanageable. After that I'll have to decide on some initial data model for objects in a scene, which again is supposed to be modular and possible to replace without breaking anything else, so the future editor needs to be able to cope with that as well. Then the fun stuff: rendering! Hand Metal Right
Logged

JWki
Level 4
****


View Profile
« Reply #4882 on: July 23, 2017, 01:42:31 AM »

Fixed my networking a while ago BTW but then wanted JSON to use it to send more complex data more easily and ended up falling into the rabbit hole of implementing the JSON library myself. Tongue

Now the logging from the client is rerouted to the server at least (solved that by making a little interface to override the default logging implementation globally, which knows nothing about the client, but the client uses it to take control, and passes any output on to the server instead of actually logging it, and the server gets a little package with the log level and the log tag as well):



Will make it a lot nicer to figure out if anything goes wrong on any of the platforms that are more annoying to get output from, like having to use logcat for Android. But of course I'm going to also extend it later to send commands to the game while it's running and so on, and at some point integrate that with an editor.

For now I think I'll leave this aside for a bit and move on to a solid modular foundation that can be used to swap out things (including at runtime like I was experimenting with earlier), almost like LEGO pieces without breaking anything else. Will be interesting to see how far I can—and should—take it before it becomes unmanageable. After that I'll have to decide on some initial data model for objects in a scene, which again is supposed to be modular and possible to replace without breaking anything else, so the future editor needs to be able to cope with that as well. Then the fun stuff: rendering! Hand Metal Right

Nice. Remote logging is a good thing to have, especially when you want to deploy for mobile/consoles.
In terms of modular design, this is a good read:

http://ourmachinery.com/post/little-machines-working-together-part-1/

and

http://ourmachinery.com/post/little-machines-working-together-part-2/

Disclaimer, their approach is very C-like in terms of how the ABIs are designed but believe me that's actually a good thing - C++ is a disaster in terms of ABI. However as long as you can guarantee all modules to be built with the same compiler (same version, same everything), you can substitute the structs with function pointers with interface classes. For my current project ideas I'm evaluating that approach.
Logged
oahda
Level 10
*****



View Profile
« Reply #4883 on: July 23, 2017, 03:05:34 AM »

Good read! Thanks! Definitely gave me a few more things to think about.
Logged

SouldomainTM
Level 0
***


"In Science We Trust"


View Profile
« Reply #4884 on: July 23, 2017, 03:13:29 AM »

I found a better language than C#, it's called F#. I never thought that one language could do so significantly better than C#. :O

To put F# to the test. I'm making a custom F# engine for my current game.

I love F# and ML type languages but I'm not sure they are a good fit for games considering all the immutability. I feel like to get a game running decent you have to break a lot of the rules for the engine.
I'm fine with mutables for optimization inside the engine. But I'm also developing for desktop, and not for mobile or console. So the hardware limitations ain't so tight.

I haven't really ever considered trying though so I could be wrong. Looking forward to seeing your results Smiley
I just got started. The engine showcase project got 785 lines, 26 files, and 24 modules. So I'm busy building the foundation. :D
Logged

ferreiradaselva
Level 3
***



View Profile
« Reply #4885 on: July 23, 2017, 10:45:25 PM »

I'm happy because I have a name for my framework:
cgdfw (c game development framework)
Logged

JWki
Level 4
****


View Profile
« Reply #4886 on: July 24, 2017, 12:29:11 AM »

785 lines, 26 files, and 24 modules.

Is extreme fragmentation of code over files like that common for F#?
Logged
oahda
Level 10
*****



View Profile
« Reply #4887 on: July 24, 2017, 02:10:43 AM »

I'm happy because I have a name for my framework:
cgdfw (c game development framework)
Quite descriptive. Tongue
Logged

SouldomainTM
Level 0
***


"In Science We Trust"


View Profile
« Reply #4888 on: July 24, 2017, 02:24:08 AM »

785 lines, 26 files, and 24 modules.

Is extreme fragmentation of code over files like that common for F#?

I just started to make the engine. There are even to two modules empty of code, because they serve as place holders.

Currently I'm refactoring the input system. When I'm done, one other module will be gone. And the input sub engine module will have grown.
Logged

SouldomainTM
Level 0
***


"In Science We Trust"


View Profile
« Reply #4889 on: July 24, 2017, 02:31:16 AM »

Another thing that makes me happy, is the growing popularity of F#. On the Unity feedback page, F# is the top 5 most requested feature. And way more popular than Swift: https://feedback.unity3d.com/forums/unity/suggestions?utf8=%E2%9C%93&status=0&category=&view=most_voted

This is one of the reasons why I'm willing to give F# a solid chance. End even considered to make a game engine with it.
Logged

JWki
Level 4
****


View Profile
« Reply #4890 on: July 24, 2017, 02:46:58 AM »

Wrote a quick foundation for logging this morning, essentially rewriting a system that I already had some time ago.
It's similar to how my memory system works in that implementations of the logging interface are composed from small policy classes, making it possible to quite easily have different loggers that write to different outputs using different formatting and only care about certain logging messages:



The screenshot shows logging output being written to both the IDE console as well as the actual console, with different formatting to allow click-to-jump-to for the IDE log without polluting the console log with that information.

Basically works by dispatching logging to a global linked list of logging interface implementations. The policy based composition works on top of that and doesn't have to be used, logger implementations can just straight up implement the interface whereas the policy based system uses a single implementation that dispatches filtering, formatting and writing the log out to inlined functions without any additional explicit interfaces. Quite nice to have, remote logging over TCP/IP for example wouldn't require a lot of work, just implementing a simple class that writes strings to the network really.
Logged
oahda
Level 10
*****



View Profile
« Reply #4891 on: July 24, 2017, 03:09:20 AM »

It's fun to see how we keep touching on similar areas. c: What are your end goals anyway? Do you have a game in mind?
Logged

JWki
Level 4
****


View Profile
« Reply #4892 on: July 24, 2017, 03:30:23 AM »

It's fun to see how we keep touching on similar areas. c: What are your end goals anyway? Do you have a game in mind?

tbh you posting about your logging thing reminded me of not having proper logging in place.
end goals are fuzzy at best, essentially I wanna get an engine-ish project going again because I've felt frustrated from not having a little something to play around in for a long time now, mostly due to design paralysis and real life getting in the way.
Real life is still somewhat in the way (exam period), but I've gathered enough motivation to start working on things again, especially by learning how to more sanely approach the gap between up front design and explorative coding.

I do have like a rough concept of a game in mind which is going to shape what features I work towards but nothing very specific. It's also not something that I'm likely to be able to ship at any point, it's meant as more of a guiding light because making tech without any requirements will always lead to dead ends.

So essentially, mostly portfolio tech stuff, with some fuzzy ideas in the back of my head. A bit like playing pretend having to build the technical foundation for an imaginary game project, with the actual goal being having cool tech to show off.
Logged
oahda
Level 10
*****



View Profile
« Reply #4893 on: July 24, 2017, 07:24:34 AM »

Ah!
Logged

ferreiradaselva
Level 3
***



View Profile
« Reply #4894 on: July 24, 2017, 07:37:55 AM »

:O
Github as a feature to pin repositories that was there for a long time, but I've never noticed.

https://help.github.com/articles/pinning-repositories-to-your-profile/
Logged

Ordnas
Level 10
*****



View Profile WWW
« Reply #4895 on: July 24, 2017, 09:47:54 AM »

:O
Github as a feature to pin repositories that was there for a long time, but I've never noticed.

https://help.github.com/articles/pinning-repositories-to-your-profile/

Yes, but now the "repositories contributed to" has been removed, and to show how much you have contributed to a project now you have to manually pin them.
Logged

Games:

ferreiradaselva
Level 3
***



View Profile
« Reply #4896 on: July 26, 2017, 06:18:08 AM »

Just some more talk about github. They should have some sort of post feature that is not the issues. Something attached to the user profile, instead of project. That's because sometimes project owners have to take a break, and they have no way to inform people. That happened with me, when the owner of an open source project I contribute to had to take a break for months, and I thought my PRs were ignored/bad.

... Now, programming.

I'm removing the multithreaded update-render from my framework and replacing with a job-system (still using libuv).
Logged

InfiniteStateMachine
Level 10
*****



View Profile
« Reply #4897 on: July 26, 2017, 05:13:03 PM »

785 lines, 26 files, and 24 modules.

Is extreme fragmentation of code over files like that common for F#?


In my experience it's the opposite. I usually have less files than I would in c# or C++

F# has a really interesting thing where the order of the files in the project has meaning. You can only reference code and data from a files before the file you are working in. It's kind of like a constraint to help avoid programming in a circular pattern. I believe it is possible to get around this but it's never come up for me. I really like it.
Logged

JWki
Level 4
****


View Profile
« Reply #4898 on: July 27, 2017, 02:29:52 PM »

Happy because I wrote a simple cross platform UDP socket abstraction that seems to work.
TCP sockets next.
Logged
ferreiradaselva
Level 3
***



View Profile
« Reply #4899 on: July 27, 2017, 03:21:55 PM »

Happy because I wrote a simple cross platform UDP socket abstraction that seems to work.
TCP sockets next.

Haha, I thought about doing the same, since ENet doesnt support IPv6, but not anymore (since I adopted libuv).

Maybe this could be of your interest: https://github.com/networkprotocol/reliable.io
Logged

Pages: 1 ... 243 244 [245] 246 247 ... 279
Print
Jump to:  

Theme orange-lt created by panic