Reply to topic  [ 3 posts ] 
 HTML5 game development 
Author Message
Level 0
Level 0
User avatar

Cash on hand:
3,119.50
Posts: 37
Joined: Sat Dec 01, 2018 11:05 am
Location: A place of darkness and trickery
Group: Registered users
Post HTML5 game development
Anyone here gotten into game development with HTML5? I've written partial implementations of Pong and Battleship in HTML5 using the Canvas feature.

Here's my Pong program on Pastebin: https://pastebin.com/GtzAFG4j

And here's a screenshot of it running:
Image

I've got the animation part mostly working, but I haven't written any of the actual controls to move the paddles.

I kinda like the idea of HTML5 game programming. It seems cleaner and more elegant than Flash for some reason. Probably has to do with the fact that its' all in textual format, so it's less bloated that way.

I haven't worked on this in a few weeks though. I did some serious HTML5 game programming for a couple nights and then abandoned it for other things. I'd like to go back, because I feel like this language has a lot of potential and game development in HTML5 could be incredibly fun and enjoyable. I wanna hear what people have to say about HTML5 games (from the development perspective). Help motivate me to start back up again. :meow

_________________
Life is a tragedy for those who feel and a comedy for those who think.
-- Horace Walpole


My coding projects can be found here: https://pastebin.com/u/AnonymousNamefag
I welcome critiques, since Pastebin doesn't seem to have a feedback mechanism.


Sun Dec 02, 2018 8:27 pm
Profile E-mail WWW
Level 39
Level 39
User avatar

Cash on hand:
2,187.55

Bank:
5,250.50
Posts: 21063
Joined: Sat Feb 14, 2009 11:44 pm
Group: Sysop
Post Re: HTML5 game development
Does the speed slowly increase or does the player have to enter a factor? Also, that looks pretty old school - aka awesome.

_________________
Image
Yeap.

_________________
Click the icon to see the image in fullscreen mode  
1 pcs.
Click the icon to see the image in fullscreen mode  
4 pcs.


Mon Dec 03, 2018 12:34 am
Profile E-mail WWW
Level 0
Level 0
User avatar

Cash on hand:
3,119.50
Posts: 37
Joined: Sat Dec 01, 2018 11:05 am
Location: A place of darkness and trickery
Group: Registered users
Post Re: HTML5 game development
It's a control field that the user enters a number into to control the speed. IIRC, the number entered is the multiplicative inverse (multiplied by a constant so it can be an integer) of the new value passed to the window.setTimeout() function that controls the animation of the square. I actually had a problem where entering new values would cause the game to speed up continuously until it was completely out of control; I realized that it was because I was starting a new sequence of setTimeout calls without removing the old one, so the calls were just accumulating. I fixed it, though had to ask for a solution on /g/ IIRC (that's the tech board on 4Chan which I now use for coding discussion/questions since CodeCall is basically dead and Stack Overflow is an overall shit board overrun by Python-coding normies).

_________________
Life is a tragedy for those who feel and a comedy for those who think.
-- Horace Walpole


My coding projects can be found here: https://pastebin.com/u/AnonymousNamefag
I welcome critiques, since Pastebin doesn't seem to have a feedback mechanism.


Mon Dec 03, 2018 8:17 am
Profile E-mail WWW
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 
 

Similar topics

 
i remember playing this game as a kid
Forum: ./General Spam
Author: cluelessfurball
Replies: 7
I spent 2 hours playing that damned COC game.
Forum: ./General Spam
Author: AirMan
Replies: 127
Man. . .the greatest of all game
Forum: ./General Spam
Author: SexyLilSeaOtter
Replies: 5
Game Script. -Free Will-
Forum: ./Video Games
Author: Ume
Replies: 4
Top


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Mods Database :: Imprint :: Crawler Feeds :: Reset blocks
Designed by STSoftware for PTF.

Portal XL 5.0 ~ Premod 0.3 phpBB SEO