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

#1 2009-06-13 17:40:49

halogameaccount
Scratcher
Registered: 2009-06-11
Posts: 61

Need Assisstance On Cleaning up Script

Hello everyone.

I'm new to scratch and making my first game ever for a school assignment to make a game. I started this a few days ago and it was really fun so I started making progress on it at home. Without the teacher's aid or help I have most likely practiced bad scripting.

I need advice on how I can cut my scripting down and make the game less laggy. It's a scroller shooter game based on Halo. It's called Halo-2D. The game is no where near finished and I have only just made it run, crouch, jump etc by using probably long workarounds etc. The way I change costumes doesn't seem very efficient and I feel that can be improved too. My attempt at making him look at where your aiming and shooting where your aiming seems very inefficient and there must be a better way to do these things with more simple scripting.

Here is my game, it's based on archmage's scrolling engine:

http://scratch.mit.edu/projects/halogameaccount/569142

Can you please check it out, download it and give advice on how the scripts could be more simpler and efficient. Also please test the script change before posting if you can.

Thank you.


http://img200.imageshack.us/img200/9692/signatureatx.png

Offline

 

#2 2009-06-13 17:51:58

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: Need Assisstance On Cleaning up Script

Wow, that is pretty nice looking right now  smile

Here are some things you can look at that will give you ideas on optimization.

Firstly, since you have so much terrain use scrolling method 2 as described here
http://scratch.mit.edu/forums/viewtopic.php?id=2440

For better sprite animation copy the scripts from this project http://scratch.mit.edu/projects/archmage/291819

And that is all I can think of at the moment.


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#3 2009-06-13 17:53:34

halogameaccount
Scratcher
Registered: 2009-06-11
Posts: 61

Re: Need Assisstance On Cleaning up Script

Thank you for the speedy assistance. I'll check those out  wink


http://img200.imageshack.us/img200/9692/signatureatx.png

Offline

 

#4 2009-06-13 17:55:35

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: Need Assisstance On Cleaning up Script

I just looked at the code, just forget about the scrolling thing, you already have suitable scrolling.

Oh and you may want to check this project out http://scratch.mit.edu/projects/archmage/112445


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

Board footer