This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2007-08-12 15:10:25

AlveKatt
Scratcher
Registered: 2007-08-12
Posts: 100+

Need help with drawing game

http://scratch.mit.edu/projects/AlveKatt/28757

The thing is, it works as it should in the game window in Scratch. But in presentation mode the image isn't cleared when I press the mouse button, as it should, and as it does when in the Scratch game window.

The browser thingie seems to make things even more wonky.

It's supposed to draw a line for two seconds, then clear it after three seconds. If you start a new line before the old one has disappeared the old one is supposed to be cleared.

As I said, it works fine as long as I don't go into presentation mode. What do I need to do to make it work in presentation mode and on the uploaded version? Some kind of cleanup of the graphical code?

This game is intended to be played with a drawing tablet and therefor works best in full screen mode.

The game is intended to use controls similar to Chalk (http://www.konjak.org/chalk.htm) and to have completely original graphics, story and objectives.

Last edited by AlveKatt (2007-08-12 21:15:49)

Offline

 

#2 2007-08-12 15:55:38

AngelEyra
Scratcher
Registered: 2007-07-19
Posts: 100+

Re: Need help with drawing game

Sounds a bit like the sequel to Scribble I was planning...

eyra


AngelEyra's . MyScratchR . Blog
Think with portals
Sorry, Companion Cube... I didn't mean to...

Offline

 

#3 2007-08-12 15:57:01

AlveKatt
Scratcher
Registered: 2007-08-12
Posts: 100+

Re: Need help with drawing game

I think you may put this down as a bug. I simply can't get it to work in the presentation mode. I did find about ten different ways of making it work in the preview window, though...

Here are screenshots of an example of Scratch code that makes it work in the preview window but doesn't make it work in presentation mode...

http://web.telia.com/~u14210407/Scratch/Stage.jpg http://web.telia.com/~u14210407/Scratch/Brush.jpg

Argh! I'm so frustrated!

Edit: The funny thing is that all the "Clear" works except that particular one that clears before you start drawing!

I have tried putting it in a script of its own and everything. Also tried putting it with the brush script. And a script of is own in the brush sprite. The same thing there, whatever combinations I do it works in the preview window, but not in the presentation mode.

Edit2: All the other "clear"s are on a timer. I'll see what happens if i put a timer=0 on the first "clear". I'll report back.

Edit3: Nope, exactly the same thing with a timer. Works in preview window, not in presentation mode.

Last edited by AlveKatt (2007-08-12 16:19:54)

Offline

 

#4 2007-08-12 18:02:54

AlveKatt
Scratcher
Registered: 2007-08-12
Posts: 100+

Re: Need help with drawing game

AngelEyra wrote:

Sounds a bit like the sequel to Scribble I was planning...

eyra

Oh? What's scribble?

Edit: Found it! If you want to use my code for your sequel, feel free. But with all the projects you have behind you your probably better of doing it yourself.... I just downloaded the program a few hours ago, I don't really know it's perks and quirks yet.

Last edited by AlveKatt (2007-08-12 18:07:10)

Offline

 

#5 2007-08-13 18:39:26

AlveKatt
Scratcher
Registered: 2007-08-12
Posts: 100+

Re: Need help with drawing game

Isn't there anyone who would be willing to shed some light on my problems?

Anyway, new version. Added a bunch of stuff. Everything still works as it should in the Stage window. (Just need to figure out how to make it so that you don't get damage multiplyer if you manage to hit the enemy twice with the same line.)

But now the drawing doesn't work at all in presentation mode or on the net version anymore.

http://scratch.mit.edu/projects/AlveKatt/28970

Any ideas?

Edit: Scratch project updated.

Last edited by AlveKatt (2007-08-13 23:28:43)

Offline

 

#6 2007-08-14 03:54:33

Mayhem
Scratcher
Registered: 2007-05-26
Posts: 1000+

Re: Need help with drawing game

Try this:

http://scratch.mit.edu/projects/Mayhem/29050

I've completely re-written the code on the player sprite and the drawing sprite, and cleaned up some of the other code although I didn't go too deeply into your enemies or bullets as I wasn't certain what they were supposed to do.

Wasn't sure what was supposed to happen when the drawign sprite was touching the bullets or enemies so I left that out.


Web-spinning Spider:  http://scratch.mit.edu/projects/Mayhem/18456
3D Dungeon Adventure:  http://scratch.mit.edu/projects/Mayhem/23570
Starfighter X: http://scratch.mit.edu/projects/Mayhem/21825
Wandering Knight: http://scratch.mit.edu/projects/Mayhem/28484

Offline

 

#7 2007-08-14 15:21:40

AlveKatt
Scratcher
Registered: 2007-08-12
Posts: 100+

Re: Need help with drawing game

http://scratch.mit.edu/projects/AlveKatt/29155

Thank you so much! It works pretty much as intended now! The only problem is that one of the enemies randomly stops firing in the web version. But I can live with that.

Could you tell me what it was that made the other version not work? If you have the time.

Instructions; a s d w makes the charachter move. To destroy the enemies, paint a single line that touches both the enemy and the balls they fire.

Offline

 

#8 2007-08-14 16:02:40

Vanslar
Scratcher
Registered: 2007-03-17
Posts: 100+

Re: Need help with drawing game

your problem with the clear script sounds like my problem with the pendulum


  I am a royal pain in the butt, I am ~Vanslar~       
      Want better gravity? Go to
Realistic Gravity, By Vanslar 2-D
Want a better way to spend your spare time? CubeField

Offline

 

#9 2007-08-15 09:05:39

AlveKatt
Scratcher
Registered: 2007-08-12
Posts: 100+

Re: Need help with drawing game

Pendulum?

Anyway, the problems listed are solved. Found a new one! A big one...

I want to have a scrolling background. But as it doesn't seem like you can make the paint appear over sprites I might have to settle for scrolling sides... But I really want a sprite background! I have such cool ideas for it!

Offline

 

#10 2007-08-15 09:28:26

Mayhem
Scratcher
Registered: 2007-05-26
Posts: 1000+

Re: Need help with drawing game

You could make a crude scrolling background by using costume changes on the stage, just like a film-strip.  You could then draw over it, though your paint, of course, would remain stationary.


Web-spinning Spider:  http://scratch.mit.edu/projects/Mayhem/18456
3D Dungeon Adventure:  http://scratch.mit.edu/projects/Mayhem/23570
Starfighter X: http://scratch.mit.edu/projects/Mayhem/21825
Wandering Knight: http://scratch.mit.edu/projects/Mayhem/28484

Offline

 

#11 2007-08-15 09:36:31

AlveKatt
Scratcher
Registered: 2007-08-12
Posts: 100+

Re: Need help with drawing game

Mayhem wrote:

You could make a crude scrolling background by using costume changes on the stage, just like a film-strip.  You could then draw over it, though your paint, of course, would remain stationary.

I actually thought of that. I think I'll try it, but I have a feeling that if something will make the game lag that is it.  And I wanted to do sections where You move over this landscape, and when you get to a certain point the landscape zooms in and you move just above it.

Also, the capital ships I had planned will hide the paint too much. (Unless I make them part of the background with just turrets for sprites.) I guess I will have to make a little simpler Spaceart and hope this gets resolved in the next version.

Offline

 

Board footer