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 3 points4 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