The Daily Click ::. Forums ::. Klik Coding Help ::. Guns running down? They don't have ammo..
 

Post Reply  Post Oekaki 
 

Posted By Message

Brian Haase (FSP)



Registered
  22/01/2005
Points
  691
1st February, 2005 at 23:30:37 -

So Night Raid 2 has a twin cannon as the main gun, and it's been working peachy until just now. I built a stand-alone EXE and sent it to a friend, and low and behold - The gun suddenly stops firing after a few seconds. Mine does it too, on and off. Only in the EXE version though.

Somehow after firing for a few seconds (no obvious pattern here - 3 seconds, sometimes 10, sometimes never) the gun suddenly lags and only fires on shot of the two... and then stops all together, like it jammed. Nice, if it was a feature - But it isn't. For me, if I hit NEW GAME a few times it'll clear up after a while. For my friend though it continues to run dry during the first wave.

In development, it works perfectly. There isn't a single problem with it. But in EXE form it's buggy, even for me. What's going on? An object limit of some sort? It's at the start of the wave, before many objects are even created. HELP!

 
Current Projects:
Bomb Squad (Total Progress - 3%)
:: Current Task Progress: 40%
:: Current Task - Level Editor Shell

Brian Haase (FSP)



Registered
  22/01/2005
Points
  691
2nd February, 2005 at 00:12:55 -

Tweaky. It seems to be time-based or something. If you don't fire for a few seconds, or you switch windows, it tends to jam up.

This has got to be memory related, right? I can't figure it out..

 
Current Projects:
Bomb Squad (Total Progress - 3%)
:: Current Task Progress: 40%
:: Current Task - Level Editor Shell

Brian Haase (FSP)



Registered
  22/01/2005
Points
  691
2nd February, 2005 at 12:23:44 -

I think they are being destroyed. I could be wrong though.

When they hit a certain point on the screen, it runs a destroy on 'em.

When they hit an enemy, it runs a destroy on them.

So.. I don't know. Is the 'destroy' instruction not enough?

 
Current Projects:
Bomb Squad (Total Progress - 3%)
:: Current Task Progress: 40%
:: Current Task - Level Editor Shell

Tigerworks

Klik Legend

Registered
  15/01/2002
Points
  3882
2nd February, 2005 at 12:43:58 -

Do some debugging. Have an on screen counter with the number of objects and stuff. I would suspect you're hitting the object limit. In MMF you can increase this up to 10,000 in frame properties.

 
- Tigerworks

Brian Haase (FSP)



Registered
  22/01/2005
Points
  691
2nd February, 2005 at 15:02:58 -

That's odd. The object counter only shows it hitting around 150ish, max. Theres about 30 stars on the screen, a handful of planes, some bullets and ground and such. The counter shows it ranging from around 50 to 150.. Whats the object limit in TGF?

 
Current Projects:
Bomb Squad (Total Progress - 3%)
:: Current Task Progress: 40%
:: Current Task - Level Editor Shell

Brian Haase (FSP)



Registered
  22/01/2005
Points
  691
2nd February, 2005 at 15:10:54 -

Tweaky. I should have enough room to handle even the expansion for a mass of paratroopers - let alone the start of a level where nothing has been created yet. So confused..

 
Current Projects:
Bomb Squad (Total Progress - 3%)
:: Current Task Progress: 40%
:: Current Task - Level Editor Shell

DaVince

This fool just HAD to have a custom rating

Registered
  04/09/2004
Points
  7998

Game of the Week WinnerClickzine StaffHas Donated, Thank You!Cardboard BoxDos Rules!
3rd February, 2005 at 06:32:44 -

Try to change some object scrolling properties for the object and make sure your frame settings are correct for scrolling, too.

 
Old member (~2004-2007).

The Chris Street

Administrator
Unspeakably Lazy Admin

Registered
  14/05/2002
Points
  48487

