Page 1 of 2
General Quarters! [new naval combat project]
Posted: Tue Feb 15, 2022 10:10 am
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
Re: General Quarters! [new naval combat project]
Posted: Tue Feb 15, 2022 7:16 pm
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.
Re: General Quarters! [new naval combat project]
Posted: Tue Feb 15, 2022 10:46 pm
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.
Re: General Quarters! [new naval combat project]
Posted: Tue Feb 15, 2022 11:21 pm
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.
Re: General Quarters! [new naval combat project]
Posted: Wed Feb 16, 2022 12:44 am
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.
Re: General Quarters! [new naval combat project]
Posted: Wed Feb 16, 2022 1:12 am
by pgimeno
Fortunately, now there's
Transform:setTransformation which handles all that for you. My
cam11 library is based on that.
Re: General Quarters! [new naval combat project]
Posted: Wed Feb 16, 2022 2:24 am
by togFox
Very nice - with documentation/instructions.
I will definitely put the adoption of this on my 'to-do' list.
Re: General Quarters! [new naval combat project]
Posted: Sat Feb 19, 2022 2:28 pm
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.
Re: General Quarters! [new naval combat project]
Posted: Tue Mar 01, 2022 9:21 am
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.
Re: General Quarters! [new naval combat project]
Posted: Tue Mar 01, 2022 7:53 pm
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!