Author Topic: Inprogress: tictactoe_a1  (Read 2236 times)

Toolwut

  • Stingray
  • Posts: 60
Inprogress: tictactoe_a1
« on: September 26, 2020, 01:51:46 PM »
Intended for 1v1, pgp-only, no nades.

How to: Get 3 in a row to win.

Shoot a button on your side of the map to place a circle / cross. In the map version appended, the two rooms aren't separated so you can test the map solo (which can easily be exploited in 1v1, so be fair).

** Place cross.jpg and circle.jpg in pball/textures/test/ **

What is missing?

I don't know how to reset all entities once the round is over. Maybe someone can help. Other option is to set fraglimit to 1 so after one round the match ends. Doesn't work for tie though ... how can I give both teams 1 point?

Nades spawning with the player destroy the whole concept - is there a way for a mapper to disable nade spawning?

How does this work?

After you have shot a button, your control panel is temporarily "disabled" aka hidden behind a brush. The button you shot gets permanently disabled, the corresponding button for the other player as well. Now the other player can make his move.
The field in the center works with func_trains teleporting up / down.
A winner is determined by using trigger_counters. 3 for all rows, 3 for all columns, 2 for diagonals and all of that for each team. Once a trigger_counter reaches 3, the loser is killed with a trigger_hurt so that the winner gets a point on the scoreboard (and the match ends when fraglimit 1 is set).

Things I noticed while building this:

As stated on other threads, wasn't able to make func_buttons with "health" "1" team-specific. Apparently on an older waits, team-specificity was introduced for trigger_multiple, also didn't work for me (maybe this was removed).
Trigger_hurts need to have the spawnflag toggle set to be toggle-able. Setting start_off and nothing else apparently makes them entirely useless.

... An entity (and a command) that can give a specified team points would be great, not only for this "gamemode" but also for others like whoa's oddball

« Last Edit: September 27, 2020, 02:02:10 AM by Toolwut »

Toolwut

  • Stingray
  • Posts: 60
Re: Inprogress: tictactoe_a1
« Reply #1 on: September 26, 2020, 01:56:56 PM »
Map file didn't fit into the first post. Feel free to do whatever you want with. And I probably used far too many trigger_relays :)

The .wal's are copies of a different one (pball/jungle1.wal or something). Needed those for using my custom cross and circle textures but that's the reason why those aren't aligned.

Also, when I originally used smaller wals (copied and renamed two of the clock number textures) the map compiled but didn't load (game freezed without any error message).

Toolwut

  • Stingray
  • Posts: 60
Re: Inprogress: tictactoe_a1
« Reply #2 on: September 27, 2020, 12:56:51 AM »
What is missing?

I don't know how to reset all entities once the round is over. Maybe someone can help. Other option is to set fraglimit to 1 so after one round the match ends. Doesn't work for tie though ... how can I give both teams 1 point?

In case there is no clean native way to check that one spawnflag and everything resets, I will use trigger_elevators to reset all func_trains on round end / start. Only serious remaining issue is that trigger_counter's remove themselves after a sequence has been completed. Any ideas for that?

Toolwut

  • Stingray
  • Posts: 60
Inprogress: tictactoe_a4
« Reply #3 on: October 02, 2020, 04:37:09 PM »
Skipped some versions for incomprehensible reasons. Now at _a4. 697 entities used.