Game of the Week WinnerClickzine StaffAcoders MemberKlikCast StarVIP MemberPicture Me This Round 35 Winner!Second GOTW AwardYou've Been Circy'd!Picture Me This Round 38 Winner!GOTM December Third Place!!
I am an April FoolKliktober Special Award Tag
3rd February, 2005 at 12:19:39 -

What are the events based on how the gun works? Are they like this:

REPEAT WHILE CTRL IS PRESSED + EVERY 00.05 SECONDS: Shoot bullet in direction x

---
If they are, then thats why your guns are rubbish. They're timer based, and on poorer computers may be more laggy. Try this instead:
---

REPEAT WHILE CTRL IS PRESSED: Add 1 to Alterable Value A of Gun

ALTERABLE VALUE A OF GUN IS EQUAL OR GREATER THAN 20: Shoot bullet in direction x, Set Alterable Value A of Gun to 0

 
n/a

Brian Haase (FSP)



Registered
  22/01/2005
Points
  691
3rd February, 2005 at 12:19:52 -

Like what? I don't use any scrolling in my game, so I didn't tweak with any of the settings.

 
Current Projects:
Bomb Squad (Total Progress - 3%)
:: Current Task Progress: 40%
:: Current Task - Level Editor Shell

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
3rd February, 2005 at 13:19:35 -

are there any events that create objects? Maybe you're creating objects offscreen so you're not seeing them.

 
.

Brian Haase (FSP)



Registered
  22/01/2005
Points
  691
3rd February, 2005 at 13:49:10 -

Yeah, all of the items are created off screen and 'fly' in. Their all set to destroy when off screen, but maybe they aren't then?

 
Current Projects:
Bomb Squad (Total Progress - 3%)
:: Current Task Progress: 40%
:: Current Task - Level Editor Shell

-Vinny-



Registered
  12/01/2005
Points
  436
6th February, 2005 at 12:22:41 -

if you are using timer based conditions, quickly change them to alterable value based conditions, just like circy said, timer based conditions aren't very reliable, at least from my experience, and circy's im guessing all you have to do is have one event where if the

alterable value A of the gun > 0: subtract 1 from alterable value A
repeat while player presses CTRL: shoot projectile, play sound if needed, set alterable value A of gun to 5 - or w/e you want depending on how long you want the delay to be till the next bullet, and it doesn't have to be alterable value a, you can use a counter too if you want

 
Vinny

Brian Haase (FSP)



Registered
  22/01/2005
Points
  691
6th February, 2005 at 13:51:52 -

Oh, I missed Circy's post, sorry.

Yeah, the gun routines are timer driven, as is most of the game

I'll replace atleast the gun routines for now, not sure how long the rest would take to rebuild. The other part of the problem seems to be coming from some music-related issue, the game freaks out on some systems and won't create objects and such.

 
Current Projects:
Bomb Squad (Total Progress - 3%)
:: Current Task Progress: 40%
:: Current Task - Level Editor Shell

Knudde (Shab)

Administrator
Crazy?

Registered
  31/01/2003
Points
  5125

Has Donated, Thank You!Clickzine StaffKlikCast StarVIP MemberGhostbuster!Dos Rules!I donated an open source project
6th February, 2005 at 15:23:35 -

I had that same bug in Hell House, the problem comes in when during the "midi Lag", if you create too many objects during this lag, TGF will crash. It's a pain in the ass.

 
Craps, I'm an old man!

Jack Galilee



Registered
  02/12/2002
Points
  990

VIP Member
7th February, 2005 at 00:32:08 -

Recode your shooting system that should fix it and go purchase MMF its a much better product

 
The only thing better than winning gold in the paralympics is not being retarted

DaVince

This fool just HAD to have a custom rating

Registered
  04/09/2004
Points
  7998

Game of the Week WinnerClickzine StaffHas Donated, Thank You!Cardboard BoxDos Rules!
11th February, 2005 at 02:30:25 -

Okay, when you destroy the objects and you use custom movement, DON'T use If the object leaves the play area.

Use this instead:
If object x position >= frame width
If object x position <= 0
The same with Y.

 
Old member (~2004-2007).
   

Post Reply



 



Advertisement

Worth A Click