General Quarters! [new naval combat project]

Show off your games, demos and other (playable) creations.
User avatar
togFox
Party member
Posts: 828
Joined: Sat Jan 30, 2021 9:46 am
Location: Brisbane, Oztralia

General Quarters! [new naval combat project]

Post by togFox »

Starting a new long term project. A 2D top-down naval combat game where battleships shoot at each other. This will be ambitious - perhaps - with lots of trigonometry and math.

I got inspired by reading about huge battles between ironclads and WW1 battleships and realised that ships didn't just motor around an ocean trying to shoot each other. Combat involved fleets and formations and communication by flags. Strategic maneuvering for the best broadside and "crossing the T" was crucial. This project will be like a table-top war game - but with Love2D.

I've started a blog on itch.io and I have four blogs there already. Always looking for collaborators so send me a friendly 'hi' if you're keen on no-commitment contributions. For me - I'm looking for a coding challenge. For you? Let me know what appeals. :)

Blog: https://togfox.itch.io/general-quarters
Last project:
https://togfox.itch.io/hwarang
A card game that brings sword fighting to life.
Current project:
Idle gridiron. Set team orders then idle and watch: https://togfox.itch.io/idle-gridiron
User avatar
dusoft
Party member
Posts: 676
Joined: Fri Nov 08, 2013 12:07 am
Location: Europe usually
Contact:

Re: General Quarters! [new naval combat project]

Post by dusoft »

togFox wrote: Tue Feb 15, 2022 10:10 am Starting a new long term project. A 2D top-down naval combat game where battleships shoot at each other. This will be ambitious - perhaps - with lots of trigonometry and math.

I got inspired by reading about huge battles between ironclads and WW1 battleships and realised that ships didn't just motor around an ocean trying to shoot each other. Combat involved fleets and formations and communication by flags. Strategic maneuvering for the best broadside and "crossing the T" was crucial. This project will be like a table-top war game - but with Love2D.

I've started a blog on itch.io and I have four blogs there already. Always looking for collaborators so send me a friendly 'hi' if you're keen on no-commitment contributions. For me - I'm looking for a coding challenge. For you? Let me know what appeals. :)

Blog: https://togfox.itch.io/general-quarters
I would recommend you to use a camera system instead of developing your own. I have burned myself on that long time ago tripling time it would take me to learn an existing library.

Of course, if you take it as a programming exercise, enjoy.
User avatar
togFox
Party member
Posts: 828
Joined: Sat Jan 30, 2021 9:46 am
Location: Brisbane, Oztralia

Re: General Quarters! [new naval combat project]

Post by togFox »

Hmm. Thanks for the advice. Can you foresee some hurdles/challenges with what I proposed? I'm all ears if you have more experience with this.
Last project:
https://togfox.itch.io/hwarang
A card game that brings sword fighting to life.
Current project:
Idle gridiron. Set team orders then idle and watch: https://togfox.itch.io/idle-gridiron
User avatar
dusoft
Party member
Posts: 676
Joined: Fri Nov 08, 2013 12:07 am
Location: Europe usually
Contact:

Re: General Quarters! [new naval combat project]

Post by dusoft »

togFox wrote: Tue Feb 15, 2022 10:46 pm Hmm. Thanks for the advice. Can you foresee some hurdles/challenges with what I proposed? I'm all ears if you have more experience with this.
Centering the camera on the point when zooming is always a challenge. The calculating/translating zoomed camera x,y to cartesian/window coordinates x,y can be also challenge.

Anyway, as I said, if you have it as an exercise, I understand, otherwise I would just reuse what's available.
https://github.com/love2d-community/awe ... e2d#camera

And of course, good luck and I will be glad to play it once ready.
User avatar
togFox
Party member
Posts: 828
Joined: Sat Jan 30, 2021 9:46 am
Location: Brisbane, Oztralia

Re: General Quarters! [new naval combat project]

Post by togFox »

Ah - right. I see. I have already experienced that in the small demo I posted. Zooming in and out is easy - keeping important stuff in focus is not straight forward. I'll address that in due course. Thanks. :)
Last project:
https://togfox.itch.io/hwarang
A card game that brings sword fighting to life.
Current project:
Idle gridiron. Set team orders then idle and watch: https://togfox.itch.io/idle-gridiron
User avatar
pgimeno
Party member
Posts: 3684
Joined: Sun Oct 18, 2015 2:58 pm

Re: General Quarters! [new naval combat project]

Post by pgimeno »

Fortunately, now there's Transform:setTransformation which handles all that for you. My cam11 library is based on that.
User avatar
togFox
Party member
Posts: 828
Joined: Sat Jan 30, 2021 9:46 am
Location: Brisbane, Oztralia

Re: General Quarters! [new naval combat project]

Post by togFox »

Very nice - with documentation/instructions. :) I will definitely put the adoption of this on my 'to-do' list. :)
Last project:
https://togfox.itch.io/hwarang
A card game that brings sword fighting to life.
Current project:
Idle gridiron. Set team orders then idle and watch: https://togfox.itch.io/idle-gridiron
User avatar
togFox
Party member
Posts: 828
Joined: Sat Jan 30, 2021 9:46 am
Location: Brisbane, Oztralia

Re: General Quarters! [new naval combat project]

Post by togFox »

So I started using cam11 and multiple problems were solved instantly and first time. :) Very nice. It just worked out of the box and your instructions re world vs screen are the best I've seen so far @pgimeno. :) That library will become staple in my projects from now on.
Last project:
https://togfox.itch.io/hwarang
A card game that brings sword fighting to life.
Current project:
Idle gridiron. Set team orders then idle and watch: https://togfox.itch.io/idle-gridiron
User avatar
togFox
Party member
Posts: 828
Joined: Sat Jan 30, 2021 9:46 am
Location: Brisbane, Oztralia

Re: General Quarters! [new naval combat project]

Post by togFox »

For those that like reading blogs, my itch page has five or six blog entries on my latest project.

The next entry (not yet published) shows off @darkfrie's rays.lua module.

I'm approaching this project in a much more relaxed and chilled way and really enjoying it.

Also note that I haven't even started coding the real game yet so everything is just testing one good idea after another and building up functions I know I'm going to need later.

Link in OP and in signature.
Last project:
https://togfox.itch.io/hwarang
A card game that brings sword fighting to life.
Current project:
Idle gridiron. Set team orders then idle and watch: https://togfox.itch.io/idle-gridiron
User avatar
milon
Party member
Posts: 472
Joined: Thu Jan 18, 2018 9:14 pm

Re: General Quarters! [new naval combat project]

Post by milon »

I like watching this develop so far. I like the idea of things resolving simultaneously and NOT being real-time. Allows for planning and really smooths out the (unfair?) advantages a superior computer/network would otherwise grant. Looking forward to watching this progress!
Any code samples/ideas by me should be considered Public Domain (no attribution needed) license unless otherwise stated.
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest