Class Notes (808,861)
United States (313,319)
CS 1110 (9)
Lecture 1

CS 1110 Lecture 1: November 8 – Game Design with Gamebox

2 Pages
Unlock Document

University of Virginia
Computer Science
CS 1110

November 8 Game Design with Gamebox Sunday, November 5, 2017 11:18 AM >>2pm video Files on CS1110 site give all options of what we are allowed to do in Gamebox is a platform jumper Conditional logic >> If box touches(wall): Box.speedx = 0 >> this makes it so that you cannot move whilst touching a surface >> is a wall jumper (jump with no overlap) For wall walls: If on ground, on_ground = True If pygame.K_UP in keys and on_ground: #if you hit up and you are on the ground Jump >> One constraint: if you not want to show overlapping in the end, we need to make sure not_overlapping happens immediately before we draw. Not_overlapping has to be the last thing before draw The right order: 1. Check if jump is okay 2. Check keys 3. Do physics stuff 4. Make walls 5. Draw Anything out of this order does not work (this is the idea of dependency ordering You need two loops: 1. One that says you can jump 2. And another that says to stop overlapping >> only jumps when we are on the ground >> We want global timer to be used with flapping (2pm 22:50) Box.timer = 0 # you can add as many new custom things to a box Def tick(keys): Global timer Camera.clear( Box1.timer += 1 >> keeyp track of collected coins For coin in coins: For wall in walls: If coin.touches(wall): Coins.remove(coin) >> Different types of games: 1. Driving rocket ship around sun o Do find offset of dx and dy for spaceshipto find (x,y), you get its locat
More Less

Related notes for CS 1110

Log In


Don't have an account?

Join OneClass

Access over 10 million pages of study
documents for 1.3 million courses.

Sign up

Join to view


By registering, I agree to the Terms and Privacy Policies
Already have an account?
Just a few more details

So we can recommend you notes for your school.

Reset Password

Please enter below the email address you registered with and we will send you a link to reset your password.

Add your courses

Get notes from the top students in your class.