You are browsing as a guest. Sign up (or log in) to start making projects!

-4Y: Frustrations

  • 11 Devlogs
  • 29 Total hours

An open-source, non-commercial space-combat project inspired by X4: Foundations. For now, development is focused on a smaller, achievable goal: a battle simulator featuring ship navigation, rotation, AI-controlled ships and modular ship damage.

Ship #1 Changes requested

I made a -4Y: Frustrations - a fully autonomic 2D battle simulator! You just left click for the good guy, middle click for the bad guy and they fight!

It isn’t free of bugs; I hoped the project will turned out as something like X4: Foundations but with scraped 3D. I overestimated my free time… So I decided to narrow down the scope of the development and made a simple battle simulator.

I might come back to it on Stardance’s successor (so in the summer). For now I don’t have that much time.

I used AI only for final works, including documentation and README.md. AI wrote much less than 3% of the final code, if I had to estimate.

It was a pleasant and fun experience (unlike my first project). I ducking love using Bevy so much…

Without further ado, here is my project! Hope you’ll like it!
I’ll highly appreciate any code critique!

  • 11 devlogs
  • 29h
Try project → See source code →
Open comments for this post

5h 16m 29s logged

Alpha Devlog 11, also known as The Last One (probably):

Hello Stairdancers!
I made a lot of things in these 5 hours:

  1. Added Bullet-based attack system
  2. Fixed like 50 bugs
  3. Generated proper documentation with Sol 6.1 (because I don’t have time to sit there and document everything I did)
  4. Ships without weapons now flee, and then stop and accept their fate
  5. Ships without engines now stop and act like it’s a freaking tower defense sim :son-im-crine:
  6. Ships without engines and weapons just… exist… that is until another ship kills them
  7. Fixed code from “maybe a problem in the future” category
  8. Changed ship properties

I think that’s all, time to ship!
I also compiled it to Linux and Windows. I tried WASM but I gave up. Too much skill issue

Stay hydrated :thumbs-up:

0
0
11
Open comments for this post

1h 43m 34s logged

Alpha Devlog 10:

  1. Fixed A LOT OF BUGS
  2. Added health bars (see attachment)
  3. Decided to add a proper bullet-based (!) attack system

i think that’s it

Stay hydrated :thumbs-up:

0
0
13
Open comments for this post

1h 48m 46s logged

Alpha Devlog 9:

note: don’t let me do textures again :sob-pray:

I added a better representation of what’s going on (I think)
Now you know when the engines/weapons are broken!

Also:

  1. Added adding ships;
  2. Fixed ship just flying in circles after defeating an enemy;
  3. Fixed some bugs, deleted unused code and fixed linter warnings.

Ship time is approaching very rapidly…

Stay hydrated :thumbs-up:

0
0
26
Open comments for this post

3h 19m 47s logged

Alpha Devlog 8:

WERE FRICKIN BACK 🔥 🗣️ 🔥 🗣️ 🔥

I finally got some motivation to work and remade the attack logic! now it’s peak!
…at least I think so, correct me if I’m wrong

The rotations now don’t take a ducking hour, the ship immediately starts, and it rotates during a slow movement. When it rotates, it starts to actually accelerate.

Also, I think I’ll just make a battle sim for now, school gets harder and harder, Shattered Atlas is finally starting to be made…

So yeah, I’ll probably make a battle sim and finish it in a year or so.

Stay hydrated! :thumbs-up:

0
0
17
Open comments for this post

3h 9m 25s logged

Alpha Devlog 7:

insert scream idk

This was pure pain in the beginning, I had no ideas how to accomplish the fighting mechanic.
It still isn’t done 100%, I need to make a simple algorithm for the NPCs and clear signalization which module is getting hit (and if it’s getting hit at all…), but yeah…

I’ve made it so there are three parts: core, weapons and engines. And shields. shields are getting destroyed first.
I’m injuring them based of what’s the current position of an attacker in relation to the target. Then, I basically blast X of damage (13 in this case) on the specific part.

So, regardless of the position, shields wear out first. Then, if standing “behind” the ship, engines are attacked. If the attack is happening from either left or right, the weapons are going to leave this world.
If weapons are destroyed, you can’t attack other ships. If engines are destroyed, you can’t move.
If either of them is already destroyed, it’s uncovering the core part, which, if destroyed, the ship finally despawns.
You can also attack the core when you’re in front of the target.

