Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Guidance Once you setup the rendering loop, it is time to start drawing a pixel. Call your function that draws a pixel and make sure

Guidance
Once you setup the rendering loop, it is time to start drawing a pixel. Call your function
that draws a pixel and make sure it is drawing in the correct location. Contrasting colors
are best to test with.
Now that you can draw a pixel, we should now attempt to draw a tile (square set of
pixels) or BLTT an image.
a. For the tile's height
i. For the tile's width
i. Find the location into the image array. (2D to 1D)
ii. Draw a pixel at this location iterating through the width and the height
b. Once you are able to draw a BLIT / tiled image, we need to fill our color buffer with
the same image. You are essentially going to repeat this BLIT horizontally and
vertically as well.
i. For the number of evenly divisible tile heights
i. For the number of evenly divisible tile widths
i. Call your function to draw a tile.
ii. At this point you should notice a border around the edge of your right and
bottom side of the screen. This is because the remaining pixels did not constitute
enough space to draw another BLIT. What needs to be done to your draw
function to adjust for this?
iii. Getting this far you should have a strong understanding on how to BLIT. Place 10
BLITs randomly placed throughout the color buffer. These can be anything of
your choosing. Obvious choices would be something large enough to notice.
iv. Now let us introduce 1 "cell" of an animation. Be careful here because this is
where you need to interpolate through color values since the animation might
have alpha values lower than 255.
v. As soon as you can get a properly rendering BLIT with alpha transparency, solve
how to iterate through the animation over time. Make sure the animation plays
smoothly at 30 fps.
Grading Breakdown
These grade categories are based on your implementation of the BLIT operation described
above and act as tests to verify that it can properly copy a specified section of color data to
the raster surface. Grading Breakdown
These grade categories are based on your implementation of the BLIT operation described
above and act as tests to verify that it can properly copy a specified section of color data to
the raster surface.
25%- Get a tiled background showing on the entire color array
The color values will be strange but this is fine for this section.
50%- Swap the color bits from BGRA to ARGB and get 10 random objects in the color
array.
Some bit manipulation will be needed in order to fix the colors
If you were able to get this far, you should be able to draw 10 random "tiled" objects
onto the color array as well.
Make sure that the objects don't wrap around the edge of the screen and that
objects that go off the bottom of the screen don't crash the application in release
mode. 75%- Get at least 1 "cell" of an animation rendering properly with blending. Ensure that
the cell properly blends with what is behind it
Depending on the alpha value of the cell, some form of interpolation will be needed
to handle properly blending the background with the cell.
100%- Play an animation with a high speed timer ( The XTime class is great for this)
Animation should update at 30 frames per second and the window itself should be
running at a minimum of 30 FPS.
Refer to the example executable to see the completed animation example.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Concepts Of Database Management

Authors: Philip J. Pratt, Joseph J. Adamski

4th Edition

0619064625, 978-0619064624

More Books

Students also viewed these Databases questions

Question

6. Secure job interviews and manage them with confidence

Answered: 1 week ago