Building a game on the web

Started by
3 comments, last by Talvysh 10 years, 8 months ago
Hey all I'm going to be attending college for my web development degree and I was curious if I could make a game on the web with the knowledge that I would gain from my degree.

I know I would use CSS for graphics, javascript for scripting, and I believe PHP/SQL for handling variables. Is this correct?

I've done my fair share of research on game design I'd just like to know what I should look out for that would help with web gaming. And yes I know I will pay attention to all the courses and not just the game specific ones. :p

"... If fate is a millstone, then we are the grist. There is nothing we can do. So I wish for strength. If I cannot protect them from the wheel, then give me a strong blade, and enough strength... to shatter fate."

Advertisement

It depends a lot on what kind of game it is, how realtime it is, etc. An important part is the communication between the front-end (Javascript, CSS, the DOM) and back-end (PHP in this case), which will be used to update the shared state. AJAX requests might work well for you. I hope this is covered by your courses, because it's one of the "modern ways" of developing web pages.

There are essentially two approaches:

1. Write the game primarily on the server-side, and treat the HTML just as part of a "view layer". Advantages: security against cheating, browser-compatibility (needs only a fairly dumb browser)

2. Write the game primarily on the client-side and use the server just to share / store data. Advantages: real-time games are more feasible, less processing required on the server.

While you can make a "mixed" approach, it's going to be more complicated and have the advantages of neither. Some types of game e.g. a "mini-game" game, might be best done through a mixed approach, but most probably lend themselves to one or the other.

If you want to use OpenGL for rendering have a look at WebGL: http://en.wikipedia.org/wiki/WebGL

Thanks for all the replies guys. ^_^

I can give you a broad list of things I suppose, but it wouldn't be anything final.

It'll be a civ sim/MMO/F2P. I guess at the basics you would be able to control your nation, trade with other nations, war with them, etc. War wouldn't be huge, probably just a statistics sheet or something. Like I said, haven't really worked out much for it yet. Still working on drawing, writing bits and pieces for the login, menus, and other basic junk, etc.

That's what I'm thinking right now though.

"... If fate is a millstone, then we are the grist. There is nothing we can do. So I wish for strength. If I cannot protect them from the wheel, then give me a strong blade, and enough strength... to shatter fate."

This topic is closed to new replies.

Advertisement