Author Topic: Blackhole ... crash  (Read 7828 times)

w4tc

  • Achiever
  • Shrub
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 170
Blackhole ... crash
« on: February 21, 2011, 06:10:18 AM »
I have made a blackhole but for some reason the game crasht  ???

de 1 send is 33-+ flowers and the 2the is 60+ than he go to crash
Pilchard123 helpt me out long time a go to make it

(click to show/hide)

And here is the full code :

(click to show/hide)

But i had a new idea ... that you realy can see it that it a blackhole is

sort of stars go in the asteroid or twist in see the img

Aino

  • Ent
  • ******
  • Thank You
  • -Given: 4
  • -Receive: 30
  • Posts: 1,527
  • Eufloria: Yes
Re: Blackhole ... crash
« Reply #1 on: February 21, 2011, 06:22:53 AM »
de 1 send is 33-+ flowers and the 2the is 60+ than he go to crash

Really sorry, but what did you say? :/

I dunno what may be the problem though, sry...

w4tc

  • Achiever
  • Shrub
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 170
Re: Blackhole ... crash
« Reply #2 on: February 21, 2011, 06:28:09 AM »
My bad :D

When i send 33 seeds in the first wave to a asteroid 1
and than i send a second wave 60+ seeds to the some asteroid
then Something happens
game crash...


Aino

  • Ent
  • ******
  • Thank You
  • -Given: 4
  • -Receive: 30
  • Posts: 1,527
  • Eufloria: Yes
Re: Blackhole ... crash
« Reply #3 on: February 21, 2011, 06:35:51 AM »
Hmm...

So you want to send a wave, then you want the seedlings to disappear after? Nonsense, but if you want to I better help :)

First off, it must be the while loop cause thats the only thing running later in game, so if you make an if statement desiring the number of seedlings on any asteroid to be higher than 0 before removing, like this:

Code: [Select]
function LevelLogic()
while GameRunning() do
if GetAsteroid(1):GetNumSeedlings(1) > 0 then
GetAsteroid(1):RemoveSeedlings(1, GetAsteroid(1):GetNumSeedlings(1))   --kills all player seedlings
end
coroutine.yield()
end   
end

Don't know if it works, but lets hope so :)

annikk.exe

  • Achiever
  • Ent
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 4
  • Posts: 1,809
Re: Blackhole ... crash
« Reply #4 on: February 21, 2011, 08:03:18 AM »
If that's the full code, where are the stars coming from?

Aino

  • Ent
  • ******
  • Thank You
  • -Given: 4
  • -Receive: 30
  • Posts: 1,527
  • Eufloria: Yes
Re: Blackhole ... crash
« Reply #5 on: February 21, 2011, 08:32:36 AM »
If that's the full code, where are the stars coming from?

Wondering of that myself...

Pilchard123

  • Tester
  • Old Oak
  • ****
  • Thank You
  • -Given: 4
  • -Receive: 24
  • Posts: 932
  • Eufloria: Yes
Re: Blackhole ... crash
« Reply #6 on: February 21, 2011, 06:10:33 PM »
IIRC, a reason it may be crashing is that the fuzzy effect around the edge is not working properly and maxing out the seedling count, but since you don't seem to have that added, I doubt that is the case.

For those that don't know, the "fuzzy" effect is the result of spawning a load of seedlings every cycle of the loop, and instantly killing them. If the seedling killer section doesn't work, the seed count skyrockets and crashes the game.

w4tc

  • Achiever
  • Shrub
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 170
Re: Blackhole ... crash
« Reply #7 on: February 22, 2011, 10:33:53 PM »
If that's the full code, where are the stars coming from?

(click to show/hide)

The post in 2 parts
1e
I have made a blackhole but for some reason the game crasht  ???

de 1 send is 33-+ flowers and the 2the is 60+ than he go to crash
Pilchard123 helpt me out long time a go to make it

(click to show/hide)

And here is the full code :

(click to show/hide)

2e

But i had a new idea ... that you realy can see it that it a blackhole is

sort of stars go in the asteroid or twist in see the img

and that 2e is the thing that i wanne ask on you annikk
the img is just a print screen of your 3D lvl
but I have see that there rotate some light stars

but the i dea is now :
can you not make it that it rotate in the asteriod of go in the asteriod
see the 2 img up of this page
llike you can see that it is a real black hole ingame
i hope now you understand me? xD

Pilchard123

  • Tester
  • Old Oak
  • ****
  • Thank You
  • -Given: 4
  • -Receive: 24
  • Posts: 932
  • Eufloria: Yes
Re: Blackhole ... crash
« Reply #8 on: February 22, 2011, 11:48:42 PM »
Sekrits are not good if you want to de-bug (not debug) code. PM it to someone for them to take a look at if you don't want it public.

annikk.exe

  • Achiever
  • Ent
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 4
  • Posts: 1,809
Re: Blackhole ... crash
« Reply #9 on: February 23, 2011, 12:15:51 AM »
Quote
and that 2e is the thing that i wanne ask on you annikk
the img is just a print screen of your 3D lvl
but I have see that there rotate some light stars

Yes - the ones that look like electrons orbiting a nucleus?


Quote
but the i dea is now :
can you not make it that it rotate in the asteriod of go in the asteriod

I'm not sure what you mean by "rotate in the asteroid of go in the asteroid".


Quote
see the 2 img up of this page
llike you can see that it is a real black hole ingame
i hope now you understand me? xD

Are you looking for a whirlpool effect?
As if the stars were floating in a bathtub, and all the water is pouring down the drain?


If so, that is an advanced functionality.  You might be able to use the gravity engine to cause the stars to feel gravity coming from the asteroid, but I think whirlpools work a bit differently to gravity.  In an isolated gravity system, one object can orbit another object indefinitely, provided no external forces interfere.  In a whirlpool, EG the water going down the drain when you pull the plug in the bathtub, objects get closer and closer to the center before ultimately being sucked down - and this happens independently of any external forces such as splashing.  The rotational forces also derive from the earth's magnetic field, I believe.  That is why whirlpools rotate in one direction north of the equator, and the other direction south of the equator.

I would suggest you start by writing down, in exacting detail, what you want to happen.  Be as detailed as possible.  Draw diagrams to help yourself understand how the stars ought to behave.  Then, go to google and look up formulas and equations for a whirlpool.  You should spend several days on this planning stage.

Then, it will be up to you to figure out how to adapt those equations into code form.  If you've done the preparation outlined in the paragraph above, it should be possible.  :>

I'd prefer if you waited until I've officially released the 3D Stars engine as a template before you start using it in your own levels.  :>  It will be much easier to work with then, too, so you'd be making it easier on yourself as well.  There ought to be plenty of research to keep you busy in the mean time.. :>
« Last Edit: February 23, 2011, 12:28:39 AM by annikk.exe »

w4tc

  • Achiever
  • Shrub
  • ****
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 170
Re: Blackhole ... crash
« Reply #10 on: February 23, 2011, 10:01:45 PM »
I'm not sure what you mean by "rotate in the asteroid of go in the asteroid".

:O sorry its a typo, it must be : rotate in the asteroid or go in the asteroid
sorry in dutch is or : of xD a habit?

Yes - the ones that look like electrons orbiting a nucleus?

Yes

there are 2 effects
You have indeed the whirlpool effect
and also a straight suction
by this I mean that it is proposed that the suction is very strong mean that the straight suction stronger is than whirlpool effect
« Last Edit: February 23, 2011, 10:11:40 PM by w4tc »