BattleTech - The Board Game of Armored Combat

Other BattleTech Games => MechWarrior and BattleTech Computer | Console Games => MegaMek Games => Topic started by: doulos05 on 16 July 2023, 03:11:48

Title: MegaStrike v0.1.0 (I made a thing!)
Post by: doulos05 on 16 July 2023, 03:11:48
TL;DR: https://github.com/jonathanabennett/megastrike/tree/v0.1.0 (https://github.com/jonathanabennett/megastrike/releases/tag/v0.1.0a)

I still remember the first time I played the Alphastrike rules all the way back when they were an addendum in the back of SO (I think it was SO). I thought "Holy Crap! This is awesome!!" Then, I moved and I couldn't find anybody to play with. But I hoped someone would port it to the computer. Then I realized, "Hey wait, I program. Maybe I could port it to the computer."

It took me 12 years to figure out enough programming to actually, properly, start. But now, here is a playable* version of the game**.

Note the asterisks. This is still horribly work in progress, but I hit all the goals for my very first release (Units on a board which roll initiative, move, shoot, and die). Right now, what is implemented is the simplest, barest bones possible version of the game.

1) Installing isn't automatic, you'll have to set it up yourself.
2) You can't pick your armies. It's Lyran Alliance vs. Draconis Combine.
3) You can't pick your units. The Lyrans get a Phoenix Hawk and a Longbow, the Dracs get a Locust and a Marauder.
4) You can't pick their starting locations.
5) Things that should happen automatically (like rolling initiative) don't, you have to click the button.
6) There's a Deployment phase, even though you can't deploy.
7) There's no terrain, just a flat featureless plain.
8) There's no log.
9) There's no "undo"
10) If there's an error, it probably won't handle it gracefully.

If, after all those caveats, you're still interested, see the link above and read the README for instructions to play around with it. My goal is to get another release out quickly which adds army-building and unit deployment (and hopefully an easier install process), but I'm a one man show here so I won't promise anything (unless some of you want to jump in and try to help!).

Part of why I posted this here is...

 Hey, MegaMek Dev team! I wrote my board file reader to be compatible with your .board files. I also know that you have a large image-pack with images for all the units. Would it be possible for me to use the assets you already have that look so good?  :angel: :angel: :angel:
Title: Re: MegaStrike v0.1.0 (I made a thing!)
Post by: doulos05 on 16 July 2023, 05:50:43
I found an easier way to install, so I have released a new version. Much of the complicated installation process is now handled by a package manager called "Roswell", link in the README.

https://github.com/jonathanabennett/megastrike/releases/tag/v0.1.0a (https://github.com/jonathanabennett/megastrike/releases/tag/v0.1.0a)
Title: Re: MegaStrike v0.1.0 (I made a thing!)
Post by: Hammer on 16 July 2023, 15:12:25
Hey, MegaMek Dev team! I wrote my board file reader to be compatible with your .board files. I also know that you have a large image-pack with images for all the units. Would it be possible for me to use the assets you already have that look so good?  :angel: :angel: :angel:

You can just need to reference as a source for any assets in the read me. We'll cross MegaStrike of our things to do :)
Title: Re: MegaStrike v0.1.0 (I made a thing!)
Post by: doulos05 on 16 July 2023, 15:47:13
You can just need to reference as a source for any assets in the read me. We'll cross MegaStrike of our things to do :)

Fantastic, thanks!
Title: Re: MegaStrike v0.1.0 (I made a thing!)
Post by: Hammer on 16 July 2023, 15:59:30
Come jump onto our Discord and we can see what things we can help out with.
Title: Re: MegaStrike v0.1.0 (I made a thing!)
Post by: mikecj on 16 July 2023, 16:07:47
Cool!  Thanks for sharing!
Title: Re: MegaStrike v0.1.0 (I made a thing!)
Post by: Wrangler on 16 July 2023, 17:05:17
Very nice!
Title: Re: MegaStrike v0.1.0 (I made a thing!)
Post by: Diamondshark on 18 July 2023, 15:00:28
Nice! I'm looking forward to seeing where this goes.
Title: Re: MegaStrike v0.1.0 (I made a thing!)
Post by: doulos05 on 20 July 2023, 07:56:33
Progress report:

