Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9124617
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T06:36:46+00:00 2026-06-17T06:36:46+00:00

I am trying to make my own engine but I need some help. I

  • 0

I am trying to make my own engine but I need some help.

I am currently doing the level system. The level class extends the render class and the level class overides the Render classes render method. Finally the render class is called from the main class but I dont call the level class.

EDIT:

I have removed the static but now cannot call the render method. I know I am very nooby I kind of teach my self.

package SimpleEngine.Render;

Render Class (This is called)

import static org.lwjgl.opengl.GL11.GL_COLOR_BUFFER_BIT;
import SimpleEngine.Primitives.*;
import static org.lwjgl.opengl.GL11.glClear;

public class Render {

    public void Render() {

    }

}

Level Class (This is not called) I want this Render method to override the Render classes render method but it doesn’t work.

package SimpleEngine.Level;

    import static org.lwjgl.opengl.GL11.GL_COLOR_BUFFER_BIT;
    import static org.lwjgl.opengl.GL11.glClear;
    import SimpleEngine.Render.*;
    import SimpleEngine.Primitives.*;

    public class Level extends Render {

        public void Render() {
            glClear(GL_COLOR_BUFFER_BIT);
            Primitives.DrawSquare(200, 200, 50, 50, 1, 0, 0);
        }

    }

My main method (calls render but cannot anymore)

package SimpleEngine;

import org.lwjgl.LWJGLException;
import SimpleEngine.Level.*;
import SimpleEngine.Logic.*;
import SimpleEngine.Input.*;
import SimpleEngine.Render.*;
import SimpleEngine.Entites.*;
import SimpleEngine.Timer.*;
import org.lwjgl.Sys;
import org.lwjgl.input.Keyboard;
import org.lwjgl.opengl.Display;
import org.lwjgl.opengl.DisplayMode;

import static org.lwjgl.opengl.GL11.*;

public class simpleEngine {

    public static final int WIDTH = 640;
    public static final int HEIGHT = 480;
    private static boolean isRunning = true;


    public static void main(String[] args) {
        setUpDisplay();
        setUpOpenGL();
        Entity.setUpEntities();
        Timer.setUpTimer();
        while (isRunning) {
            Render.Render();
            Logic.logic(Timer.getDelta());
            Input.input();
            Display.update();
            Display.sync(60);
            if (Display.isCloseRequested()) {
                isRunning = false;
            }
        }
        Display.destroy();
        System.exit(0);
    }

    private static void setUpDisplay() {
        try {
            Display.setDisplayMode(new DisplayMode(WIDTH, HEIGHT));
            Display.setTitle("SimpleEngine");
            Display.create();
        } catch (LWJGLException e) {
            e.printStackTrace();
            Display.destroy();
            System.exit(1);
        }
    }

    private static void setUpOpenGL() {
        glMatrixMode(GL_PROJECTION);
        glLoadIdentity();
        glOrtho(0, 640, 480, 0, 1, -1);
        glMatrixMode(GL_MODELVIEW);
    }

}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T06:36:48+00:00Added an answer on June 17, 2026 at 6:36 am

    You can’t override static methods.

    As per Oracle tutorail

    If a subclass defines a class method with the same signature as a class method in the superclass, the method in the subclass hides the one in the superclass.

    AND

    You will get a compile-time error if you attempt to change an instance method in the superclass to a class method in the subclass, and vice versa.

    Remove static from Render class render() method and change Level class Render method to render() to introduce overriding behavior

    EDIT:

     while (isRunning) {
                new Level().Render(); 
    

    Note: Java naming convention suggests that method name should start with small letter and name should be camelcase.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I was trying to make my own class for currencies using longs, but apparently
I am trying to make my own Jabber bot but i have run into
i'm trying to make my own IAuthorizationFilter attribute class. Basically, each api call has
I am trying to make my own website and only know some basic HTML,
I'm trying to make my own custom view, currently all it does is draw
I'm trying to make my own simple framework in PHP. It's going OK but
I'm trying to make my own button in flash application. Here is some code:
I'm trying to make my own shell in C, but am having trouble with
Currently I'm trying to make my own front-end to GDB. Everything thus far is
Okay, so I am trying to make my own captcha system. I have two

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.