playMaker

Poll

Football Simulator in Playmaker

using PLAYMAKER
1 (100%)
.
0 (0%)

Total Members Voted: 1

Author Topic: Football Simulator in playmaker  (Read 7132 times)

rosemary

  • Playmaker Newbie
  • *
  • Posts: 8
Football Simulator in playmaker
« on: October 14, 2013, 08:17:17 AM »
hi, I'm working on a football smulation, and I want to do a 2D interface that I can drag a player from a button (look like a circle because in the 2D interface) than draw the trajectory of my player (in the 2D interface) ... i want to record the trajectory and play it... and see it in 3D (rendered)... how can this interface be done and linked to 3d????in playmaker?
N.B: 2D interface and the 3D interface must be in the game state f unity!!
any suggestions?
« Last Edit: November 01, 2013, 06:22:34 AM by rosemary »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Interface 2D and 3D in the game state
« Reply #1 on: October 14, 2013, 08:24:32 AM »
Hi,


 Could you provide screenshots? or dummy examples of what you are trying to achieve? that will help discussing about the same thing. I am picturing what you are saying, but there can be so many ways as I think of it...

bye,

 Jean

rosemary

  • Playmaker Newbie
  • *
  • Posts: 8
Re: Interface 2D and 3D in the game state
« Reply #2 on: October 14, 2013, 09:58:48 AM »

Im trying to do something like Tactic3D Football

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Interface 2D and 3D in the game state
« Reply #3 on: October 15, 2013, 02:12:46 AM »
Hi,

 I worked years ago on two similar simulators for football tactics and practices, it was great fun!

This is going to be very very tricky. You need to define what you want to take from the touch movement, you will want to record points and then process them to standardize speed, so you need to look at a spline generation system and some pretty complex algorythms.

 I would start by contacting existing spline creation tools available on the asset store and ask them if they support spline generation based on a list of points generated by a touch event. This is your first step.

Else, you should create a recording system very much like how vectrosity did for its drawing system, where you record a new point with fixed distances in between, then you can create a spline/path based on that ( again using an existing system on the asset store). you store that spline, and this is your base to replay the action.

The brute force version is to record the absolute position every fixed time laps and replay that as is. for example, record every half a second the position of the touch, and you get a list of points with a fixed time step gap. when you replay you simply position the player every halves a seconds on the related position.


 So, in all cases you are in for some pretty complex system :) Keep us updated on your progress!

If you have trouble with all this, let me know, we'll see how we can progress on this.

bye

Jean

rosemary

  • Playmaker Newbie
  • *
  • Posts: 8
Re: Interface 2D and 3D in the game state
« Reply #4 on: October 16, 2013, 05:37:13 AM »
Hi Jean,

Thank you for your help,
regarding the spline,I contact them, the spline implementation doesn't support runtime access out of the box. It isn't impossible, but will require some code adjustments...

Im still confused..
I'm going to make my 2D interface I want to know how it can be related to the 3D interface...



jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Interface 2D and 3D in the game state
« Reply #5 on: October 17, 2013, 01:36:58 AM »
Hi,

 Actually, you are going to do a 3d ui interface. the line will be drawn on the field, not on the 2d "screen".

Now, if you want to translate a position from screen to the 3d world and back, you have a series of actions for this like "ScreenToWorldPoint" and "WorldtoScreenPoint".

Bye,

 Jean


rosemary

  • Playmaker Newbie
  • *
  • Posts: 8
trajectory for the players
« Reply #6 on: October 25, 2013, 07:57:12 AM »
Hi Jean,
I did the 2D interface, with the draggable buttons for the players (ngui)
so now I want to draw the trajectory of each player (buttons 2D)

which one can help me the most
Vectrosity or spline trail renderer or Curvy?????


« Last Edit: November 01, 2013, 06:30:34 AM by rosemary »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Interface 2D and 3D in the game state
« Reply #7 on: October 26, 2013, 02:11:00 AM »
Hi,

 Vectrosity would be a good starting point.

bye,

 Jean

rosemary

  • Playmaker Newbie
  • *
  • Posts: 8
Re: Interface 2D and 3D in the game state
« Reply #8 on: October 28, 2013, 03:58:40 AM »
Okkk thank you Jean!!!
when I finish the trajectory, I will tell you to help me with the next step!!

rosemary

  • Playmaker Newbie
  • *
  • Posts: 8
Record System and replay
« Reply #9 on: November 01, 2013, 05:07:51 AM »



The brute force version is to record the absolute position every fixed time laps and replay that as is. for example, record every half a second the position of the touch, and you get a list of points with a fixed time step gap. when you replay you simply position the player every halves a seconds on the related position.


 So, in all cases you are in for some pretty complex system :) Keep us updated on your progress!

If you have trouble with all this, let me know, we'll see how we can progress on this.


Hi Jean,
everything is going well till now...
I will start with the recording and I want to have steps very much like the simulator tactic3d...
can you help me a little bit more in this system, as in providing me with more detailed information, based on your professional background.
 
« Last Edit: November 01, 2013, 06:19:54 AM by rosemary »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Football Simulator in playmaker
« Reply #10 on: November 01, 2013, 07:19:37 AM »
Hi,

 I would do the following,

 During the process of recording the touch drag to draw the path, record a poins on a distance threshold, say 0.5 world unit, so if the user is only moving slightly, don't record anything, only when you detect that the last recorded point distance from the current touch is greater then 0.5, then you record one more point.

-- then you have a "linear" description of the curve drawn by the user, you can play back that curve or draw that curve the way you want then,

-- I would record each point in a simple text file, where each point is one line. Look up the forum, I created some action to serialize a vector4 into a string and back. Then it works well with ArrayMaker as there is an action to load a text file based on a delimiter char ( the return char).

Experiment with this, and if you are stuck, let me know.

Bye,

 Jean