Cs420 Week 7-14.pdf

Verified academic study resource for CS420 (Game Design and Development) under the Computer Science at Virtual University of Pakistan. This PDF document (Verified Study Resource) covers Full Course Curriculum spanning approximately 280 pages across 8 curriculum modules, and is indexed for student examination review with instant in-browser preview and 100% free direct download.

Course
CS420 – Game Design and Development
Faculty
Computer Science
Format
PDF
Type
Study Resource
Coverage
Full Course Curriculum

Review this document alongside the official handouts and test your retention in the Interactive MCQs Studio.

What this file covers — CS420 syllabus roadmap

  1. Core Architecture, Syntax & Primitive Data Structures — Lectures 1 to 6 (Pages 1 to 65). 15% Objective Marks (8–10 MCQs)
  2. Conditional Branching, Loops & Logical Control Flow — Lectures 7 to 12 (Pages 66 to 140). 18% Exam Marks (MCQs + 2-Mark Short Questions)
  3. Memory Management, Pointers, Arrays & Functions — Lectures 13 to 18 (Pages 141 to 215). 22% Exam Marks (High Yield for Midterms)
  4. Midterm Consolidation, Strings & Algorithm Synthesis — Lectures 19 to 22 (Pages 216 to 280). Midterm Exam Culmination (Lectures 1–22 Scope)
  5. Object-Oriented Paradigms: Classes & Data Abstraction — Lectures 23 to 29 (Pages 281 to 360). 16% Final-Term Marks (Core OO Concepts)
  6. Inheritance Hierarchies & Dynamic Polymorphism — Lectures 30 to 36 (Pages 361 to 435). 20% Final-Term Marks (Virtual Functions & V-Tables)
  7. Templates, Standard Library & Persistent File I/O — Lectures 37 to 41 (Pages 436 to 510). 14% Final-Term Marks (Generic Code & Streams)
  8. Final-Term Examination Dossier & Capstone Synthesis — Lectures 42 to 45 (Pages 511 to 585). Final-Term Exam Synthesis (Lectures 23–45 Scope)

Frequently asked questions

Where can I download Cs420 Week 7-14.pdf for free?

You can preview and download "Cs420 Week 7-14.pdf" (CS420 PDF, ~280 pages) directly from the MIHORA VU Study Library (https://study.mihora.tech/doc/cs420-week-7-14-pdf-2) with 100% free high-speed downloads and zero registration requirements.

What syllabus chapters and lectures are covered in this CS420 file?

This document covers Full Course Curriculum across 8 distinct lecture units (Lectures 1 to 6, Lectures 7 to 12, Lectures 13 to 18, Lectures 19 to 22, Lectures 23 to 29, Lectures 30 to 36, Lectures 37 to 41, Lectures 42 to 45), featuring comprehensive definitions, solved objective questions, and examiner marking rubrics.

What is the passing criteria for CS420 under the VU 20% Two-Half Rule?

Under official Virtual University regulations, students must score at least 20% in the First Half (Quizzes, Assignments, GDBs, and Midterm combined) AND independently at least 20% in the Final-Term examination paper. Scoring under 20% in the final exam results in an automatic F grade regardless of earlier marks.

Are CS420 solved past papers and handouts verified for 2026 exams?

Yes. All CS420 materials on MIHORA VU—including Moaaz, Waqar Siddhu, and team archives—are reviewed against the current VU syllabus to help students prepare for 2026 Midterm, Final-Term, and online quiz examinations.

Inside this file

Importance of
 Performance

Why performance
 A slow site means that you will have less user
 engagement.

Example
let's say you accidentally, introduce a
performance issue, that causes your page to
take an extra half second to load. That's just
500 milliseconds.

That's a pretty small difference.

What kind of difference, in user engagement
,do you think this would cause?

Even such a small change, causes a slightly
more than one percent drop
in user engagement, and income from your
site.

It is a requirement
     Many well publicized studies from Google,
Microsoft, Amazon, Facebook, and others, all
show that UI performance translates directly to
profit. A drop in performance directly drives a
drop in user engagement. In short, speed is
not a feature, it's a requirement. Users won't
use your app if it's not fast.

Analyzing Performance

When to consider Performance
     Of course, it's nearly impossible to graph
performance into your application after it's
already been built, but before we get into good
performance patterns, the first step to insuring
great performance, is being able to analyze
your performance

#perfmatters

Chrome Development Tools
Chrome Development Tools

Understanding Network

Pillars of Performance
 Three pillars of performance are

 Network
 Render
 Compute

Network
 Examples
 1. www.vu.edu.pk
 2. http://playbiolab.com/
 3. https://www.eecs.mit.edu/

Touch Interaction

One of the most important factors in an
immersive user experience on a mobile device
is touch interaction. You expect a responsive
interaction from a device that you hold in the
palm of your hand, and with most mobile
screens, your primary pointing device is your
finger.

As a mobile web developer, you need to be
sure that you're building great touch enabled
user devices

Simple rules for touch UI

Rule 1
Do not relay on Hover Effect

Buttons Source: http://www.w3schools.com/css/css3_buttons.asp

Rule 2
Size of Touch Area should be at-least

    10mm X 10 mm

Rule 3
Touch and mouse are not mutually exclusive

Rule 4
Provide Mouse support as well.

Don’t do anything

It is important to understand that you may not
even need to do anything in order to support
touch.

Touch events emulate mouse clicks already,
and the web browser builds in some gestures
like scrolling and zooming.

So, you only need to implement something
here in cases where the gesture support Or
mouse emulation does not give an optimal user
experience.

Example
 http://www.w3schools.com/css/css3_button
 s.asp

Click Delay

Touch supporting mobile browsers, usually
interpret double tapping, as a zoom into this
element gesture. Unfortunately, this means the
platform, delays firing click of it until it can
decide whether, the user is double tapping.

This delay is about a third of a second.

Chrome has recently checked in some changes,
that minimize this behavior.
But, pretty much, all mobile browsers,
have this click delay feature, to some degree.

Fix
There are a few ways to fix this problem, and,
get clicks without a delay,

1) You can set the view port, to be non-
scalable. Either, set user scalable, to no, or set
minimum scale and maximum scale, to one,
which has the same effect. This can cause
accessibility problems, though, so be careful
jumping, to this solution. You need to make
sure, if you do this, that your site will never
,need to be zoomed.