Changes:
Everything is resettable now (not a trivial task with func_trains and trigger_counters; the trigger_elevator approach didn't work).
-> You can play multiple rounds in a row. Loser starts next round.

For a fairer match set "grenades paint 0" (server sided) so you can't shoot multiple buttons at once.

Restrictions:
Resetting everything takes some time so better wait until it's finished.

More things noticed:
You can't teleport multiple func_trains at once / teleport one to the next path_corner and instantly to the next one.

The _sun_angles returned by typing "angles" in-game returns messed up values. The second value must be sign-flipped and the first one also doesn't make sunlight go where it should.

The game needs an easier way to reset entity states at round end. Single use entities don't (usually) make sense in a round-based game. I mean "wait" "-1" keypairs, "killtarget", func_train locations, trigger_counters etc.

Here is the best entity reference out there: http://panjoo.tastyspleen.net/rust/quake2tutorials.html

Never trust the DP2 fgd (entity information) file. Much information is deprecated (e.g. listing target_laser, target_changelevel, target_lightramp, target_spawner), incomplete (teleport spawnflag missing from path_corner) or just so short that it's not helpful (how to build a clock, an elevator, a pong ball). Hopefully at some point the forum search will be reliable again :)

Most importantly a big thank you to sort for spontaneously coding 3 new updates for BSP to make my life easier. 2D and 3D view will soon display pathtargets and killtargets, editing values for a selection of entities will get easier.

3lf

  • Map Committee
  • VM-68
  • Posts: 121
Re: Inprogress: tictactoe_a1
« Reply #4 on: October 09, 2020, 02:44:33 AM »
Ban this man

Toolwut

  • Stingray
  • Posts: 60
Re: Inprogress: tictactoe_a1
« Reply #5 on: October 13, 2020, 11:26:01 AM »
Glad you like it. 4D chess coming soon.

Toolwut

  • Stingray
  • Posts: 60
TICTACTOE AS A (PAINTBALL) CONSOLE GAME!
« Reply #6 on: October 13, 2020, 03:50:45 PM »
I received much positive feedback for this map so I decided to implement tictactoe as a console game (obviously offline because there's no way to make this online):

Paste the lines below into your config.cfg (at your own risk, though any likely risk should be that it overwrites some of your cvars or aliases).

Type "tttstatus"

Start playing.

It even resets and detects if a field is already set :)

(@jitspoe apparently I can't edit the attachments of a post anymore?) Edit: Code below now prints the final field when someone won. Couldn't update the faulty screenshot.

Code won't handle ties but I'm too lazy to edit thousands of aliases (again). In case some madman actually plays it he would simply have to add another cvar that gets increased whenever a player makes his move and triggers some tie event when it's on 9 and nobody won :)

-----------------------------------------------------------------------------

seta ul "-"
seta um "-"
seta ur "-"
seta ml "-"
seta mm "-"
seta mr "-"
seta ol "-"
seta om "-"
seta or "-"
alias tttstatus "echo _ | l m r; echo u | $ol $om $or; echo m | $ml $mm $mr; echo l | $ul $um $ur; echo; echo Player $tttturn turn. 0 places x, 1 places o.; echo Type set<coordinate of the field you want to set>, e.g. setul for upper left."
alias tttreset "seta ol -; seta om -; seta or -; seta ml -; seta mm -; seta mr -; seta ul -; seta um -; seta ur -"
seta tttturn 0
alias setul "setulx"
alias setulx "setul$tttturn; cvar_toggle tttturn; tttstatus; alias setul tttalreadyset "
alias setul0 "seta ol x; cvar_inc sw1 1; cvar_inc ss1 1;cvar_inc sndia 1;tttcheck"
alias setul1 "seta ol o; cvar_inc cw1 1; cvar_inc cs1 1;cvar_inc cndia 1;tttcheck"

alias setml "setmlx"
alias setmlx "setml$tttturn; cvar_toggle tttturn; tttstatus; alias setml tttalreadyset "
alias setml0 "seta ml x; cvar_inc sw2 1;cvar_inc ss1 1;tttcheck"
alias setml1 "seta ml o; cvar_inc cw2 1;cvar_inc cs1 1;tttcheck"

alias setll "setllx"
alias setllx "setll$tttturn; cvar_toggle tttturn; tttstatus; alias setll tttalreadyset "
alias setll0 "seta ul x; cvar_inc sw3 1;cvar_inc ss1 1;cvar_inc spdia 1;tttcheck"
alias setll1 "seta ul o; cvar_inc cw3 1;cvar_inc cs1 1;cvar_inc cpdia 1;tttcheck"

alias setum "setumx"
alias setumx "setum$tttturn; cvar_toggle tttturn; tttstatus; alias setum tttalreadyset"
alias setum0 "seta om x; cvar_inc sw1 1; cvar_inc ss2 1;tttcheck"
alias setum1 "seta om o; cvar_inc cw1 1; cvar_inc cs2 1;tttcheck"

alias setmm "setmmx"
alias setmmx "setmm$tttturn; cvar_toggle tttturn; tttstatus; alias setmm tttalreadyset "
alias setmm0 "seta mm x; cvar_inc sw2 1; cvar_inc ss2 1; cvar_inc spdia 1; cvar_inc sndia 1;tttcheck"
alias setmm1 "seta mm o; cvar_inc cw2 1; cvar_inc cs2 1; cvar_inc cpdia 1; cvar_inc cndia 1;tttcheck"

alias setlm "setlmx"
alias setlmx "setlm$tttturn; cvar_toggle tttturn; tttstatus; alias setlm tttalreadyset "
alias setlm0 "seta um x; cvar_inc sw3 1; cvar_inc ss2 1;tttcheck"
alias setlm1 "seta um o; cvar_inc cw3 1; cvar_inc cs2 1;tttcheck"

alias setur "seturx"
alias seturx "setur$tttturn; cvar_toggle tttturn; tttstatus; alias setur tttalreadyset "
alias setur0 "seta or x; cvar_inc sw1 1; cvar_inc ss3 1; cvar_inc sndia 1;tttcheck"
alias setur1 "seta or o; cvar_inc cw1 1; cvar_inc cs3 1; cvar_inc cndia 1;tttcheck"

alias setmr "setmrx"
alias setmrx "setmr$tttturn; cvar_toggle tttturn; tttstatus; alias setmr tttalreadyset "
alias setmr0 "seta mr x; cvar_inc sw2 1; cvar_inc ss3 1;tttcheck"
alias setmr1 "seta mr o; cvar_inc cw2 1; cvar_inc cs3 1;tttcheck"

alias setlr "setlrx"
alias setlrx "setlr$tttturn; cvar_toggle tttturn; tttstatus; alias setlr tttalreadyset "
alias setlr0 "seta ur x; cvar_inc sw3 1; cvar_inc ss3 1; cvar_inc sndia 1;tttcheck"
alias setlr1 "seta ur o; cvar_inc cw3 1; cvar_inc cs3 1; cvar_inc cndia 1;tttcheck"

alias tttalreadyset echo This field is already set!;
alias tttaliasreset "alias setul setulx; alias setml setmlx; alias setll setllx; alias setum setumx; alias setmm setmmx; alias setlm setlmx; alias setur seturx; alias setmr setmrx; alias setlr setlrx"
seta cw1 0
seta cw2 0
seta cw3 0
seta cs1 0
seta cs2 0
seta cs3 0
seta cpdia 0
seta cndia 0
seta sw1 0
seta sw2 0
seta sw3 0
seta ss1 0
seta ss2 0
seta ss3 0
seta spdia 0
seta sndia 0
alias tttcheck "tttwin$cw1;wait;tttwin$cw2;wait;tttwin$cw3;wait;tttwin$cs1;wait;tttwin$cs2;wait;tttwin$cs3;wait;tttwin$cpdia;wait;tttwin$cndia;wait;tttwin$sw1;wait;tttwin$sw2;wait;tttwin$sw3;wait;tttwin$ss1;wait;tttwin$ss2;wait;tttwin$ss3;wait;tttwin$spdia;wait;tttwin$sndia"
alias tttwin0 ""
alias tttwin1 ""
alias tttwin2 ""
alias tttwin3 "tttstatus;echo -----------------;echo;echo Player $tttturn wins!;echo;tttreset;tttcountreset;tttaliasreset;echo -----------------"
alias tttcountreset "seta cw1 0; seta cw2 0; seta cw3 0; seta cs1 0; seta cs2 0; seta cs3 0; seta cpdia 0; seta cndia 0; seta sw1 0; seta sw2 0; seta sw3 0; seta ss1 0; seta ss2 0; seta ss3 0; seta spdia 0; seta sndia 0"

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Re: Inprogress: tictactoe_a1
« Reply #7 on: November 09, 2020, 04:00:03 AM »
You could add some paint grenade spawns (without count set) outside of the playable space to prevent players from getting those.

Also, you're crazy.

3lf

  • Map Committee
  • VM-68
  • Posts: 121
Re: Inprogress: tictactoe_a1
« Reply #8 on: November 09, 2020, 04:07:44 AM »
Unsubscribe! Unsubscribe!