Author Topic: What are you working on? :D  (Read 34422 times)

0 Members and 1 Guest are viewing this topic.

annikk.exe

  • Achiever
  • Ent
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1,794
Re: What are you working on? :D
« Reply #435 on: August 06, 2011, 10:05:18 PM »
The number one thing that causes a lot of lag is loops within loops.
Eg:
For each asteroid
Compare to all other asteroids


Loops within loops are somewhat inevitable though, unless you build an ai that precalculates all the relationships during levelsetup and stores the data in a series of matrices.. But that is not a trivial thing to do, and means the ai can't cope with moving asteroids.

The number one challenge in building a deadly ai is identifying generalised circumstances with generalised responses.  Once you know what the ai ought to do in a given circumstance, you can build your rules so it responds appropriately to that situation.

For example, imagine the ai starts with a single asteroid, with 2/4 trees, 50 seedlings, and two nearby asteroids - one with good stats and 3 neighbouring unknown asteroids, the other with average stats and 2 neighbouring asteroids.
What is the optimal opening actions for the ai to take?

Aino

  • Ent
  • ******
  • Thank You
  • -Given: 1
  • -Receive: 20
  • Posts: 1,483
  • They'll eat you next!
  • Eufloria: Yes
Re: What are you working on? :D
« Reply #436 on: August 06, 2011, 11:22:09 PM »
I have made that pre defined loop thing, and it's much more efficient with resources than my previous one, but you should do a variable "IsMoving" or something, true/false if the asteroid ont he map moves, if so: use the check while playing and if not use the pre defined matrices :)

Pilchard123

  • Tester
  • Old Oak
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 17
  • Posts: 899
  • Eufloria: Yes
Re: What are you working on? :D
« Reply #437 on: August 07, 2011, 08:05:12 AM »
Did anyone work out how to get hold of the game's reachability data? it would be really useful, though I can work without it.

Aino

  • Ent
  • ******
  • Thank You
  • -Given: 1
  • -Receive: 20
  • Posts: 1,483
  • They'll eat you next!
  • Eufloria: Yes
Re: What are you working on? :D
« Reply #438 on: August 07, 2011, 12:43:44 PM »
I think you'll need to work without it :/

annikk.exe

  • Achiever
  • Ent
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1,794
Re: What are you working on? :D
« Reply #439 on: August 07, 2011, 01:37:47 PM »
Personally I've always just calculated it myself based on asteroid positions, radiuses and send distances.

I'm enjoying our discussions on ai a great deal. :>

Aino

  • Ent
  • ******
  • Thank You
  • -Given: 1
  • -Receive: 20
  • Posts: 1,483
  • They'll eat you next!
  • Eufloria: Yes
Re: What are you working on? :D
« Reply #440 on: August 07, 2011, 02:10:19 PM »
I think I'll improve my AI to depend on alot of stuff to do actions, but first I'm going for a vacation tommorow(7 days) and I wanna re-learn all the java things, as last time(when I didn't know anything about coding), it looked like some alien text to me xD

annikk.exe

  • Achiever
  • Ent
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1,794
Re: What are you working on? :D
« Reply #441 on: August 07, 2011, 10:34:41 PM »
I arrived home this evening and watched a documentary about maths.  I had some inspiration of how I might be able to create complex landscapes using the 3D engine I've been working on, potentially providing a rich environment to explore.

Sniped50

  • Sapling
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 97
  • Don't ask. About anything.
Re: What are you working on? :D
« Reply #442 on: August 07, 2011, 10:42:24 PM »
Really? Do tell us more, annikk! I'd love to see that.
"Sometimes, the simplest solutions work the best."
- Mythbusters

"But the complex solutions look prettier."
- Me

annikk.exe

  • Achiever
  • Ent
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1,794
Re: What are you working on? :D
« Reply #443 on: August 08, 2011, 12:22:49 AM »
Well the basic idea is that if I build a simple landscape out of, say, 100 triangles... and then perform a series of recurring rules on the triangles, EG, split into 3 more triangles per triangle, and move the centrepoint up or down perpendicular to the face by a random amount, it morphs into a crazy landscape.
I need to actually finish the engine first though, I am still wrestling with the concept of pseudo-vertices for now.

Pilchard123

  • Tester
  • Old Oak
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 17
  • Posts: 899
  • Eufloria: Yes
Re: What are you working on? :D
« Reply #444 on: August 08, 2011, 09:00:50 AM »
Sounds a bit like a deformed version of the Koch snowflake, or possibly Serpienski's triangle

annikk.exe

  • Achiever
  • Ent
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1,794
Re: What are you working on? :D
« Reply #445 on: August 08, 2011, 11:48:25 AM »
Yup what I have described is basically a fractal algorithm.

AWS

  • Achiever
  • Arboreal Being
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 274
Re: What are you working on? :D
« Reply #446 on: August 10, 2011, 05:18:32 PM »
well/... aside from fractal vertices and pythagoras... i have a new little level for people to test if theyre feeling keen?! ;D ;D ;D

its not difficult by any means. in fact, i kinda like it because its a return to how it 'used to be' when i first discovered the game. not difficult, but not super easy. the emphasis being on the exploration and expansion as much as on fighting and winning.
having said that, its a short level so i hope others who dont want a 3hr slog can hop in and enjoy with ease.

anyone???
\aws

Lost Seedling

  • Shrub
  • ***
  • Thank You
  • -Given: 3
  • -Receive: 3
  • Posts: 148
Re: What are you working on? :D
« Reply #447 on: August 10, 2011, 06:42:27 PM »
I'll test it, of course!

Pilchard123

  • Tester
  • Old Oak
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 17
  • Posts: 899
  • Eufloria: Yes
Re: What are you working on? :D
« Reply #448 on: August 15, 2011, 02:01:09 PM »
Aino, have you any way of testing the speed that your AIs run? I've had an idea for speeding them up...

Aino

  • Ent
  • ******
  • Thank You
  • -Given: 1
  • -Receive: 20
  • Posts: 1,483
  • They'll eat you next!
  • Eufloria: Yes
Re: What are you working on? :D
« Reply #449 on: August 15, 2011, 02:04:33 PM »
Mine is very fast :)

60*Number of iterations per second, the amount of iterations is default 10, but mine survives 50 without lag :P
This is mainly because of the pre-set neighbours :P