Alice Community  

Go Back   Alice Community > Alice 2 > Share Worlds

View Poll Results: How did you like this mission besides it being short
Very very good Job. Cant wait till the next mission 12 41.38%
Very good 10 34.48%
Fine 2 6.90%
Had too many problems 2 6.90%
Terrible. did not like it at all "If selected explain why" 3 10.34%
Voters: 29. You may not vote on this poll

Reply
 
Thread Tools Display Modes
Old
jediaction
Senior Member
 
jediaction's Avatar
 
Status: Offline
Posts: 5,064
Join Date: Jul 2009
Location: Bel Air, Maryland
Default 01-19-2010, 05:26 PM

Sorry, yah i figured it out already but thanks


Website: www.salokingames.com
FaceBook: www.facebook.com/SalokinGames
   
Reply With Quote
Old
rockstar442
Guest
 
Status:
Posts: n/a
Default 01-19-2010, 06:27 PM

im sorry this just was down right a big piece of lag
multiple problems unclean movements
etc. im sorry you could do better
   
Reply With Quote
Old
jediaction
Senior Member
 
jediaction's Avatar
 
Status: Offline
Posts: 5,064
Join Date: Jul 2009
Location: Bel Air, Maryland
Default 01-19-2010, 06:43 PM

Well rockstar442, looks like you were the only one having a problem so i think it was your computer of something. It runs perfect on my computer and there is no lag and clean movments, i wonder what happened to you so sorry about that

Does anyone know how to increase frame rates in large code games?


Website: www.salokingames.com
FaceBook: www.facebook.com/SalokinGames

Last edited by x2495iiii; 02-22-2010 at 09:28 PM.
   
Reply With Quote
Old
Dameria
Senior Member
 
Dameria's Avatar
 
Status: Offline
Posts: 976
Join Date: Sep 2009
Location: United States
Default 02-22-2010, 07:52 PM

Quote:
Originally Posted by jediaction View Post
Does anyone know how to increase frame rates in large code games?
Yes, use less infinite loops that have durations of 0 seconds. How about instead of looking to see if a bullet it within a range of a person, don't have it run all the time, have it run only for the first second that the bullet leaves the gun (loop it in the shoot method maybe 50-100 times). So then it will only lag the second you shoot, but the rest of the time it will be lag-free.

Also if there are tons of items, make the items isShowing = false when you are not looking at them. This is easy by making every item in your world into a list, and then make a method that is looping infinitely every 1 second or so saying (if items-from-allObjects is behind camera, show item-from-allObjects isShowing = false). You also have to have another if saying the opposite, so that if they are in front of camera they turn to true. Also if you have really faster turning in the game, make it loop like every 0.25 seconds.


Check out my best projects so far and please comment:

Tic-Tac-Toe 2.0 ................... http://www.alice.org/community/showthread.php?t=3548
Alice Paint ........................... http://www.alice.org/community/showthread.php?p=23408
Real-Time Clock .................. http://www.alice.org/community/showthread.php?p=12725
Maze Game ......................... http://www.alice.org/community/showthread.php?t=4301

Last edited by Dameria; 02-22-2010 at 07:55 PM.
   
Reply With Quote
Old
jediaction
Senior Member
 
jediaction's Avatar
 
Status: Offline
Posts: 5,064
Join Date: Jul 2009
Location: Bel Air, Maryland
Default 02-23-2010, 06:36 AM

Quote:
Originally Posted by Dameria View Post
Yes, use less infinite loops that have durations of 0 seconds. How about instead of looking to see if a bullet it within a range of a person, don't have it run all the time, have it run only for the first second that the bullet leaves the gun (loop it in the shoot method maybe 50-100 times). So then it will only lag the second you shoot, but the rest of the time it will be lag-free.

Also if there are tons of items, make the items isShowing = false when you are not looking at them. This is easy by making every item in your world into a list, and then make a method that is looping infinitely every 1 second or so saying (if items-from-allObjects is behind camera, show item-from-allObjects isShowing = false). You also have to have another if saying the opposite, so that if they are in front of camera they turn to true. Also if you have really faster turning in the game, make it loop like every 0.25 seconds.
Oh my gosh!!!!!!!Behind camera. Infinite loops. These are great solutions and i did already try the true and false stuff but not when behind camera. I ddi when something is done, they appear. I dont get the shooting thing though

Please show an example. Your instructions are not accurate


