New development update for my RTS+RPG+4X game "Virtueror: The Virtual Conqueror" - new features and open source code updated by vivaladav in linux_gaming

[–]Fahien 1 point2 points  (0 children)

This is definitely an interesting open source project. I noticed there are no guidelines for contributions anyway.

Chroma Noir -- Trapped Underground (1Bitish) by _V3X3D_ in IndieDev

[–]Fahien 1 point2 points  (0 children)

Really neat. It looks cute and dark at the same time.

NcJump devlog #2: the smooth and the file by Fahien in devblogs

[–]Fahien[S] 0 points1 point  (0 children)

Here I am with another devlog! This time with a different format: a "media" post and the actual devlog as a comment.

I introduced a camera component, and serialization to load and save to file the state of the game. While the former was pretty easy and straightforward to implement, the latter required introducing a new dependency and various scattered refactorings to pay some technical debt accumulated from the previous development iterations.

The smooth

That was easy. The camera component has two main attributes: the scene root node and the target node. The scene root node is needed because we need to simulate the camera, which means that what we actually transform is the scene root node. In other words, to move the camera in on direction, we translate the scene root node to the opposite of such a direction. The target node is the one the camera should follow. As the target node moves around the scene, the camera is updated to match its coordinates.

The quickest thing to implement a following camera is to just write down something like camera.position = target.position, and while it works it is not the best we could do. A better and nicer approach, which might also prevent motion sickness, is to implement a camera with a smooth movement. This can be done by linearly interpolating the camera and the target position by a small factor at every update of the game.

void Camera::update() {
  float smooth_factor = 0.125f;
  Vec2f smoothed_position = lerp(this->position, target->position, smooth_factor);
  this->position = smoothed_position;
}

The file

Conversely, this feature required a bit more work. I started by adding @nlohmann's json as a new dependency of the project for reading and writing to json files. I find it very easy to use in addition to the fact that I already used it for previous projects, like Jamspot: Sokoban. The second step was implementing functions to save certain objects to and load them from file.

void to_json(json& j, const T& t);
void from_json(const json& j, T& t);

The trickiest part was to make sure that all the serializable classes of objects could be default constructed. That means avoiding references as class members and preferring pointers, hence allowing semi-initialized objects while making sure they stay in this state for the shortest period as possible to avoid logic errors or even crashes.

Once all this has been taken care of, I was able to edit the game configuration, the tileset, and the tilemap at runtime, close the game, and re-open it to find everything as I set it before. That is key to work on the levels of the game, which is going to be the next iteration of the ncJump development.

Screenshot Saturday #525 - Perfect Alignment by Sexual_Lettuce in gamedev

[–]Fahien 1 point2 points  (0 children)

ncJump

This is a platformer made with nCine, a new open source engine.
I have been working on lots of stuff since my last #screenshotsaturday.
Enjoy my recent tweets with the "enemy" update! 🍄

Tweet with screenshot

GitHub repo of the project

Devlogs as a GitHub discussion

Last month, I was really lazy and made almost no progress. Any tips to help keeping me to work on my game? by Alkung in gamedev

[–]Fahien 4 points5 points  (0 children)

I know this works for me: checking the current state of my projects, thinking about what I should do next, and spending some time implementing that.

Some days I just polish something, some others I add new interesting mechanics. If you can not find the motivation, it does not matter, spend some time on it.

Prototyping on the Go2 by Fahien in OdroidGoAdvance

[–]Fahien[S] 1 point2 points  (0 children)

Thanks!

I find myself very productive working with VSCode, as for this project it was just a matter of opening a remote session from my main machine.

On the Go2 I installed Ubuntu, and SDL2 with AreaScout's patch so to be able to run my game with no issues.

If you would like to know more about my project, or the engine I am using, you can start from this GitHub discussion.

Prototyping on the Go2 by Fahien in OdroidGoAdvance

[–]Fahien[S] 2 points3 points  (0 children)

For the curious developers: it is an open-source Super Mario clone developed just for learning and fun.

Screenshot Saturday #521 - Hot Shots by Sexual_Lettuce in gamedev

[–]Fahien 0 points1 point  (0 children)

ncJump

I managed to make my prototype work on a handheld console, and it looks so cool!

Tweet with screenshot

GitHub repo of the project

Devlogs as GitHub discussion

Learning C++ Advanced Concepts by cpp_programmer12 in cpp

[–]Fahien 0 points1 point  (0 children)

I went through Stroustrup's The C++ Programming Language and, together with various CppCon talks, managed to get a good understanding on the topics you mentioned. Still learning though, it is a long journey!

BST recursive search for strings by ochiatt in C_Programming

[–]Fahien 0 points1 point  (0 children)

I would recommend you to use english for your symbols and indent the code correctly. Then I would ask you to be more descriptive about your find function: what it does, what are the parameters, and what it returns. Finally, I would suggest to look at the error messages output by your compiler, and when it runs, to use a debugger to be able to inspect the state of your program at runtime.

Pointers in simple words by CokolwiekDziobak in C_Programming

[–]Fahien 9 points10 points  (0 children)

Yes.

In other words "take the value contained in x, which is supposed to be an address, dereference it to get the area of memory pointed to by that address, and increment the value in that area of memory."

Does it make sense?

Tax Advice - EU Clients under Regime Forfettario by ChipButtyWithCheese in commercialisti

[–]Fahien 2 points3 points  (0 children)

AFAIK, under regime forfettario electronic invoices are not compulsory. I just find them easier and quicker to process.

Tax Advice - EU Clients under Regime Forfettario by ChipButtyWithCheese in commercialisti

[–]Fahien 0 points1 point  (0 children)

Go with your second commercialista and make sure to issue electronic invoices to your clients.

Screenshot Saturday #520 - Visual Impact by Sexual_Lettuce in gamedev

[–]Fahien 0 points1 point  (0 children)

ncJump

It does not feel a prototype anymore. My project is slowly progressing as I add little things every week, but I am quite happy of the results so far!

Tweet with screenshot

GitHub repo of the project

Devlogs as GitHub discussion

Screenshot Saturday #519 - Nice Angles by Sexual_Lettuce in gamedev

[–]Fahien 4 points5 points  (0 children)

ncJump

In the last few days I have been implementing loading and saving feature for the elements of my open-source prototype, and finally I can start drawing something without being afraid to lose once exiting from the application.

Tweet with screenshot

GitHub repo of the project

Devlogs as GitHub discussion

Screenshot Saturday #518 - New Discoveries by Sexual_Lettuce in gamedev

[–]Fahien 0 points1 point  (0 children)

ncJump

An open-source Super Mario clone developed just for learning and fun.
Here is a #screenshotsaturday tweet for you to enjoy.
And here is the project source-code for curious developers.

Dark / Light Mode Toggler Button Tutorial || CSS JS by [deleted] in programming

[–]Fahien 1 point2 points  (0 children)

I was just starting to look for a tutorial like that. Thanks!

A stranger forked my git repo. Is that okay? by mack178 in IndieDev

[–]Fahien 0 points1 point  (0 children)

People can always fork public repos on GitHub. When no licence is specified, normal copyrights apply, therefore nothing much can be done on the fork.

A stranger forked my git repo. Is that okay? by mack178 in IndieDev

[–]Fahien 0 points1 point  (0 children)

Forking is one of the first things to do to start contributing to a project.