2) You can use a fast click library, like the ft
labs one, that we've linked down below. But
,you do have to be careful, about how this
impacts, your scrolling performance, be sure to
read the directions, very carefully.

https://github.com/ftlabs/fastclick

3) Where finally, of course, you can implement
tech support yourself directly, if you consume
the touch events, you won't have this issue.

Supporting Touch

Go to www.caniuse.com

And search for “touch”

Or go to http://caniuse.com/#feat=touch

Touch Events
 touchstart-> mousedown
 touchmove -> mousemove
 touchend -> mouseup
 touchcancel

Touch Events

Source: https://www.w3.org/TR/touch-events/#touchevent-interface

Source: https://www.w3.org/TR/touch-events/#touch-interface

Touch Events are Fired on The
Original Target
Touch events are always delivered to the element
that first received that Touch.

They don't walk across boundaries like Mouse
Events do. So it's important to hook the right
elements. In fact, it's a good idea to add the touch
end handler during your touch start handler. And,
keep in mind too that even if you remove a DOM
element from your tree, it still gets the events until
the touch ends.

DOM http://www.w3schools.com/js/js_htmldom.asp

Mouse Emulation

Example:

https://webaudiodemos.appspot.com/midi-
synth/

Synthesizer Application

Application Link

https://webaudiodemos.appspot.com/

https://github.com/cwilso/midi-synth

We will Initially start with touch events.

There were two challenges, though. First,
you'll notice that on the desktop, if I don't
have that touch event emulation turned on, it
doesn't actually work at all when I use the
mouse.

Of course, this is expected. But I didn't really
want two code paths, one for mouse and one
for touch. Secondly, I really wanted to be able
to have a drag across the keyboard. Play each
note as you slid across it in turn. But with the
way touch delivers all the events to the
originally touched down element, I would have
had to calculate the hit testing myself for these.
And that was kind of a pain.

I really wanted these touch events to be
delivered to the down element for each key.
Instead what happens in this synth, is when I
hit one key and then drag, it doesn't actually
move where the events are delivered.

Getting Started With
       Touch Events

Example - 1

 We define a touch-sensitive div to which we
 will attach an event listener. We also define
 a div at the top where we will display the
 screen coordinates of the most recent touch.

 Next we add some JavaScript to register the
 event listener, and add a handler function to
 do something with the touch data:

 So, here we’re simply identifying the
 touchzone div, attaching a listener for

More CS420 files

All CS420 files · Midterm Prep 2026 · MCQs Bank