Browser Game

Whether you're a newbie or an experienced programmer, any questions, help, or just talk of any language will be welcomed here.

Moderator: Coders of Rage

User avatar
ibly31
Chaos Rift Junior
Chaos Rift Junior
Posts: 312
Joined: Thu Feb 19, 2009 8:47 pm
Current Project: Like... seven different ones
Favorite Gaming Platforms: Xbox 360, Gamecube
Programming Language of Choice: C++, ObjC
Location: New Jersey.

Browser Game

Post by ibly31 »

Hai I wanna maek a mmoe on teh broswer!1

Actually, I've been wondering how they are made. I would like to attempt some sort of game played in the browser that is multiplayer, but I know that won't happen, so I'd like to start at the basics. I know how to use MySQL databases and PHP and junk, but the thing that confuses me is the graphics. (NO FLASH PLEASE)I know your not gonna find something that is a full 3D FPS in a browser game, but what about the simple 2D drawings? Do they use something like the canvas tag? One idea that I thought of, but I don't know how practical it is, is to set the source of an image to a php page that outputs an image that you create. PHP can create images and put its on text and stuff on it, so can it create entire images with more than just text?

I also know that since PHP is server side, how do you tell it to update the person's stats on screen and stuff when HTML and JavaScript is all client side?
Image
Twitter
Website/Tumblr
My Projects

The best thing about UDP jokes is that I don’t care if you get them or not.
Live-Dimension
Chaos Rift Junior
Chaos Rift Junior
Posts: 345
Joined: Tue Jan 12, 2010 7:23 pm
Favorite Gaming Platforms: PC - Windows 7
Programming Language of Choice: c++;haxe
Contact:

Re: Browser Game

Post by Live-Dimension »

Flash, Flash c++ wrapper runtime, Java, or Unity3D.

Or the best javascripting on the planet
Image
User avatar
davidthefat
Chaos Rift Maniac
Chaos Rift Maniac
Posts: 529
Joined: Mon Nov 10, 2008 3:51 pm
Current Project: Fully Autonomous Robot
Favorite Gaming Platforms: PS3
Programming Language of Choice: C++
Location: California
Contact:

Re: Browser Game

Post by davidthefat »

I forgot what it was called but there was/is a full on FPS in 3d played on the browser, it was programming in flash, I forgot the name of it, it was full speed too

edit: http://www.rasterwerks.com/
Live-Dimension
Chaos Rift Junior
Chaos Rift Junior
Posts: 345
Joined: Tue Jan 12, 2010 7:23 pm
Favorite Gaming Platforms: PC - Windows 7
Programming Language of Choice: c++;haxe
Contact:

Re: Browser Game

Post by Live-Dimension »

davidthefat wrote:I forgot what it was called but there was/is a full on FPS in 3d played on the browser, it was programming in flash, I forgot the name of it, it was full speed too

edit: http://www.rasterwerks.com/
That's actually Adobe Director. It'd probably do the job better then flash, but the shockwave plugin is no where near as used and installed as much as flash is.
Image
Winawer
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 17
Joined: Tue Jan 05, 2010 10:51 am

Re: Browser Game

Post by Winawer »

ibly31 wrote:Hai I wanna maek a mmoe on teh broswer!1

Actually, I've been wondering how they are made. I would like to attempt some sort of game played in the browser that is multiplayer, but I know that won't happen, so I'd like to start at the basics. I know how to use MySQL databases and PHP and junk, but the thing that confuses me is the graphics. (NO FLASH PLEASE)I know your not gonna find something that is a full 3D FPS in a browser game, but what about the simple 2D drawings? Do they use something like the canvas tag? One idea that I thought of, but I don't know how practical it is, is to set the source of an image to a php page that outputs an image that you create. PHP can create images and put its on text and stuff on it, so can it create entire images with more than just text?
That's kind of vague, but you could probably use Canvas and/or JavaScript depending on what you're trying to do.
ibly31 wrote:I also know that since PHP is server side, how do you tell it to update the person's stats on screen and stuff when HTML and JavaScript is all client side?
AJAX.
User avatar
ibly31
Chaos Rift Junior
Chaos Rift Junior
Posts: 312
Joined: Thu Feb 19, 2009 8:47 pm
Current Project: Like... seven different ones
Favorite Gaming Platforms: Xbox 360, Gamecube
Programming Language of Choice: C++, ObjC
Location: New Jersey.

Re: Browser Game

Post by ibly31 »

Hmm I'll have to think of how AJAX can be used for this, because every time I've tried to use the XMLHttpRequest it has been really gay. I know the whole point of Ajax is to be asynchronous, but I think it would have been easier to be synchronous. Also, I know you are all trying to help but I am not doing anything involving flash.
Image
Twitter
Website/Tumblr
My Projects

The best thing about UDP jokes is that I don’t care if you get them or not.
User avatar
davidthefat
Chaos Rift Maniac
Chaos Rift Maniac
Posts: 529
Joined: Mon Nov 10, 2008 3:51 pm
Current Project: Fully Autonomous Robot
Favorite Gaming Platforms: PS3
Programming Language of Choice: C++
Location: California
Contact:

Re: Browser Game

Post by davidthefat »

http://lwjgl.org/ try this java API
User avatar
ibly31
Chaos Rift Junior
Chaos Rift Junior
Posts: 312
Joined: Thu Feb 19, 2009 8:47 pm
Current Project: Like... seven different ones
Favorite Gaming Platforms: Xbox 360, Gamecube
Programming Language of Choice: C++, ObjC
Location: New Jersey.

