I created a Street Fighter game in NetLogo - Enjoy!

36 views
Skip to first unread message

Bwill

unread,
Sep 22, 2022, 1:28:09 PM9/22/22
to netlogo-users

I created a very basic, Street Fighter, style game. I used the turtle shapes editor to create panels that get switched, giving the illusion of animation (similar to old school animation). But, as you will see, I am no Walt Disney! Animation is tedious work!

Have fun with it and please drop any updates you make back into the repo for others.


Enjoy!

https://github.com/Ramadamadingdang/NetLogo-fighter

James Steiner

unread,
Sep 25, 2022, 7:52:43 PM9/25/22
to Bwill, netlogo-users
Very ambitious!!

I haven't had a chance to look at it yet, but I will as soon as I can!

--
You received this message because you are subscribed to the Google Groups "netlogo-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to netlogo-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/netlogo-users/5b726064-4a2a-49be-a7e1-8fcc093e66acn%40googlegroups.com.

Czar Joseph Castillo

unread,
Sep 27, 2022, 2:36:35 AM9/27/22
to Bwill, netlogo-users
Wow! I'll try this out!

--
You received this message because you are subscribed to the Google Groups "netlogo-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to netlogo-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/netlogo-users/5b726064-4a2a-49be-a7e1-8fcc093e66acn%40googlegroups.com.


--
Rolly Czar Joseph Castillo
Program Coordinator
LEARN Research Institute
Labor Education and Research Network
94 Scout Delgado, Brgy Laging Handa, Quezon City
Email: czjca...@learn.org.ph
Phone: 332-1434
Fax: 376-6735

James Steiner

unread,
Oct 2, 2022, 10:22:19 PM10/2/22
to Bwill, netlogo-users
Great result from a relatively short program! 

On Thu, Sep 22, 2022, 1:28 PM Bwill <barrettw...@gmail.com> wrote:
--

Bwill

unread,
Oct 6, 2022, 4:42:41 PM10/6/22
to netlogo-users
Thanks!

Stephen Guerin

unread,
Oct 6, 2022, 5:36:04 PM10/6/22
to Bwill, netlogo-users
Got around to playing it today because I have a deadline and I need reasons to procrastinate :-) Nice work, Barrett!

I couldn't figure out how the badguy was kicking my butt with jump-kicks until I looked at the code to find the combo. I was a generation before street-fighter I guess :-) But you can see I did learn it and was victorious :-)

image.png

Also I didn't have a numpad on my laptop so remapped movement to WASD  and J/L for punch/kick
image.png

--- -. .   ..-. .. ... ....   - .-- ---   ..-. .. ... ....
Stephen...@Redfish.com
1600 Lena St #D1, Santa Fe, NM 87505
office: (505) 995-0206  mobile: (505) 577-5828   
tw: @redfishgroup  skype: redfishgroup
zoom.redfish.com


--

Stephen Guerin

unread,
Oct 6, 2022, 6:20:33 PM10/6/22
to Bwill, netlogo-users
Barrett,

Again, excellent work getting a fun game together. If you're interested in a learning exercise, there's some modifications you could explore to make your code more "netlogo-ish".

One example:

As I looked at the other warrior combo moves (flying-punch, spin-kick (my new favorite), jump-kick, I see you keeping track of the last 12 moves with12 move variables move1 through move12. This is a common pattern where a turtle or patch might keep track of it's last positions or states. Can you think of a way to modify your update-move-chain using a list instead of 12 variables and using fput and but-last to update the move-chain and using sublist to get the last 4 moves to compare against known move combos? 

to update-move-chain [new-move]
  ;this tracks the last 12 moves.  This is used for cheat codes and special combo moves
  ask one-of warriors [
    set move12 move11
    set move11 move10
    set move10 move9
    set move9 move8
    set move8 move7
    set move7 move6
    set move6 move5
    set move5 move4
    set move4 move3
    set move3 move2
    set move2 move1
    set move1 new-move
  ]

-Stephen

Barrett Williams

unread,
Oct 7, 2022, 10:33:30 AM10/7/22
to stephen...@redfish.com, netlogo-users
That's great that you've found the combo moves! 

So, use a list instead of 12 separate variables?  Let me dig into that and see if I can figure that out.  I've read about lists in NetLogo but haven't dived into playing with them yet.  As I understand them, they're NetLogo's arrays.  I'll see what I can come up with!

BTW, the magic number 12 comes from the old Nintendo game Contra.  It had a cheat code that was "up up down down left right left right A B B A"--12 moves :).  That was the granddaddy of all cheat codes so I figured that would be a sufficient number!  With lists, it sounds like the number would have no upper bound--a much better solution.

Thanks for the feedback and suggestions Stephen.

James Steiner

unread,
Oct 7, 2022, 8:37:06 PM10/7/22
to Barrett Williams, Steve Guerin, netlogo-users
There's a number of places that a little more NetLogo knowledge could make your code DRYer, so you have room to grow if interested.

You may enjoy looking at Zombie Attack! on the modelling commons. It's got some interesting features, if I do say so myself.


Barrett Williams

unread,
Oct 10, 2022, 1:08:31 PM10/10/22
to James Steiner, Steve Guerin, netlogo-users
Thank you James I'll definitely take a look.
Reply all
Reply to author
Forward
0 new messages