Wednesday, April 19, 2017

Equation difference

beam_y = ship_y + 40 * sin(.45 *(beam_x += 20)) + 16;
                               ^ this number has a verticle shift
the .45 after sin handles the frequency
the third number after beam_x effects the starting position
the last number effects the horizontal shift

Wednesday, February 15, 2017

Thursday, February 2, 2017

Allegro Helper library

Step one: Download & install Allegro
Step two: Properties > Allegro> Addons > click on your library
Step three: #include allegro & helper libraries
Step four: Call the initialize functions for allegro & helper library
Step five: Call functions from helper library

Other librarys

Allegro is one of many other libraries out there. You can use java, C#, there are 256 other languages to use. Allegro uses fprint as a form of printing words to the screen.  System.out.println("Hello World!"); is used in java, and C# uses the code Console.WriteLine("Hello World!"); to print to screen.  Java is a very common language to use in coding and learning that would definitely be an advantage. That is a future goal of mine.

Friday, January 27, 2017

#include <allegro5/allegro.h>
#include <allegro5/allegro_primitives.h>
int main() {
ALLEGRO_DISPLAY *display = NULL;
ALLEGRO_BITMAP *bit = NULL;
al_init();
display = al_create_display(500,400);
al_init_primitives_addon();
al_clear_to_color(al_map_rgb(0, 150, 0));
al_draw_circle(200, 300, 100,al_map_rgb(120, 0, 200),5);
al_draw_rectangle(50.0, 50.0, 200.0, 200.0, al_map_rgb(120, 0, 200), 5);
al_flip_display();
al_rest(20.0);
}
how to maketh thy circles and squares

Monday, January 23, 2017

Allegro function al_init()

The allegro function al_init() and its companions are variables they must go in order.

Friday, January 20, 2017

Allegros flipDisplay() function holds the memory in a way. This function allows you to print to the screen what the computer has stored in terms of memory.