Skip to content

osreboot/Ridhvl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Note: this engine is undocumented and outdated. It has served us well, but it's time to move on. Go check out Ridhvl2!


Reboot's In-Depth High Velocity Library

Ridhvl Logo

Ridhvl is a library designed to provide quick shortcuts and templates for game jams such as the Ludum Dare and MiniLD.

Admittedly, this library was designed with my own personal use in mind. However, pull requests that provide helpful and logical additions will be accepted.

Ridhvl requires Lwjgl 2 and slick-util to function.


Minimum Viable Product

package com.osreboot.ridhvltest;

//Don't forget to statically import painter!
import static com.osreboot.ridhvl.painter.painter2d.HvlPainter2D.*;

import com.osreboot.ridhvl.display.collection.HvlDisplayModeDefault;
import com.osreboot.ridhvl.template.HvlTemplateInteg2D;

/*
 * There are a number of templates to choose from - HvlTemplateInteg2D is the simplest
 * because it already includes content loaders (you don't have to make your own).
 */
public class Main extends HvlTemplateInteg2D{

    public static void main(String args[]){
        new Main();// Instantiate our program
    }

    public Main() {
        // Window configuration
        // super(max_framerate, window_width, window_height, window_title, window_display_mode)
        super(60, 1280, 720, "Ridhvl Test!", new HvlDisplayModeDefault());
    }

    // Initialize is called once on program startup
    @Override
    public void initialize() {
        // Loading a texture
        // - ".png" is implied
        // - HvlTextureLoader and HvlSoundLoader both default to looking in the "/res" folder of your project
        getTextureLoader().loadResource("Icon");
    }

    // Update is called every frame - "delta" is the time (in seconds) since the last frame update
    @Override
    public void update(float delta) {
        // Drawing a quad
        // hvlDrawQuad(quad_origin_x, quad_origin_y, quad_width, quad_height, texture_or_color)
        // - The texture is referenced with the order in which it was loaded (0 for first, 1 for second, etc.)
        // - Also look into hvlDrawQuadc - draws with the origin at the center of the quad rather than top-left
        hvlDrawQuad(100, 100, 512, 512, getTexture(0));
    }

}

About

Ridhvl - Reboot's In-Depth High Velocity Library (See https://github.com/osreboot/Ridhvl2)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages