Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / [DarkGDK 2.0] Tower Defense Source Code , please help me find the errors

Author
Message
haliop
User Banned
Posted: 16th Jul 2012 23:30 Edited at: 17th Jul 2012 13:23
ok so i just cant wait anymore i want to continue on building but i just cant when it crushes all the time.

so i present one of the 3 projects, the Tower Defense game.
learn what you can from it enjoy it aswell as i do , and i trust the honor code between us that you wont rip me off my project.

the GDK.dll is not included since i bought it ... and it will be idiotic of me to put it in also not fair for GDK 2.0 creator.

also you will have to compile the engine with plugin and dont forget to add SparkyCollision (which is free) to it.

please help this is driving me insane.

also try to get the idea behind my game its kinda cool and yet very simple to play with a nice and very easy learning curve .

thank you , Nadav. file reaTached

Edit : FIXED
haliop
User Banned
Posted: 17th Jul 2012 11:57
Mistrel would you mind taking a look at this?
i know you got tons of work but take a brake and watch this
why does this crush..

it points me to Acsses violation at dbSync() in the main loop.
Rudolpho
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 17th Jul 2012 12:49
Mhm, I just took a quick look at it. When does it crash?
I ran it through from start to finish three times without any such issues.


"Why do programmers get Halloween and Christmas mixed up?"
haliop
User Banned
Posted: 17th Jul 2012 13:22
ok FIXED!
the game is now stable ty all.
haliop
User Banned
Posted: 17th Jul 2012 13:29
well the problem was when i ran a cycle trough the towers

this cycle is for to check if the tower is locked on a target then shooting at it. that was fine
but when the tower had 0 lock (which mean no lock) it searches the creeps for a new lock on target and sometimes it locked on a dead creep which means aiming the bullets at an ID that is not alive
and i think that that caused GDK to crush..

cause you first GetDistance from two id (tower,creep)
second you aim the bullet dbPointObject(bulletId,creepX,creepY,creepZ)

if the creep is dead you just point and get distance from invalid ID..

i ran it a couple of times with mass towers and it worked flawlessly

also i noticed using automatic Id assigment that it passes the 65535 limit which is not good with SparkyCollision so i reEdit the bullet it assigments to GetFreeObject function i created using a simple


the game sometimes run on 35 fps cause of alot of towers shooting alot of bullets but atleast it is stable.

i also reedited the tower lock so it will lock on closest creep rather then the first creep in tower's range.

so for now it is stable , i will run it even once more see if i can upgrade the FPS ...

ty all for participating.
Olby
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 17th Jul 2012 14:52 Edited at: 17th Jul 2012 14:55
Quote: "this cycle is for to check if the tower is locked on a target then shooting at it. that was fine
but when the tower had 0 lock (which mean no lock) it searches the creeps for a new lock on target and sometimes it locked on a dead creep which means aiming the bullets at an ID that is not alive
and i think that that caused GDK to crush.."


Have you considered using the
Quote: "void dbSetRuntimeErrorCallback ( void* procAddress, void* parameter )"
to address such issues. Mistrel has stated it before that continuous execution without error trapping will eventually crash your application. From multitude of your recent posts (during the last couple of days) it seems that you're ignoring the error callback procedure completely. GDK 2.0 will not report and terminate after an error no matter how severe it is unless you produce handling instructions.


Intel Core2Duo 2.2GHZ, 2GB, GeForce 8600M GT 1280MB, Windows Vista Ultimate SP2, PureBasic 4.61 + DarkGDK 2.0
haliop
User Banned
Posted: 17th Jul 2012 15:44
ohh
well first off i got it stable..
i guess i didnot really payed attention for it
sorry
haliop
User Banned
Posted: 17th Jul 2012 16:02
what do i insert in this command?

Login to post a reply

Server time is: 2024-11-19 00:29:22
Your offset time is: 2024-11-19 00:29:22