Monday, April 30, 2018

Adding modulo on the random function

in Rock, Paper, Scissors earlier this week, some students generated random numbers like this: rand()%3, and others did this: rand()%100+1

How are they different? Which way do you think is better and why?
Those percentages are called modulo and they set a limit on the random generator. For example the 100+1 is to find a random number from 1-100. There isn't a better or worse on because it all depends on the certain project.

Wednesday, April 11, 2018

Allegro Keyboard input

When I did my keyboard input I had to make one square move with the arrows and I had that working and when I chose the second players key binds. I chose the WASD keys. I made second player move the second bitmap with the WASD keys.

Allegro sounds

The sounds I have used with allegro  is my pong game is when my ball hits the paddle it makes
a roblox death sound and I also have back ground music when you play the game.

Friday, April 6, 2018

Allegro primitives

Create a blog post (3-5 complete sentences) where you describe what primitives are, and the steps you need to use them in your games.

Primitives are shapes you can draw in allegro. You need to add the primitives library and add on and of course the code to draw the shape. There are a lot of shapes you can draw with this library.

Allegro images

In your blog, use 3-5 sentences to describe the steps needed to show images in your game window.

First you need to download the images you want in your file, make sure you put it in the right folder. Then after that, add the image library, you need to turn on the image add on. Then type in the code code you have gotten from allegro tutorial.

Allegro Fonts

In your blog, describe the steps you used to write words of different font types in your game window.


  1. download your fonts
  2. put both fonts file in the program file 
  3. set up the font allegro code(create a game window, type in the add ons, al_load, render section, clear to color, al_draws, flip display, al_rest, and al_destroy_display.
  4. type ALLEGRO_FONT *font = al_load_ttf_font("font.ttf", 20, 0); two times.

Wednesday, April 4, 2018

allegro game window

In your blog, explain what Allegro is, and how you can use it to set up a game window.

Allegro is a library and you can use it with its unique language to great game windows for your own game. You use the game window for the games visuals.