Computer Science Canada My very first game !! XD |
Author: | slender0123 [ Sat Sep 14, 2013 7:04 pm ] | ||
Post subject: | My very first game !! XD | ||
Hello there everyone! This is my very very first game that I finished for turing! Its difficult at first, but once you get the drift of it, it gets reletivly easy.. Goal. Keep the ball in the air!! Use the left and right arrows to move the line to make the ball bounce! (I will change the line to a rectangle once i get familier with the collision of a rectangle!) the ball will surprise you sometimes where it spawns. here it is If its too fast (it probibly will be, my com lags a little (I found out when i ran another jump based program i made from my com at my school, i could hardly make it it was waay to fast lol)) so if its too fast, nerf the delay by 6 or 7, it should make it go the needed speed.
|
Author: | Raknarg [ Sat Sep 14, 2013 8:53 pm ] |
Post subject: | RE:My very first game !! XD |
Cool little tool: Time.DelaySinceLast. It's similar to delay; delay indefinitely pauses the program for the given amount of time. Time.DelaySinceLast is a little different. It takes into account how long your program takes to run things. It compares time put into the parameter to the time it took since the function was last called. Lets say you wanted to have a frame about every 10 milliseconds. Your program takes 5 seconds on your computer to run per frame. Therefore, it will only pause the program for 5 milliseconds. If you give it to someone else who can run it in 2 milliseconds, it pauses for 8 seconds. If it takes someone 12 milliseconds, it disregards the delay. This makes it so it optimizes framerate even between different computers as much as possible just through delaying. |
Author: | slender0123 [ Sat Sep 14, 2013 9:27 pm ] |
Post subject: | RE:My very first game !! XD |
I will try to mess around with that new statement, I personally never heard of it before. so it will be completely new to me to figure out, much like arrays and such (which I still need to work on) Right now it's getting late, so I think I will try to figure it out tommorow. |
Author: | Nathan4102 [ Sat Sep 14, 2013 9:39 pm ] |
Post subject: | RE:My very first game !! XD |
Besides being impossible on my computer, it's pretty good for a first game, especially considering the best my classmates could do after 4 months of classes was a 2 player Rock paper scissors game! Keep up the good work |
Author: | slender0123 [ Sun Sep 15, 2013 5:11 pm ] | ||
Post subject: | RE:My very first game !! XD | ||
This is only my second week into programming with turing! I'm wayy ahead of my classmates lol, im pretty sure there still working on loops, im trying out arrays at this moment, because once you said 2 player rock paper scissors game, i wanted to make a rock papper scissors game with an option for 1 player or 2 player! I will probibly need to know how to open up other turing windows though.. if 1 of you guys could help a bit with that via pm or something, that would be of gr8 help And about the time delay since last thing.. would this be the code for it?
|
Author: | evildaddy911 [ Sun Sep 15, 2013 5:52 pm ] |
Post subject: | RE:My very first game !! XD |
pretty much. However, the parameter is "time in MILLISECONDS". that means that you will be getting up to 1000 frames per second. with that delay, all you will see is a white flash before the game over screen. Most games' delays will be about 10-30ms, so keep changing that parameter until you feel the game moves fast enough to be hard, but slow enough to be possible |
Author: | Nathan4102 [ Sun Sep 15, 2013 5:59 pm ] |
Post subject: | RE:My very first game !! XD |
I would wait a bit before attempting a 1 player Rock Paper Scissors. Only one player means the other player is computer controlled, which means getting into AI. Fun stuff, but not really 2 weeks experience stuff :p You could look into it though if you really want to do it. |
Author: | slender0123 [ Sun Sep 15, 2013 6:16 pm ] | ||
Post subject: | RE:My very first game !! XD | ||
I will fix my bounce game at school tommorow, i will make it possible on faster computers XD This is my rock paper scissors game so far XD
Theres one problem i want to ask for help though. I want it so that once the text hits a certain column, it will just delete the top row of words and push the rest up.. If you could post some pseudo code or something for it, that would be great! Thanks! |
Author: | tiedye1 [ Sun Sep 15, 2013 7:32 pm ] |
Post subject: | Re: My very first game !! XD |
To keep the text from overlapping the buttons in your rock paper scissors game, you can use the GUI.Refresh procedure to redraw the buttons and cls to clear the screen. |
Author: | evildaddy911 [ Sun Sep 15, 2013 7:57 pm ] | ||
Post subject: | RE:My very first game !! XD | ||
How I would do it is using an array.
Use the output procedure instead of put statements, then use cls, GUI.Refresh and a for loop to put each element to the screen |
Author: | Raknarg [ Sun Sep 15, 2013 9:21 pm ] |
Post subject: | RE:My very first game !! XD |
@Nathan unless you want to build a database which records an opponent's past moves and takes them into account, the AI is basically random. |
Author: | slender0123 [ Mon Sep 16, 2013 6:02 am ] | ||
Post subject: | RE:My very first game !! XD | ||
I think I will just post all my little games on this topic... Speaking of little games.. heres number 2! A finished 1 player rock paper scissors game!
|
Author: | slender0123 [ Mon Sep 16, 2013 8:45 am ] | ||
Post subject: | RE:My very first game !! XD | ||
This is the bouncing game, it should be fixed now for faster computers.
|