Re: Browser Game

Post by ibly31 »

That does look like a pretty cool API for desktop games, but the thing I'm aimed at is a browser game. My main goal is to make it compatible with the iPod touch and mobile devices like that, along with an actual computer. I researched the XMLHttpRequest function and I think I understand how to use it, correct me if I am wrong:

I have my game which calls a function, lets call it "reloadStats()". It calls an XMLHttpRequest function that grabs a PHP page that goes into my database, outputs the values in a format I can understand, sends the page back to my javascript, parses it, and pastes it onto the users screen? (Try to say that all in one breath. :D )
Image
Twitter
Website/Tumblr
My Projects

The best thing about UDP jokes is that I don’t care if you get them or not.
User avatar
davidthefat
Chaos Rift Maniac
Chaos Rift Maniac
Posts: 529
Joined: Mon Nov 10, 2008 3:51 pm
Current Project: Fully Autonomous Robot
Favorite Gaming Platforms: PS3
Programming Language of Choice: C++
Location: California
Contact:

Re: Browser Game

Post by davidthefat »

I know this can be a pain in the butt, but have you thought about using animated GIFs? if you dont want to use flash, the other thing I can think of is GIFs
Winawer
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 17
Joined: Tue Jan 05, 2010 10:51 am

Re: Browser Game

Post by Winawer »

ibly31 wrote:I have my game which calls a function, lets call it "reloadStats()". It calls an XMLHttpRequest function that grabs a PHP page that goes into my database, outputs the values in a format I can understand, sends the page back to my javascript, parses it, and pastes it onto the users screen? (Try to say that all in one breath. :D )
Sounds about right.
User avatar
ibly31
Chaos Rift Junior
Chaos Rift Junior
Posts: 312
Joined: Thu Feb 19, 2009 8:47 pm
Current Project: Like... seven different ones
Favorite Gaming Platforms: Xbox 360, Gamecube
Programming Language of Choice: C++, ObjC
Location: New Jersey.

Re: Browser Game

Post by ibly31 »

Yeah, I just feel like that would be more pain than it is worth. I'm gonna look around at some browser games to see how they do graphics. Can Flash interact with MySQL databases?
Image
Twitter
Website/Tumblr
My Projects

The best thing about UDP jokes is that I don’t care if you get them or not.
User avatar
davidthefat
Chaos Rift Maniac
Chaos Rift Maniac
Posts: 529
Joined: Mon Nov 10, 2008 3:51 pm
Current Project: Fully Autonomous Robot
Favorite Gaming Platforms: PS3
Programming Language of Choice: C++
Location: California
Contact:

Re: Browser Game

Post by davidthefat »

ibly31 wrote:Yeah, I just feel like that would be more pain than it is worth. I'm gonna look around at some browser games to see how they do graphics. Can Flash interact with MySQL databases?
http://www.youtube.com/watch?v=pxHX6DmhWdA
yea it can
User avatar
RyanPridgeon
Chaos Rift Maniac
Chaos Rift Maniac
Posts: 447
Joined: Sun Sep 21, 2008 1:34 pm
Current Project: "Triangle"
Favorite Gaming Platforms: PC
Programming Language of Choice: C/C++
Location: UK
Contact:

Re: Browser Game

Post by RyanPridgeon »

Most browser games are done on Flash, so you really will need to use this if you want to have a standard web game. Flash does have a nice language (Actionscript 3) which is similar to Java and its animation/art tools are the bomb so I'd recommend just use Flash!
Ryan Pridgeon
C, C++, C#, Java, ActionScript 3, HaXe, PHP, VB.Net, Pascal
Music | Blog
User avatar
ibly31
Chaos Rift Junior
Chaos Rift Junior
Posts: 312
Joined: Thu Feb 19, 2009 8:47 pm
Current Project: Like... seven different ones
Favorite Gaming Platforms: Xbox 360, Gamecube
Programming Language of Choice: C++, ObjC
Location: New Jersey.

Re: Browser Game

Post by ibly31 »

I'm on a mac and the version of Flash for mac is horrible in my opinion. I'd like something compatible with mobile devices so that throws flash out the window unless Apple decides to make flash run on the iPhone platform.(not gonna happen).
Image
Twitter
Website/Tumblr
My Projects

The best thing about UDP jokes is that I don’t care if you get them or not.
User avatar
Arce
Jealous Self-Righteous Prick
Jealous Self-Righteous Prick
Posts: 2153
Joined: Mon Jul 10, 2006 9:29 pm

Re: Browser Game

Post by Arce »

Hai I wanna maek a mmoe on teh broswer!1

Actually, I've been wondering how they are made. I would like to attempt some sort of game played in the browser that is multiplayer, but I know that won't happen, so I'd like to start at the basics. I know how to use MySQL databases and PHP and junk, but the thing that confuses me is the graphics. (NO FLASH PLEASE)I know your not gonna find something that is a full 3D FPS in a browser game, but what about the simple 2D drawings? Do they use something like the canvas tag? One idea that I thought of, but I don't know how practical it is, is to set the source of an image to a php page that outputs an image that you create. PHP can create images and put its on text and stuff on it, so can it create entire images with more than just text?

I also know that since PHP is server side, how do you tell it to update the person's stats on screen and stuff when HTML and JavaScript is all client side?
Dude, google "Unity3d" and try the free download. I think it's a pretty sound engine, and it runs flawlessly in the browser. Not to mention you really can be up and running a full 3d FPS with muliplayer in under a day.
<qpHalcy0n> decided to paint the office, now i'm high and my hands hurt
Post Reply