1) Hammer has been kind enough to give me permission to use the Megamek image assets. Mech images should now work (for those mechs which I have entered stats for).
2) I found a much easier way to install using a tool called Roswell (https://roswell.github.io). Simply install follow the installation instructions for Roswell, then run "ros install jonathanabennett/megastrike" on the command line and it will install it for you. Then you can run "ros exec megastrike" to play. If you just want to type "megastrike", then you should add ".roswell/bin" to your PATH.
3) I am working on the lobby now and should have a release this weekend which adds the ability to build your armies, followed next week by a release that lets you choose the map (though that map will remain featureless, so all you'll really be doing is choosing the map size for now). Once I release that, I will start working my way through the phases of the game (Initiative, Deployment, Move, Combat, End), implementing the introductory rules for each phase along the way. Each release will also expand on a "How to Play" document which details how to play.

If you're finding this interesting at all and want to help, the easiest place to help is adding new units. I have to ask you to wait till the next release (I rewrote how units are stored so I can have easier/faster searches in the army-builder tool), but this latest version of the units is really simple and straightforward, even if you don't know how to code. If you've got a Github account, you can submit a pull request and submit it. If you don't, message me here and we'll work something out. Please restrict yourself to ground units, I suspect I'll have to do something different for Conventional Fighters, Aerospace fighers, Dropships, et al when I get to them. Also I don't think multi-hex units will work (but I haven't checked).

Here's the link to the main branch so you can see when a new release gets pushed: https://github.com/jonathanabennett/megastrike/tree/battle-builder (https://github.com/jonathanabennett/megastrike/tree/battle-builder)
Title: Re: MegaStrike v0.1.0 (I made a thing!)
Post by: Lanceman on 20 July 2023, 10:14:17
I know you said you don't have access to Windows, but I will report that it definitely does not seem to work, at least using the Roswell method. R crashes out immediately. I do also see that the last couple of releases of Roswell lack Windows binaries, so that might be part of the issue. There seems to be an issue with the Windows release of Roswell, going back through the process again, trying to download SBCL failed.

I've not had the time to figure out a manual Lisp install just yet for testing.
Title: Re: MegaStrike v0.1.0 (I made a thing!)
Post by: doulos05 on 20 July 2023, 16:31:30
I know you said you don't have access to Windows, but I will report that it definitely does not seem to work, at least using the Roswell method. R crashes out immediately. I do also see that the last couple of releases of Roswell lack Windows binaries, so that might be part of the issue. There seems to be an issue with the Windows release of Roswell, going back through the process again, trying to download SBCL failed.

I've not had the time to figure out a manual Lisp install just yet for testing.

Can you post the error message you're getting when it fails? I'll see if I can figure out what's wrong with it.
Title: Re: MegaStrike v0.1.0 (I made a thing!)
Post by: Lanceman on 25 July 2023, 07:37:03
Can you post the error message you're getting when it fails? I'll see if I can figure out what's wrong with it.

Sorry for the delay. Looking at the roswell github there seems to be some open bug reports, not necessarily on Windows, running into similar issues.

