Author Topic: Intermediate coding guide  (Read 6251 times)

0 Members and 1 Guest are viewing this topic.

annikk.exe

  • Achiever
  • Ent
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1,794
Re: Intermediate coding guide
« Reply #15 on: February 01, 2011, 07:32:00 PM »
Ok, cool, thanks :>

annikk.exe

  • Achiever
  • Ent
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1,794
Re: Intermediate coding guide
« Reply #16 on: February 03, 2011, 12:33:54 PM »
This is basically finished now, I think.
Possible to get it stickied at some point?  :>

Alex/Rudolf, do you guys think we should move all the guides, the mechanics thread, the reference, etc, into either one big thread, or create a seperate subforum for them, or something?  There are quite a few stickies in this forum now and I'm sure more will accumulate in the coming months.

Bonobo

  • Achiever
  • Old Oak
  • ****
  • Thank You
  • -Given: 77
  • -Receive: 8
  • Posts: 629
  • Was born, still alive.
    • German Mac Mailing Lists
  • Eufloria: Yes
Re: Intermediate coding guide
« Reply #17 on: February 03, 2011, 02:38:14 PM »
Good idea, to move all this to a subforum for coding guides :D

BTW then it would IMHO also be fine to number these three: 1. Beginner’s …, 2. Intermediate …, 3. Advanced …, so these would stand at the top of these stickied threads in this order.

But Annik, it prolly could be wise to PM A/R since it seems that b/c of the PSN work they currently don’t have time to look here.
Google+
Do you play Go? (aka iGo aka Baduk aka Weiqi)

annikk.exe

  • Achiever
  • Ent
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1,794
Re: Intermediate coding guide
« Reply #18 on: February 03, 2011, 03:02:37 PM »
Well stickies are ordered by whichever was posted in most recently, so in order to do it like that, the Advanced guide would need to be posted (or replied to) first, then the intermediate, then the beginners.

In order to maintain the order, the threads would then need to be locked.

I would be worried that it might stifle discussion really.  Maybe it would be better to have a single thread entitled something like "Eufloria Level Creation Guide".  I could reserve the first 20 or 30 posts, then I would be able to make hyperlinks to each individual section in the first post in the thread.  That would allow a "contents" section to be created.


Also, I don't know if it's really that much of a priority.  It would have to be something pretty serious for me to go bothering A&R right now.  I'm sure it can wait a few weeks.. :>

Eufloria Admin

  • Global Moderator
  • Seedling
  • *****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 38
Re: Intermediate coding guide
« Reply #19 on: February 13, 2011, 02:10:29 AM »
Hopefully A&R won't mind if I sticky this...

AWS

  • Achiever
  • Arboreal Being
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 274
Re: Intermediate coding guide
« Reply #20 on: February 13, 2011, 03:22:10 PM »
...I would be worried that it might stifle discussion really.  Maybe it would be better to have a single thread entitled something like "Eufloria Level Creation Guide".  I could reserve the first 20 or 30 posts, then I would be able to make hyperlinks to each individual section in the first post in the thread.  That would allow a "contents" section to be created.
...

an excellently well organised idea...
i liike...


Rudolf

  • Administrator
  • Old Oak
  • *****
  • Thank You
  • -Given: 4
  • -Receive: 13
  • Posts: 635
  • Euflorian Ambassador
    • Omni Systems Limited
  • Eufloria: Yes
Re: Intermediate coding guide
« Reply #21 on: February 14, 2011, 10:21:16 PM »
Hah, this is rather useful for me as well believe it or not. :-D
-----------------------------------------------------
Rudolf Kremers - Grand Poobah

http://www.omni-labs.com
http://www.rudolfkremers.com
http://rudolfkremers.tumblr.com/

annikk.exe

  • Achiever
  • Ent
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1,794
Re: Intermediate coding guide
« Reply #22 on: February 15, 2011, 02:47:11 AM »
Really?  Heh, awesome.  :>  ::shares teh knowledge!::

w4tc

  • Achiever
  • Shrub
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 170
Re: Intermediate coding guide
« Reply #23 on: February 19, 2011, 09:04:10 PM »
OMG YOU DO IT!
about that array.lau for that colour
do you remember it? that I've ever asked about the color change
o dammm al your ohtere lvls omg <3 i love it !

annikk.exe

  • Achiever
  • Ent
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1,794
Re: Intermediate coding guide
« Reply #24 on: February 20, 2011, 02:19:30 AM »
Hmm? :>  Do you mean Array Example.lua ?
Not quite sure what you're asking... slow down a bit ! =)

w4tc

  • Achiever
  • Shrub
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 170
Re: Intermediate coding guide
« Reply #25 on: February 20, 2011, 12:17:09 PM »

annikk.exe

  • Achiever
  • Ent
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1,794
Re: Intermediate coding guide
« Reply #26 on: February 20, 2011, 12:24:11 PM »
Ahh yes... I remember looking at that and trying to decypher what you wanted.. :>  Sorry I never got back to you about that!
It's still not hugely clear to me unfortunately...  Is it either of these?

1) The colour used for the background corresponds to whichever asteroid has the most seedlings on it.

2) The colour used for the background corresponds to whichever asteroid received some seedlings most recently.



Once I understand what you want to happen, I can help you make that functionality.  :>

Aino

  • Ent
  • ******
  • Thank You
  • -Given: 1
  • -Receive: 20
  • Posts: 1,483
  • They'll eat you next!
  • Eufloria: Yes
Re: Intermediate coding guide
« Reply #27 on: February 20, 2011, 12:30:20 PM »
Uhhm, annikk, use math.random() when you are going to set the stats :) Cause math.random() with nothing in the parantheses generates a decimal number between 0 and 1 :)

EDIT: You probbably know this already :)

w4tc

  • Achiever
  • Shrub
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 170
Re: Intermediate coding guide
« Reply #28 on: February 20, 2011, 12:53:10 PM »
right now that I'm thinking
for doing otherwise
the color can only change when you click on an asteroid
...but code-ing is now long time xD for me xD
so can you little help me out
(click to show/hide)

Aino

  • Ent
  • ******
  • Thank You
  • -Given: 1
  • -Receive: 20
  • Posts: 1,483
  • They'll eat you next!
  • Eufloria: Yes
Re: Intermediate coding guide
« Reply #29 on: February 20, 2011, 01:01:37 PM »
Well, if you want it to be when it is selected do:
Code: [Select]
function OnAsteroidSelected(id)
if id > 7 and id < 15 then
SetBackdropColour(r,g,b)
elseif if > 15 and id < 33 then
SetBackdropColour(r,g,b)
end
end

Where 7 and 15 is just a limit for colours, the r,g,b in the SetBackdropColour is supposed to be the colours you want, jsut change all the values at your desire :) And here's also the code if you want the owner to be the player, dunno if you want it to but whatever :)

Code: [Select]
function OnAsteroidSelected(id)
if GetAsteroid(id).owner == 1 then
if id > 7 and id < 15 then
SetBackdropColour(r,g,b)
elseif if > 15 and id < 33 then
SetBackdropColour(r,g,b)
end
end
end

For all the colours just add new elseifs and change the ID numbers :) Hope I helped you out...