Website: www.salokingames.com
FaceBook: www.facebook.com/SalokinGames

Last edited by x2495iiii; 02-23-2010 at 07:47 AM.
   
Reply With Quote
Old
Dameria
Senior Member
 
Dameria's Avatar
 
Status: Offline
Posts: 976
Join Date: Sep 2009
Location: United States
Default 02-23-2010, 02:49 PM

You probably have an infinite loop that checks to see every 0 seconds if a bullet is within a certain distance from your target. This takes up space and slows down your program when it is running all the time. Since you are not always firing the gun, you do not always need to check to see if the bullet is within the target's distance. What you can do, is move that infinite loop into the method where you shoot the gun (for example when you click, or press spacebar) and instead of making it loop infinity times, just make it loop about 50 or so times. This way, whenever the gun fires it checks to see if the bullet is within the distance of the target, but when it is done firing and you are just walking around, it stops checking to see if the bullet is within the target's distance. That way there is less lag when you are not shooting your gun, and the distance checker only activates when you do shoot the gun.


Check out my best projects so far and please comment:

Tic-Tac-Toe 2.0 ................... http://www.alice.org/community/showthread.php?t=3548
Alice Paint ........................... http://www.alice.org/community/showthread.php?p=23408
Real-Time Clock .................. http://www.alice.org/community/showthread.php?p=12725
Maze Game ......................... http://www.alice.org/community/showthread.php?t=4301
   
Reply With Quote
Old
jediaction
Senior Member
 
jediaction's Avatar
 
Status: Offline
Posts: 5,064
Join Date: Jul 2009
Location: Bel Air, Maryland
Default 02-23-2010, 03:30 PM

Nope
You try your self. 0 seconds i could make teh fastest shooting gun there ever was but i cant becauase th bullet would never hit. Try your self then tell me. Please!


Website: www.salokingames.com
FaceBook: www.facebook.com/SalokinGames
   
Reply With Quote
Old
Dameria
Senior Member
 
Dameria's Avatar
 
Status: Offline
Posts: 976
Join Date: Sep 2009
Location: United States
Default 02-23-2010, 04:36 PM

Ok I see what you mean, you do not have the type of collision detection with the enemy as most other shooters have. Are you aware however that your collision detection for shooting does not work most of the time?

I would recommend having a lot more methods, and a lot less events. You have a lot of While loops in your events panel, and that is basically the same thing as an infinite loop. It is your choice, but if I were you I would make more method for what you want to do, and only call those methods from within the events panel. What you are doing is creating your methods within the events panel.


Check out my best projects so far and please comment:

Tic-Tac-Toe 2.0 ................... http://www.alice.org/community/showthread.php?t=3548
Alice Paint ........................... http://www.alice.org/community/showthread.php?p=23408
Real-Time Clock .................. http://www.alice.org/community/showthread.php?p=12725
Maze Game ......................... http://www.alice.org/community/showthread.php?t=4301

Last edited by Dameria; 02-23-2010 at 04:45 PM.
   
Reply With Quote
Old
jediaction
Senior Member
 
jediaction's Avatar
 
Status: Offline
Posts: 5,064
Join Date: Jul 2009
Location: Bel Air, Maryland
Default 02-23-2010, 05:11 PM

I see what you mean but how do you collisions with out events?! and the way i do it to


Website: www.salokingames.com
FaceBook: www.facebook.com/SalokinGames
   
Reply With Quote
Old
Dameria
Senior Member
 
Dameria's Avatar
 
Status: Offline
Posts: 976
Join Date: Sep 2009
Location: United States
Default 02-23-2010, 05:17 PM

Well in my worlds I have a shoot method, and lets say when the mouse is clicked, it triggers the shoot method that has all the animation of the gun firing as well as the bullet moving outwards. There are multiple ways to make the collision for the impact, but I see that you like using bullets and their distance to the targets. I don't want to explain it all right now, because I actually have a project due tomorrow that I have to work on, but next time you make a world, I can help you to make the firing better if you want.


Check out my best projects so far and please comment:

Tic-Tac-Toe 2.0 ................... http://www.alice.org/community/showthread.php?t=3548
Alice Paint ........................... http://www.alice.org/community/showthread.php?p=23408
Real-Time Clock .................. http://www.alice.org/community/showthread.php?p=12725
Maze Game ......................... http://www.alice.org/community/showthread.php?t=4301
   
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Copyright ©2024, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.