Author Topic: Annikk's Mechanics  (Read 10591 times)

0 Members and 1 Guest are viewing this topic.

annikk.exe

  • Achiever
  • Ent
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1,794
Re: Annikk's Mechanics
« Reply #45 on: July 11, 2011, 06:46:55 AM »
I still think splitting the code into different files is a flawed idea.  It may make the main code file shorter, but it's less convenient for the players to download a level and 20 function files, and get them all in the correct folder... and account for different installation paths for the game...  I think it's much better to just have a single level file and use a text editor that lets you minimize the functions when you're not using them.

Aino

  • Ent
  • ******
  • Thank You
  • -Given: 1
  • -Receive: 20
  • Posts: 1,483
  • They'll eat you next!
  • Eufloria: Yes
Re: Annikk's Mechanics
« Reply #46 on: July 11, 2011, 01:13:35 PM »
May be true, but if you got around 60(I don't have 60 yet, but I'm having a target for it :P) levels extra, each taking up 50-100 lines and the code running them is alreadt 2.5k lines long... wouldn't that be very frustrating?

And you can use archivers, and most people have some sort of arvhiver to fix them... Then you just tell them which path they must go to install them(Adventure does that the first time you try to play it) and then you just extract all the files from the archive to the folder...

Bonobo

  • Achiever
  • Old Oak
  • ****
  • Thank You
  • -Given: 77
  • -Receive: 8
  • Posts: 629
  • Was born, still alive.
    • German Mac Mailing Lists
  • Eufloria: Yes
Re: Annikk's Mechanics
« Reply #47 on: July 11, 2011, 02:13:55 PM »
Since the official distribution has a ZIP file for levels (or WAS it that way?), perhaps you could also use ZIP so it’s just ONE file to place in that folder?
Google+
Do you play Go? (aka iGo aka Baduk aka Weiqi)

Aino

  • Ent
  • ******
  • Thank You
  • -Given: 1
  • -Receive: 20
  • Posts: 1,483
  • They'll eat you next!
  • Eufloria: Yes
Re: Annikk's Mechanics
« Reply #48 on: July 11, 2011, 02:51:42 PM »
The problem with that Bonobo, is that you'll have to install this then: http://www.keplerproject.org/luazip/ and we can tell that as almost the same thing :P

Unless I am wrong and there is a way to see inside zip files, I'm not totally sure :/

AWS

  • Achiever
  • Arboreal Being
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 274
Re: Annikk's Mechanics
« Reply #49 on: July 12, 2011, 04:29:08 AM »
need your opinions - annikk and aino - on the updated custom level thread at the bottom.

i know that youve since made the 3d starfield annikk, but at the top of this mechancis thread, you still have the parallax as a heading, so tahts what ive put in the levels thread. shall i also include the 3d there as well, or what would you prefer?

annikk.exe

  • Achiever
  • Ent
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1,794
Re: Annikk's Mechanics
« Reply #50 on: July 12, 2011, 08:13:48 AM »
The links at the bottom don't work, the URL is wrong.

AWS

  • Achiever
  • Arboreal Being
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 274
Re: Annikk's Mechanics
« Reply #51 on: July 12, 2011, 02:05:18 PM »
The links at the bottom don't work, the URL is wrong.

not sure what happened there. but its fixed now.
 ;)

Lost Seedling

  • Shrub
  • ***
  • Thank You
  • -Given: 3
  • -Receive: 3
  • Posts: 148
Re: Annikk's Mechanics
« Reply #52 on: July 18, 2011, 07:18:11 AM »
Why is it imperative that the AI engine be placed below everything else? One of my functions is longer and will only run once, so it seems more logical to me to place it below the AI Engine - which runs continuously (or in my situation, intermittently).

annikk.exe

  • Achiever
  • Ent
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1,794
Re: Annikk's Mechanics
« Reply #53 on: July 18, 2011, 09:09:37 AM »
It has to be seperate to everything else because you need to tell Eufloria that the AI code is a seperate function, and not part of function LevelLogic()

Then you put the command "InfectedAIEngine()" in a loop that runs repeatedly.  Every time that command is run, it runs all of the code you pasted at the bottom.

Make sure you follow the step-by-step implementation instructions closely - they are quite specific.  :>

For more information about this method of calling functions from within other functions, see the final part of the Intermediate Guide.


Lost Seedling

  • Shrub
  • ***
  • Thank You
  • -Given: 3
  • -Receive: 3
  • Posts: 148
Re: Annikk's Mechanics
« Reply #54 on: July 18, 2011, 09:55:27 AM »
I understand that. What I'm asking is is it necessary for any reason that the AI ENGINE function itself (not the function call) must be placed below everything else - at the bottom of the lines of code. In your installation instructions, you said it must be placed there. I thought perhaps your reasoning was that since the engine was a rather large piece of code, it would be better at the bottom, out of the way as you wrote the rest of your code. If that is the only reason, I was thinking I should put my larger function, that only runs once at initialization, at the bottom. I thought perhaps I could save a few microseconds of processor time by putting it down there rather than in the middle somewhere. I just didn't understand why it was" imperative" that it be placed at the bottom. My understanding of the processor times involved in running various functions and code efficiency in general is so limited that I may be fretting over a few microseconds for nothing.

I'm not sure if I'm stating this any clearer or not.

I took your Intermediate Guide to heart, by the way, and have about 45 functions so far in my map code. It works quite nicely and makes things so much easier to access and work with.

annikk.exe

  • Achiever
  • Ent
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1,794
Re: Annikk's Mechanics
« Reply #55 on: July 18, 2011, 10:26:53 AM »
Ah I see, in that case, no you don't necessarily have to have it at the bottom.  You can stick it anywhere you like.  :> I simply meant don't stick the AI Engine function, inside another function.  :P
I don't think it makes any performance difference to put the functions in different orders, so feel free to put it wherever.

Lost Seedling

  • Shrub
  • ***
  • Thank You
  • -Given: 3
  • -Receive: 3
  • Posts: 148
Re: Annikk's Mechanics
« Reply #56 on: July 18, 2011, 10:38:59 AM »
Oops! Well, that's exactly what I did- put it in another function. That engine was like a wild horse, and the seedlings couldn't be corralled as I wanted. So, I made an On/Off switch, and only run the engine when appropriate. It's fun to watch it "engage". I'd swear my lights dim a little whenever it gets activated.

annikk.exe

  • Achiever
  • Ent
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1,794
Re: Annikk's Mechanics
« Reply #57 on: July 18, 2011, 10:41:52 AM »
hehe... sounds cool!

AWS

  • Achiever
  • Arboreal Being
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 274
Re: Annikk's Mechanics
« Reply #58 on: July 30, 2011, 12:08:47 AM »
forgive me if this has been covered already but has this - The AI knows how to use flowers to get Super Seedlings, but it doesn't know how to plant them on Defence Trees to make laser mines.  Perhaps a future update will introduce this functionality - been addressd yet??
just a curiosity i had ;D

aws

annikk.exe

  • Achiever
  • Ent
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1,794
Re: Annikk's Mechanics
« Reply #59 on: July 30, 2011, 12:23:18 AM »
Nope.  I would need to figure out how the AI will decide whether to make Super Seedlings or a mine.  I could just make it random I suppose..