I need advice on best way to have fielders chase the ball?

Get help using Construct 2

Post » Fri Jul 10, 2015 7:56 pm

@ASH10500 @PAULLSCOTTROBSON This example did help me figure out how to get started, I tweaked it and figured out how to make it work with my game, thank you for your help.

I am trying to figure out now how to throw to the player closest to a certain base. For example, I am wanting the player with the ball to throw to the player closest to second base by pushing 'W'. It seems to be one tricky thing after another with this baseball game...So far I have it where the player with the ball will turn and throw to second base, so it is partly working. Just now need to figure out how to use the closest too event for this. Any ideas on this?
B
13
S
5
G
1
Posts: 119
Reputation: 2,292

Post » Fri Jul 10, 2015 8:42 pm

Pick Nearest ? If at the same time as you throw the ball to 2nd base , you move the fielder nearest to 2B there - which is basically the same code, is this a good enough approximation ?
My tutorial through development blog is at http://myconstruct2dev.blogspot.co.uk/
B
12
S
3
Posts: 221
Reputation: 1,328

Post » Sat Jul 11, 2015 8:03 am

Message: Ash10500 can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
Here, let me know if you need any more help.
https://www.mediafire.com/?i1zx14n9zjo1io6
B
5
S
1
Posts: 60
Reputation: 495

Post » Sat Jul 11, 2015 9:13 am

Just brainstorming:

I would divide the play into parts (in the event sheet you could use groups for this)

1 - ball gets thrown/player hits
2 - ball is flying/ fielders walk
3 - ball is with fielder/ fielder throws

By disabling/enabling the groups depending on what part of the play is in action, you can have specific events/conditions for that part.
This would probably make a huge difference in readability for your event-sheet as well..

A game like this consists of many or even an enormous amount of conditions depending on how "realistic" you'd like to make it ..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Sat Jul 11, 2015 9:23 am

As Baseball is largely cricket with the skill element removed (ducks) I'd advise spending as much time on the core bits as possible. I've written a lot of cricket Sims but the one that really worked was on the Amiga, I sold a lot of shareware copies of that. The reason was that it actually felt like you were playing cricket, not some quasi graphic simulation of it (the graphics were very basic but sufficient). The player (I think) sort of gets into a zen state where they imagine they are actually playing a real game. These games are very popular with people who'd like to be good at the sport but aren't (I love cricket but am rubbish at it, after 40 years I can mug through on wits, just :-) )

The core of the game is really what we call batting and bowling and I think you call batting and pitching (sorry I'm British ......). Get these right and your game will work. That's what players want to do - fielding almost doesn't matter. My shareware game had a very trivial implementation of fielding (actually you saw nothing except where the ball ended up on a mini scanner) and nobody ever cared about it. I probably wrote it in about 20 minutes. But I spent hours and hours making the batting and bowling feel approximate to the real thing.
My tutorial through development blog is at http://myconstruct2dev.blogspot.co.uk/
B
12
S
3
Posts: 221
Reputation: 1,328

Post » Sat Jul 11, 2015 2:36 pm

@LittleStain

Huh, thanks! it would help the user, I'm a bit new to the whole "making capx and helping other user" thing :P
B
5
S
1
Posts: 60
Reputation: 495

Post » Thu Jul 16, 2015 8:31 pm

@ASH10500 thank you for the example. I am tweaking it to work with my game, it is challening to do but this gave me a good start.

@paulscottrobson Yes this is the most important aspect, the hitting and pitching. Mine needs some help definitely. I agree fielding is secondary to the others. I just want something basic in place. I may rethink it though if I can't get it the way I want it to be and just focus on hitting and pitching solely. Make it auto-field and auto-throw or something.

@littlestain That is a good idea. I have them broken down currently into groups, I am glad I am on the right track. Yes there are a ridiculous amount of conditions. This game is much more difficult than I first imagined.

It is almost overwhelming thinking about it but I have to just take it piece by piece and work on every small aspect of it. The challenge is there are so many possibilities at all times based on where the ball is and fielder is, etc. Thinking through every issue is a challenge. I am just taking it slow though, working on it in 30-45 minute chunks on my lunches to hopefully come up with something decent eventually...
B
13
S
5
G
1
Posts: 119
Reputation: 2,292

Previous

Return to How do I....?

Who is online

Users browsing this forum: wizdigitech, Zamargo and 14 guests