Jump to content
  • Advertisement
purplecheese44

HTML5 How to make a “world” type thing in html and javascript

Recommended Posts

I dont really know exactly how to explain my issue so i will do my best. I'm looking to make an html game with javascript. I want to know how to setup an environment that has a big "world" but what you can see is only a small part of it as you move around. If you have ever played agar.io thats what i mean. Feel free to ask questions.

Share this post


Link to post
Share on other sites
Advertisement

I'm not trying to be a smart ass, but you implement that by understanding the concepts and applying them. You'd have your world data in a structure you can access. That guy will hold all the game objects and their position. You keep up with your player position, and get the list of objects whose position is within the viewport rect.  Then "draw" those to the screen.  If the article doesn't really make sense you might want to try to implement a different game. If you feel like you're close to understanding, what part in particular are you having trouble with?

- Eck

Share this post


Link to post
Share on other sites
10 minutes ago, Eck said:

I'm not trying to be a smart ass, but you implement that by understanding the concepts and applying them. You'd have your world data in a structure you can access. That guy will hold all the game objects and their position. You keep up with your player position, and get the list of objects whose position is within the viewport rect.  Then "draw" those to the screen.  If the article doesn't really make sense you might want to try to implement a different game. If you feel like you're close to understanding, what part in particular are you having trouble with?

- Eck

I completely understand that, what i meant was specifics like, how exactly to setup multiple canvases that can do that. im brand new to html

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!