Code: [Select]
$ ros install sbcl
Checking version to install....
Downloading https://github.com/sbcl/sbcl/releases.atom
[##########################################################################]100%
Checking for installed implementation in C:/Users/jacob/.roswell/impls/x86-64/windows/sbcl/2.3.6/
Downloading https://github.com/sbcl/sbcl/archive/sbcl-2.3.6.tar.gz
   9M downloaded.oad
Downloading archive:https://github.com/sbcl/sbcl/archive/sbcl-2.3.6.tar.gz:OK

Extracting archive:C:/Users/jacob/.roswell/archives/sbcl-2.3.6.tar.gz
Downloading http://sourceforge.net/projects/sevenzip/files/7-Zip/9.20/7za920.zip/download#
[##########################################################################]100%

7-Zip (A) 9.20  Copyright (c) 1999-2010 Igor Pavlov  2010-11-18

Processing archive: C:\Users\jacob\.roswell\archives\sbcl-2.3.6.tar.gz

Extracting  sbcl-2.3.6.tar

Everything is Ok

Size:       44748800
Compressed: 9544791
     0 ..Unhandled UIOP/RUN-PROGRAM:SUBPROCESS-ERROR in thread #<SB-THREAD:THREAD "main thread" RUNNING
                                                         {10010C01E3}>:
  Subprocess #<UIOP/LAUNCH-PROGRAM::PROCESS-INFO {1002006563}>
 with command ("C:\\msys64\\usr\\bin\\bash.exe" "-lc"
               "cd \"/c/Users/jacob/.roswell/src/sbcl-2.3.6\"; ./make.sh '--xc-host=C:/msys64/ucrt64/bin/ros.exe -L sbcl-bin without-roswell=t run -- --no-userinit --no-sysinit' '--prefix=/c/Users/jacob/.roswell/impls/x86-64/windows/sbcl/2.3.6'")
 exited with error code 1

Backtrace for: #<SB-THREAD:THREAD "main thread" RUNNING {10010C01E3}>
0: (SB-DEBUG::DEBUGGER-DISABLED-HOOK #<UIOP/RUN-PROGRAM:SUBPROCESS-ERROR {1002039AD3}> #<unused argument> :QUIT T)
1: (SB-DEBUG::RUN-HOOK SB-EXT:*INVOKE-DEBUGGER-HOOK* #<UIOP/RUN-PROGRAM:SUBPROCESS-ERROR {1002039AD3}>)
2: (INVOKE-DEBUGGER #<UIOP/RUN-PROGRAM:SUBPROCESS-ERROR {1002039AD3}>)
3: (CERROR "IGNORE-ERROR-STATUS" UIOP/RUN-PROGRAM:SUBPROCESS-ERROR :COMMAND ("C:\\msys64\\usr\\bin\\bash.exe" "-lc" #<(SIMPLE-BASE-STRING 226) cd "/c/Users/jacob/.roswell/src/sbcl-2.3.6"; ./make.sh '--xc-host=C:/msys64/ucrt64/bin/ros.exe -L sbcl-bin without-roswell=t run -- --no-userinit --no-sysinit' '--prefix=/c/Users/jacob/.roswell/impls/... {1001F4896F}>) :CODE 1 :PROCESS #<UIOP/LAUNCH-PROGRAM::PROCESS-INFO {1002006563}>)
4: (UIOP/RUN-PROGRAM::%CHECK-RESULT 1 :COMMAND ("C:\\msys64\\usr\\bin\\bash.exe" "-lc" #<(SIMPLE-BASE-STRING 226) cd "/c/Users/jacob/.roswell/src/sbcl-2.3.6"; ./make.sh '--xc-host=C:/msys64/ucrt64/bin/ros.exe -L sbcl-bin without-roswell=t run -- --no-userinit --no-sysinit' '--prefix=/c/Users/jacob/.roswell/impls/... {1001F4896F}>) :PROCESS #<UIOP/LAUNCH-PROGRAM::PROCESS-INFO {1002006563}> :IGNORE-ERROR-STATUS NIL)
5: (UIOP/RUN-PROGRAM::%USE-LAUNCH-PROGRAM ("C:\\msys64\\usr\\bin\\bash.exe" "-lc" #<(SIMPLE-BASE-STRING 226) cd "/c/Users/jacob/.roswell/src/sbcl-2.3.6"; ./make.sh '--xc-host=C:/msys64/ucrt64/bin/ros.exe -L sbcl-bin without-roswell=t run -- --no-userinit --no-sysinit' '--prefix=/c/Users/jacob/.roswell/impls/... {1001F4896F}>) :OUTPUT T :IGNORE-ERROR-STATUS NIL)
6: (ROSWELL.INSTALL.SBCL::SBCL-MAKE (:TARGET "sbcl" :VERSION "2.3.6" :VERSION-NOT-SPECIFIED 0 :ARGV NIL))
7: (INSTALL-IMPL "sbcl" NIL NIL (#<FUNCTION (LAMBDA (ROSWELL.INSTALL::ARGV) :IN DECIDE-VERSION) {1005046D2B}> ROSWELL.INSTALL.SBCL::SBCL-ARGV-PARSE ROSWELL.INSTALL.SBCL::SBCL-MSYS ROSWELL.INSTALL.SBCL::SBCL-START START #<FUNCTION (LAMBDA (ROSWELL.INSTALL::ARGV) :IN DECIDE-DOWNLOAD) {10053E7F4B}> ROSWELL.INSTALL.SBCL::SBCL-EXPAND ROSWELL.INSTALL.SBCL::SBCL-PATCH ROSWELL.INSTALL.SBCL::SBCL-CONFIG ROSWELL.INSTALL.SBCL::SBCL-MAKE ROSWELL.INSTALL.SBCL::SBCL-INSTALL ROSWELL.INSTALL.SBCL::SBCL-INSTALL-WIN32 ...))
8: (INSTALL-IMPL-IF-PROBED "sbcl" NIL #<unavailable argument>)
9: (INSTALL NIL)
10: (SB-INT:SIMPLE-EVAL-IN-LEXENV (APPLY (QUOTE MAIN) ROSWELL:*ARGV*) #<NULL-LEXENV>)
11: (SB-INT:SIMPLE-EVAL-IN-LEXENV (ROSWELL:QUIT (APPLY (QUOTE MAIN) ROSWELL:*ARGV*)) #<NULL-LEXENV>)
12: (SB-EXT:EVAL-TLF (ROSWELL:QUIT (APPLY (QUOTE MAIN) ROSWELL:*ARGV*)) NIL NIL)
13: ((LABELS SB-FASL::EVAL-FORM :IN SB-INT:LOAD-AS-SOURCE) (ROSWELL:QUIT (APPLY (QUOTE MAIN) ROSWELL:*ARGV*)) NIL)
14: (SB-INT:LOAD-AS-SOURCE #<CONCATENATED-STREAM :STREAMS NIL {1002B3E6E3}> :VERBOSE NIL :PRINT NIL :CONTEXT "loading")
15: ((LABELS SB-FASL::LOAD-STREAM-1 :IN LOAD) #<CONCATENATED-STREAM :STREAMS NIL {1002B3E6E3}> NIL)
16: (SB-FASL::CALL-WITH-LOAD-BINDINGS #<FUNCTION (LABELS SB-FASL::LOAD-STREAM-1 :IN LOAD) {5FF1FB}> #<CONCATENATED-STREAM :STREAMS NIL {1002B3E6E3}> NIL #<CONCATENATED-STREAM :STREAMS NIL {1002B3E6E3}>)
17: (LOAD #<CONCATENATED-STREAM :STREAMS NIL {1002B3E6E3}> :VERBOSE NIL :PRINT NIL :IF-DOES-NOT-EXIST :ERROR :EXTERNAL-FORMAT :DEFAULT)
18: ((FLET ROSWELL::BODY :IN ROSWELL:SCRIPT) #<SB-SYS:FD-STREAM for "file C:\\msys64\\ucrt64\\etc\\roswell\\install.ros" {1002B3D573}>)
19: (ROSWELL:SCRIPT "C:\\\\msys64\\\\ucrt64\\\\etc\\\\roswell\\\\install.ros" "sbcl")
20: (ROSWELL:RUN ((:EVAL "(ros:quicklisp)") (:SCRIPT "C:\\\\msys64\\\\ucrt64\\\\etc\\\\roswell\\\\install.ros" "sbcl") (:QUIT NIL)))
21: (SB-INT:SIMPLE-EVAL-IN-LEXENV (ROSWELL:RUN (QUOTE ((:EVAL "(ros:quicklisp)") (:SCRIPT "C:\\\\msys64\\\\ucrt64\\\\etc\\\\roswell\\\\install.ros" "sbcl") (:QUIT NIL)))) #<NULL-LEXENV>)
22: (EVAL (ROSWELL:RUN (QUOTE ((:EVAL "(ros:quicklisp)") (:SCRIPT "C:\\\\msys64\\\\ucrt64\\\\etc\\\\roswell\\\\install.ros" "sbcl") (:QUIT NIL)))))
23: (SB-IMPL::PROCESS-EVAL/LOAD-OPTIONS ((:EVAL . "(progn #-ros.init(cl:load \"C:\\\\\\\\msys64\\\\\\\\ucrt64\\\\\\\\etc\\\\\\\\roswell\\\\\\\\init.lisp\"))") (:EVAL . "(ros:run '((:eval\"(ros:quicklisp)\")(:script \"C:\\\\\\\\msys64\\\\\\\\ucrt64\\\\\\\\etc\\\\\\\\roswell\\\\\\\\install.ros\"\"sbcl\")(:quit ())))")))
24: (SB-IMPL::TOPLEVEL-INIT)
25: ((FLET SB-UNIX::BODY :IN SB-IMPL::START-LISP))
26: ((FLET "WITHOUT-INTERRUPTS-BODY-3" :IN SB-IMPL::START-LISP))
27: (SB-IMPL::%START-LISP)
28: ("foreign function: #x14003E2F5")
29: ("foreign function: #x140006930")

unhandled condition in --disable-debugger mode, quitting
Title: Re: MegaStrike v0.1.0 (I made a thing!)
Post by: BATTLEMASTER on 25 July 2023, 08:10:13
Sorry for the delay. Looking at the roswell github there seems to be some open bug reports, not necessarily on Windows, running into similar issues.

Silly me - I forgot to post the terminal output in my own error report.  I believe I'm getting the same error you're getting.
Title: Re: MegaStrike v0.1.0 (I made a thing!)
Post by: doulos05 on 25 July 2023, 16:58:35
Try starting with ros install sbcl-bin.

That will download the binary for your platform instead of trying to compile from source.