Now I need to make an algorithm for the NPCs, which will SUCK, cuz I don’t have a single idea on how to do it…

That’s all for now, stay hydrated :thumbs-up:

0
0
17
Open comments for this post

2h 19m 27s logged

Alpha Devlog 6:

I did it…

I basically made an error (don’t ask me why) in my code: I entered a FHD RESOLUTION’S RATIO instead of FHD RESOLUTION itself…
I think I needed some sleep back then lmao

Anyways, I made this:

  1. now the ships are assignable (all of them, until I add actual NPCs to the game (idk how am I going to do that tbh))
  2. you can’t order a ship to fly somewhere if it’s already flying
  3. you can’t select more than one ship at once

That’s all for now ig, health bars and attacking next!
Or maybe stations I’m not sure. You can comment to suggest one!

Stay hydrated :thumbs-up:

0
0
14
Open comments for this post

1h 29m 34s logged

Alpha Devlog 5:

I’ve wasted around an hour on trying to get the rotations to work smoothly (earlier it just snapped in place)…

Nevertheless, I fixed everything I destroyed (accidentally or not) and managed to make everything in around 20 minutes… the rest is just debugging my error-prone code lmao

I also added a new triangle ship!

Next step: Add giving orders manually. This will be hard…

Stay hydrated :thumbs-up:

0
0
14
Open comments for this post

37m 27s logged

Alpha Devlog 4:

Ok so I managed to do what is shown in the video ig, it was quite easy tbh.

Have some code:

if distance_to_finish < 1. {
    linvel = Vec2::ZERO;
} else if distance_to_finish <= current_speed as f64 * 42. {
    vel.brake(acceleration, &time);
} else {
    vel.add_from_endpoint(pos, *endpoint, max_vel, acceleration, &time);
}

Here’s what I did ealier (I was sooo tired, okay? dont even ask about it :son-im-crine: ):

if distance_to_finish < 1. {                
    vel.linvel = Vec2::ZERO;                
} else if target_speed == max_vel {                     
    vel.add_from_endpoint(pos, *endpoint, max_vel, acceleration, &time);                
} else {                
    vel.brake(acceleration, &time);                
}

Stay hydrated (and don’t hate on me) :thumbs-up:

0
0
18
Open comments for this post

2h 56m 8s logged

Alpha Devlog 3

So I made basic A -> B travel. It works, but only on one example (and not every time)…

The next step is to fix it and add rotation at the beginning. Then I’ll experiment with more ships, and add manual orders (that means YOU decide, where the ship goes).

TODO:

  • (DONE) universalize this a bit more
  • add rotations
  • experiment with more ships!
  • add actual orders given by the player

Stay hydrated :thumbs-up:

3
0
137
Open comments for this post

1h 27m 9s logged

Alpha Devlog 2

I made so that the “ship” has an order assigned. I also made a sector, and the game is now fullscreen. Nothing more ig.

On the next devlog, I hope I’ll show you how it’s moving by itself!

Stay hydrated :thumbs-up:

0
0
11
Open comments for this post

4h 41m 57s logged

Alpha Devlog 1:

”-4Y: Frustrations” (the name can change as the project goes on) is starting as somewhat of a X4: Foundations parody.

The base gameplay concepts would be similiar: You manage a fleet of your own faction; You trade (or fight) with NPC factions; and grow your empire.

The only downside? I can’t into 3D for now, Stardance is slowly ending and school is getting intense, so if I’m gonna ever make a proper X-like strategy, with 3D mode and everything, it’s not soon.

For this month I’ve planned basically a 2D economy/grand strategy. Nothing more I guess.

This project is unofficial, I don’t own anything that’s Egosoft’s. Basically a fan parody that can turn into a playable, open-source alternative.

Anyways, here’s what I did: In Bevy v0.19.1, I made a few helper functions, few structs which I don’t use yet and automated drawing. Also a basic fighter icon texture.

Stay hydrated :thumbs-up:

0
0
7

Delete project?

Are you sure you want to permanently delete this project? This action cannot be undone.

All devlogs, followers, and associated data will be removed.

Followers

Loading…