Space Battle - Trench Run

To make it really Star Wars-y they should be named “Deflectors”,
but that’s probably a bit too long for the screen. :P


Just tried this on the emulator, it’s pretty good


Out of interest, is there a reason you decided to change from MIT to GPL?

1 Like

I might not have chosen the right one since I’m new to the license business, but I only wanted to, if anyone made any modifications or improvements, that they also released the source for it. That’s about it, I don’t know if I got the license terms right.

1 Like
  • I tried to make it less complicated by having just 3 hits to be destroyed. Maybe I’ll rename hull to Shields.

Well, in reality (hahahah) you have both shields and hull. Though the hull never seems to take much in star wars. So maybe shields is more accurate.

About the controls, the crosshair scroll 2 pixels per frame, so yes it’s not very precise, but If reduce to just 1 frame, it scrolls too slow.

So you need a different frame rate… or different polling rate (hard) or an algorithm that varies the speed… OR you can also move it just 1.5 pixels per frame too though… no reason it’s gotta be a whole number.

1 Like

Ah ok, that makes sense.

Though technically they only have to publish the source if they also publish their modified/improved version of the game.
If they don’t publish the game then they don’t have to publish the source.
I.e. they could share their modified version between a group of friends as long as nobody publicly published the game. If the source code was hosted on a private server or unlisted public server then technically it would still be following the licence terms.

The GPL and MIT licences are both popular licences for Arduboy games.

However personally I dislike the GPL for two main reasons:

  • Modifications to the source must have a relevant date next to the notice stating the code has been modified.
    • Mainly this is just annoying - people don’t tend to think about the date when they modify code
  • If someone wants to use a small piece of code from a GPL program, they must publish their own program under the GPL. If they don’t want to release their own code under the GPL, they simply can’t use the code. This is technically called ‘copyleft’, but often derogatorily called a ‘viral’ licence.
    • I dislike this because it seems like an unnecessary restriction

If either of those things bother you I’ve found a licence that still requires people to publish the source of their derived versions, but doesn’t require them to use the same licence (the LaTeX project public licence). It’s not a particularly common licence, but it’s still a completely valid open source licence.

If you aren’t worried about either issue then feel free disregard this comment.
If you have any questions, feel free to ask.

I’ll just leave this here…

1 Like

I really didn’t know, I’ll revert back to MIT if it’s better to the community

I tried not using Floating Points knowing there is a performance problem, though I haven’t benchmarked the game using it. I also knew about Fixed Point, but as your post describes, I didn’t knew how to use it.

1 Like

I’ll probably make a V2 with some of the suggestions on the thread. Also there are some optimizations that I can do to reduce the Sketch size

1 Like

Unfortunately licences can be quite complicated.

Some people don’t bother with licences at all, but that’s not a good idea either because it means that technically nobody can modify your code.
It’s better to use a licence that’s not quite right than to not have one.

MIT is probably the simplest and most permissive licence.
(Unless you count licences like CC0 that actually try to get rid of copyright altogether.)

Using MIT would mean that technically people could publish closed source modified versions if they wanted, which isn’t what you wanted.

Ultimately it’s up to you what you choose, I’m just trying to make sure you’re aware of what each licence allows and that you’re happy with the implications.
(I should really write a simplified tutorial about this stuff someday…)

If you’re worried about what’s best for the ‘community’,
I think a ‘permissive’ licence is better than a ‘copyleft’ licence because ‘permissive’ licences give other users more freedom and they tend to be less complicated.

The library comes with:

Overall it’s pretty simple.

All the normal arithmetic operators work as expected, and floating point literals are converted at compile time:

UQ8x8 a = 1.5;
UQ8x8 b = 2.25;
// c becomes 3.375
UQ8x8 c = a * b;

Though somtimes you have to remember to explicitly convert:

int a = 5;
// 2.25 would be a double in this case
// UQ8x8 b = a * 2.25;
// So you must convert:
UQ8x8 b = a * UQ8x8(2.25);
// Equivalent alternative:
// UQ8x8 b = a * static_cast<UQ8x8>(2.25);

If you decide to use it and need some help then feel free to ask.
If you don’t want to use it that’s fine too.
Floats might be a bit easier if you can afford them.

1 Like

@Pharap thanks so much taking your time to write this explanation. I’ll probably try using Floats but if it end up slowing the frames, I’ll give the lib a try.
For sure I’ll use it when I try to do the FPS one.

1 Like

Sooo… what are the chances we can change the title of this game to something that is less likely to get the site issued a DMCA?

I’m going to have to hide this thread until it gets a new name and title screen, sorry! I think everything else can stay the name, but “Star Wars” especially in it’s font is going to be covered by their intellectual property and I don’t want to get an email from Disney lawyers please.


Can you modify that image to be named Space Battle?

I’m so sorry, I knew I shouldn’t have used it, i’ll patch it up right away!

I sure can

@bateske All references have been removed!

The game itself still has the title, you’ll have to change the in game title as well. Sorry to be a pest!

Ooh! Looks like my browser had the old one cached.

Thank you for the quick edits, page is being re-enabled!

1 Like

Is this alright for the flashcart menu screen?TrenchRun

1 Like

I encountered a glitch… it would seem the game did a value loop on the health percentage after I was hit by 2 fighters at the same time. Perhaps you need to program a mechanic that prevents a second fighter from doing damage for maybe a second after you’ve already been attacked to prevent this (and also make the game feel more finished). Otherwise nice job, perhaps just make it a bit more challenging, thanks for sharing!

1 Like