November 21, 2024, 08:02:02 pm

The Gang Garrison 2 Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

NOTICE: Wondering where all the forums have gone?

Join the community Discord server!

Pages: 1 [2] 3 4

Author Topic: Solo Training Mod  (Read 25778 times)

AKVARI

  • Full Member
  • ***
  • Karma: 11
  • Offline Offline
  • Posts: 509
Re: Solo Training Mod
« Reply #15 on: July 13, 2017, 03:18:58 am »

I get like 10FPS on your new map  :z7: but I tried to play it and it seemed pretty well.
Except that it's not quite easy, the medic can die easily (first one) and maybe even get stuck.

Anyways if you find a way to reduce lag for potatoes then please do it.

Lorgan

  • Retired Randomizer Mod Developer
  • Resident Miku
  • *****
  • Karma: 28
  • Offline Offline
  • Posts: 3625
    • My own website
Re: Solo Training Mod
« Reply #16 on: July 13, 2017, 12:01:22 pm »

Tried to mess with it a bit and I'm having some issues:
  • I can tell the bots to chase a sentry but they will only aim at it. They still move to the closest enemy and refuse to shoot anything.
  • The death event doesn't seem to trigger correctly, perhaps in combination with reusing the npcs (try the map I added and let the scouts come in a couple times)

Also some feature requests:
  • A task for a bot to go somewhere that doesn't imply placing a sentry / zooming in.
  • An event for successfully placing a sentry.

Otherwise this seems fun to play around with.
Logged
Unfortunately, turning a section into a communist oppressive regime is not against the forum rules, so there is really nothing we can do.
Quote from: steam
21:08 - Hullusorsa: lorgan, when will you buy us the keys?
21:09 - Lorgan: i'm waiting for greece to collapse so the value of the euro drops
21:09 - Lorgan: not even joking

Lorgan

  • Retired Randomizer Mod Developer
  • Resident Miku
  • *****
  • Karma: 28
  • Offline Offline
  • Posts: 3625
    • My own website
Re: Solo Training Mod
« Reply #17 on: July 18, 2017, 07:28:28 am »

Is this dead already?
Logged
Unfortunately, turning a section into a communist oppressive regime is not against the forum rules, so there is really nothing we can do.
Quote from: steam
21:08 - Hullusorsa: lorgan, when will you buy us the keys?
21:09 - Lorgan: i'm waiting for greece to collapse so the value of the euro drops
21:09 - Lorgan: not even joking

AKVARI

  • Full Member
  • ***
  • Karma: 11
  • Offline Offline
  • Posts: 509
Re: Solo Training Mod
« Reply #18 on: July 18, 2017, 07:44:46 am »

Is this dead already?
Probably not. I & undefinedVoid are planning to do some maps with this mod.

[FR]YB

  • 2013 Haxxy Award Winner
  • *
  • Karma: 28
  • Offline Offline
  • Posts: 642
  • There are 11 people playing holy sh
Re: Solo Training Mod
« Reply #19 on: July 18, 2017, 09:14:47 am »

Is this dead already?
No, but I was away all weekend.
I suppose I should have acknowledged your previous post - especially given how rare your posts are! - but I hadn't tested your map yet, and I haven't made any progress on the mod so far either. I do plan to keep working on it.

