Silver
Creator
HOME
DOWNLOADS
FORUMS
GAMEMAKERS' GARAGE
The SilverCreator Plaza
Current time:
SilverCreator Plaza
›
SilverCreator
›
SilverCreator Discussion
› SilverCreator v2.0b2 Released
(Moderators: Plaza Mike, Plaza Redd)
‹
Previous Topic
|
Next Topic
›
Pages:
1
2
SilverCreator v2.0b2 Released (Read 449 times)
Plaza Mike
YaBB Administrator
Offline
Posts: 1669
Gender:
Re: SilverCreator v2.0b2 Released
Reply #15 -
Jul 4
th
, 2010 at 2:37pm
No SPRITE commands are allowed in the Paint event, because they could cause an infinite loop.
Back to top
Mike Richardson
IP Logged
Gill
Full Member
Offline
My train of thought crashed
Posts: 147
Ontario, Canada
Gender:
Re: SilverCreator v2.0b2 Released
Reply #16 -
Jul 4
th
, 2010 at 11:08pm
Oh. How is that?
Back to top
Intel/Leopard
IP Logged
Plaza Mike
YaBB Administrator
Offline
Posts: 1669
Gender:
Re: SilverCreator v2.0b2 Released
Reply #17 -
Jul 4
th
, 2010 at 11:18pm
Gill wrote
on Jul 4
th
, 2010 at 11:08pm:
Oh. How is that?
Calling a sprite command (without the true parameter at the end) causes an immediate screen update, which causes the Paint Event to be fired.
Therefore, if you call TINTSPRITE (or any other sprite command) from within Paint, it will cause Paint to fire again, which will then call TINTSPRITE, which then causes Paint to fire, which then calls TINTSPRITE, etc...
Back to top
Mike Richardson
IP Logged
EqwanoX
God Member
Offline
Posts: 1782
Gender:
Re: SilverCreator v2.0b2 Released
Reply #18 -
Jul 5
th
, 2010 at 9:27am
code in the paint event is executed EVERY time the screen is updated, where other events are more specific like keydown mousedown. this can also create conflicts if your useing the same variables like "x" in the paint and in another place in FOR loops
my problem is i run a FOR loop to create all sprites but if tintsprite is executed then it updates the screen executeing the paint commands that rely on sprites that dont exist yet cause the for loop isnt done createing them. i can get around it by checking if the sprite is valid but now sprites will load individually instead of simultaniously which creates lag
Back to top
«
Last Edit: Jul 5
th
, 2010 at 9:32am by EqwanoX
»
macintosh 8500/150 OS8.0
IP Logged
EqwanoX
God Member
Offline
Posts: 1782
Gender:
Re: SilverCreator v2.0b2 Released
Reply #19 -
Jul 10
th
, 2010 at 2:16pm
seems sc crashes whenever theres a bug in the mouse move event
1) type "movesprite 1,0,0" in mouse move event
2) run game
3) move mouse
4) SC go byebye
5)IF forgot to save THEN
Back to top
«
Last Edit: Jul 10
th
, 2010 at 2:17pm by EqwanoX
»
macintosh 8500/150 OS8.0
IP Logged
Plaza Mike
YaBB Administrator
Offline
Posts: 1669
Gender:
Re: SilverCreator v2.0b2 Released
Reply #20 -
Jul 10
th
, 2010 at 5:07pm
EqwanoX wrote
on Jul 10
th
, 2010 at 2:16pm:
seems sc crashes whenever theres a bug in the mouse move event
1) type "movesprite 1,0,0" in mouse move event
2) run game
3) move mouse
4) SC go byebye
5)IF forgot to save THEN
v2.0b2 has a save when running feature. You can't complain about that anymore.
Back to top
Mike Richardson
IP Logged
Plaza Mike
YaBB Administrator
Offline
Posts: 1669
Gender:
Re: SilverCreator v2.0b2 Released
Reply #21 -
Jul 23
rd
, 2010 at 9:03pm
EqwanoX wrote
on Jul 10
th
, 2010 at 2:16pm:
seems sc crashes whenever theres a bug in the mouse move event
1) type "movesprite 1,0,0" in mouse move event
2) run game
3) move mouse
4) SC go byebye
5)IF forgot to save THEN
I've been trying to fix this but I can't seem to solve it.
What I do know - is that sometimes REALbasic generates two Mouse Move events in a row. The first Mouse Move event generates the scripting error. When you click Debug Game the entire game is shut down and the editor is brought back up, but the second Mouse Move event is still in the queue, and once RB gets around to it, the original GameWindow is gone so the program crashes.
Back to top
Mike Richardson
IP Logged
Gill
Full Member
Offline
My train of thought crashed
Posts: 147
Ontario, Canada
Gender:
Re: SilverCreator v2.0b2 Released
Reply #22 -
Jul 24
th
, 2010 at 11:33pm
Does it do this when you compile the game?
Back to top
Intel/Leopard
IP Logged
Plaza Mike
YaBB Administrator
Offline
Posts: 1669
Gender:
Re: SilverCreator v2.0b2 Released
Reply #23 -
Jul 25
th
, 2010 at 4:18am
Gill wrote
on Jul 24
th
, 2010 at 11:33pm:
Does it do this when you compile the game?
It wouldn't matter - the only option for a scripting error in a compiled game is "Quit". Even if it quits unexpectedly (crashes), it doesn't matter. The real problem is running your game in the editor when you haven't saved your work. That's why you should enable "Save on Run" in the preferences.
In an earlier version (2.0 alpha) I had implemented a fix for this problem - instead of killing GameWindow, I hid it, and killed it after 1 second. This allowed any remaining events in the queue to complete successfully. Unfortunately this caused several other problems so I took out the fix. Probably though - short of a newer RB fixing this problem, it IS the only effective fix.
I still use REALbasic 2009r4 since newer versions may break things arbitrarily. I probably won't upgrade until forced to do so, OR if a newer version has substantial improvements. Honestly, the only reason I upgraded from REALbasic 5.5.5 was for Universal Binaries.
Back to top
«
Last Edit: Jul 25
th
, 2010 at 4:22am by Plaza Mike
»
Mike Richardson
IP Logged
Al Staffieri, Jr.
Full Member
Offline
I'm the best and you're
not
Posts: 202
NJ 08094
Gender:
Re: SilverCreator v2.0b2 Released
Reply #24 -
Jul 25
th
, 2010 at 3:55pm
Maybe you can just put a 1 second delay in before doing anything. That will give it time to go though the event que.
Back to top
Al Staffieri Jr.
AlStaff@aol.com
http://alstaffieri.com
IP Logged
Plaza Mike
YaBB Administrator
Offline
Posts: 1669
Gender:
Re: SilverCreator v2.0b2 Released
Reply #25 -
Jul 25
th
, 2010 at 9:55pm
Al Staffieri, Jr. wrote
on Jul 25
th
, 2010 at 3:55pm:
Maybe you can just put a 1 second delay in before doing anything. That will give it time to go though the event que.
I could probably do that. I already have a boolean called "running" that I set to false when the game has an error, and a bunch of checks everywhere (none of the events will actually execute a script if running is false). When there's a script error, I can set running to false, wait a second, then show the error box and kill the game. Any events in the queue that trigger another script to run, such as a timer, will see that running is false and won't run.
Back to top
Mike Richardson
IP Logged
Pages:
1
2
SilverCreator Plaza
›
SilverCreator
›
SilverCreator Discussion
(Moderators: Plaza Mike, Plaza Redd)
‹
Previous Topic
|
Next Topic
›
Forum Jump »
Home
» 10 most recent Posts
» 10 most recent Topics
The Lobby
- Plaza Announcements
- Suggestion Box
- General Discussion
SilverCreator
- SilverCreator Discussion ««
- SilverCreator Code Samples
- Code Samples Archive
Developer's Corner
- Developer's Diary
- Game Graveyard
- Released Games
SilverCreator Plaza
» Powered by
YaBB 2.4
!
YaBB
© 2000-2009. All Rights Reserved.
Copyright © 2001 - 2010 Mike Richardson.
68kMLA