So I've just tested your map, and yeah I see what's going on with the scouts.
npcCreateObject adds the current Player to the global.players list, so you end up with multiple references to the same Player.
If you want to respawn an NPC, use doEventSpawnPos(npc, x, y) and make sure to reset the npc's alarm[5] to prevent an endless respawn loop. If you meant to create a new NPC, use the snippet below. I'll implement a npcDuplicate function to make copying easier.
Code: (GML) [Select]
    npcEventAdd(NPC_EVENT_DEATH, '
with(instance_copy(true)) {
object = -1;
alarm[5] = -1;
npcCreateObject(id, TEAM_BLUE, CLASS_SCOUT);
npcSetTask(NPC_TASK_CHASE, global.mvm_decoy_engineer.sentry);
}
    ');

Don't use alarms by the way. Alarms 0, 1 and 5 are used by Player and/or NPC. I'll let you use 6 to 11 next update.

I'll probably postpone the performance optimisations, so that I can push an update with more features and other bugfixes instead.

Lorgan

  • Retired Randomizer Mod Developer
  • Resident Miku
  • *****
  • Karma: 28
  • Offline Offline
  • Posts: 3625
    • My own website
Re: Solo Training Mod
« Reply #20 on: July 18, 2017, 11:55:12 am »

ic

No I didn't mean to create a new one, I wanted to make the scouts keep coming until the sentry is destroyed.
Will you also take a look at the bots that don't seem to attack sentries?
Logged
Unfortunately, turning a section into a communist oppressive regime is not against the forum rules, so there is really nothing we can do.
Quote from: steam
21:08 - Hullusorsa: lorgan, when will you buy us the keys?
21:09 - Lorgan: i'm waiting for greece to collapse so the value of the euro drops
21:09 - Lorgan: not even joking

[FR]YB

  • 2013 Haxxy Award Winner
  • *
  • Karma: 28
  • Offline Offline
  • Posts: 642
  • There are 11 people playing holy sh
Re: Solo Training Mod
« Reply #21 on: July 19, 2017, 04:21:16 pm »

Will you also take a look at the bots that don't seem to attack sentries?
Of course
As it is, it's because setting the task to chase with an argument also sets the forceAim flag, which forces the aimDirection and then exits the AI aim script before the script can tell the bot to fire.
I've got a bit of thinking to do here, but I suppose the easy thing to do is to just let the rest of the aim AI run normally even with forceAim on.
Which probably is how you'd expect the flag to work to begin with, now that I think about it.
Why did I not make it do that in the first place?

[FR]YB

  • 2013 Haxxy Award Winner
  • *
  • Karma: 28
  • Offline Offline
  • Posts: 642
  • There are 11 people playing holy sh
Re: Solo Training Mod
« Reply #22 on: July 25, 2017, 05:47:35 pm »

I'm pushing things on GitHub!

I've been working on Lorgan's remarks and a bunch of fixes with the bot aiming script. I've done most of the work I wanted to get done for the next update, so hopefully I'll get to finish it and bundle it all nicely this weekend. Best case scenario it's all done tomorrow, optimistic scenario says it's ready to download this Friday.

The current "roadmap" looks like this:
[0.4.1] Fixes
 :c8: fix forceAim
 :c8: fix sentry targeting
 + implement event NPC_SENTRY_BUILT
 :c8: bind server socket to random port (instead of forcing default port 8190)

[0.4.2] Couple of nice things
 + npcDuplicate
 + store completed scenarios with best times per class
 + implement event PLAYER_BUBBLE
 + order map menu by map name, with pagination

[0.5.x] Optimisation (each item would be a minor update by itself)
 + don't destroy and recreate a server to restart a scenario
 + simplify AI
 + simplify physics
 + remove use of sockets altogether (too ambitious??)

Lorgan

  • Retired Randomizer Mod Developer
  • Resident Miku
  • *****
  • Karma: 28
  • Offline Offline
  • Posts: 3625
    • My own website
Re: Solo Training Mod
« Reply #23 on: July 26, 2017, 03:06:57 am »

yay!

About the optimisations, removing sockets seems one of the easier things to me :P
There is probably some hidden issue I don't think about but ripping out all network related stuff sounds fairly straight forward.
The physics on the other hand sounds impossible (to do correctly) because it will behave different from the main game while it's kind of the point that it's the same. I do think you could get the most performance gains here though. As for AI, was that node system / navmesh thing ever done in tempest bots? I think that's the only way to make them do less collision checks (= less lag) without making them dumber.
Logged
Unfortunately, turning a section into a communist oppressive regime is not against the forum rules, so there is really nothing we can do.
Quote from: steam
21:08 - Hullusorsa: lorgan, when will you buy us the keys?
21:09 - Lorgan: i'm waiting for greece to collapse so the value of the euro drops
21:09 - Lorgan: not even joking

[FR]YB

  • 2013 Haxxy Award Winner
  • *
  • Karma: 28
  • Offline Offline
  • Posts: 642
  • There are 11 people playing holy sh
Re: Solo Training Mod
« Reply #24 on: July 26, 2017, 04:56:45 pm »

>>> VERSION 0.4.1 IS OUT <<<

No big changes for the end user, but interesting stuff for map makers.
  • Now you can setNpcTask(NPC_TASK_STAY, instance); and tell the NPC to stay at a given point! What if the point is a mobile payload? Boom, payload escort scenario! Protip: the PathPoint object is made for that
  • New events! NPC now has NPC_EVENT_SENTRY_BUILT, and EventManager gets PLAYER_EVENT_SENTRY_BUILT and PLAYER_EVENT_SENTRY_DOWN!
  • You can now safely add alarm events, and they get cleared up! All alarm events are safe to use with EventManager, and NPC can use all alarms except 0, 1 and 5!

The documentation will be updated tomorrow to reflect that.
Didn't test much, I just grabbed the previous zip, and replaced the source and the exe. Let me know if something's wrong.

More internal changes:
  • Refactored the movement AI
  • Updated aim AI: the aim randomizer, and the medic target selection

About the optimisations, removing sockets seems one of the easier things to me :P
There is probably some hidden issue I don't think about but ripping out all network related stuff sounds fairly straight forward.
I was thinking it would mostly be trouble because of all standard input, INPUT_STATE and all that. But actually it's probably fairly easy to replicate, since I already somewhat do that for NPC input. We'll see, I suppose.

The physics on the other hand sounds impossible (to do correctly) because it will behave different from the main game while it's kind of the point that it's the same. I do think you could get the most performance gains here though. As for AI, was that node system / navmesh thing ever done in tempest bots? I think that's the only way to make them do less collision checks (= less lag) without making them dumber.
I'd be okay with losing a bit of accuracy in favour of speed, because it's up to the scenario maker to decide whether the map should use simplified physics or vanilla physics. And if the player manages to break into walls by detojumping at incredible hihg speed from a very specific angle, it doesn't matter if it's gamebreaking, it's a solo mod. If anything, it gives purpose to speedrunners.  :x6:
Orpheon got something to work at some point, but I have no idea if the code was ever published. Back in the day I wanted to pre-generate a mesh of PathPoints, but never got to implement it. That will probably be a lot of work, if I do end up coding it.

Kevin Kuntz

  • Heroic Member
  • ****
  • Karma: -58
  • Offline Offline
  • Posts: 708
  • panda took the kids
    • Rav And Kill Bill
Re: Solo Training Mod
« Reply #25 on: July 26, 2017, 05:07:26 pm »

Cool, i like this mod.
Logged
I PEAKED
I PEAKED

Lorgan

  • Retired Randomizer Mod Developer
  • Resident Miku
  • *****
  • Karma: 28
  • Offline Offline
  • Posts: 3625
    • My own website
Re: Solo Training Mod
« Reply #26 on: August 01, 2017, 08:12:45 am »

Oh man, getting these bots to do what I want was pretty hard. (They're still way too triggerhappy)

It's not completely how I wanted it and the map totally wasn't designed for it but it gets the lorgan seal of "good enough".
If anyone wants to try it:
Logged
Unfortunately, turning a section into a communist oppressive regime is not against the forum rules, so there is really nothing we can do.
Quote from: steam
21:08 - Hullusorsa: lorgan, when will you buy us the keys?
21:09 - Lorgan: i'm waiting for greece to collapse so the value of the euro drops
21:09 - Lorgan: not even joking

[FR]YB

  • 2013 Haxxy Award Winner
  • *
  • Karma: 28
  • Offline Offline
  • Posts: 642
  • There are 11 people playing holy sh
Re: Solo Training Mod
« Reply #27 on: August 01, 2017, 03:12:55 pm »

Oh man, getting these bots to do what I want was pretty hard. (They're still way too triggerhappy)

It's not completely how I wanted it and the map totally wasn't designed for it but it gets the lorgan seal of "good enough".
If anyone wants to try it:

Nice! Thanks for doing that, I'll link it on the front page.
Beat it in four tries, I had a hard time keeping the engi alive in the final part. I should have switched to qwerty, because with in azerty the Q key which I use to go left, also gets you off the titan. I just made it harder for myself, heh

Code: [Select]
loadserverplugins("titans@b8b7268a7adb2f94931d732d56a71115");Cheeky bastard :p

Code: [Select]
// no win event?Good call, I'll add that to the todo list

Lorgan

  • Retired Randomizer Mod Developer
  • Resident Miku
  • *****
  • Karma: 28
  • Offline Offline
  • Posts: 3625
    • My own website
Re: Solo Training Mod
« Reply #28 on: August 02, 2017, 01:32:34 am »

Yeah the soldiers tend to clump up and the map is too cramped for the titan to move around properly.

Code: [Select]
loadserverplugins("titans@b8b7268a7adb2f94931d732d56a71115");Cheeky bastard :p
hehe, I always gotta try and abuse something. And turns out that loading serversent plugins in a scenario is pretty easy.

Edit: Also if someone has a good idea and a map but no coding experience I'm willing to help if it's not too complex.
Disclaimer: offer valid until I become lazy again.
« Last Edit: August 02, 2017, 03:52:00 am by Lorgan »
Logged
Unfortunately, turning a section into a communist oppressive regime is not against the forum rules, so there is really nothing we can do.
Quote from: steam
21:08 - Hullusorsa: lorgan, when will you buy us the keys?
21:09 - Lorgan: i'm waiting for greece to collapse so the value of the euro drops
21:09 - Lorgan: not even joking

[FR]YB

  • 2013 Haxxy Award Winner
  • *
  • Karma: 28
  • Offline Offline
  • Posts: 642
  • There are 11 people playing holy sh
Re: Solo Training Mod
« Reply #29 on: August 09, 2017, 05:07:40 pm »

Progress is being made on the next version. I added a couple of events, pagination, and I'm working on the scenario completion thing. The full changelog will be available when I release the next version, which should happen this weekend. I'll make sure to force myself to write the documentation for the new functions and events before I do the release.

I'm also working on my newest map stm_hostage at the same time, testing things out. Does anyone know who made the original moe moe medic sprites (see attached)? I'd like to use them, but I don't know who to ask.

In the meantime, here's a link to a discord server, because all the cool kids use discord these days. It's mostly useful if you want notifications when I push new code to GitHub, want to make maps, and want to see my todo list.
Pages: 1 [2] 3 4
 

Page created in 0.032 seconds with 49 queries.