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

Cash on hand:
1,581.50
Posts: 20
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 38
Level 38
User avatar

Cash on hand:
14,445.40

Bank:
0.00
Posts: 20731
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.


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

Cash on hand:
1,581.50
Posts: 20
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

 
Forkheads TCG Trading Card Game
Forum: Dev Forum
Author: joshex
Replies: 6
Short flash game contest!
Forum: ./General No Spam
Author: YomToxic
Replies: 7
Brazil Slum, my funny game
Forum: Dev Forum
Author: Len
Replies: 0
The greatest game of For-ki-oh ever played.
Forum: ./General Spam
Author: YomToxic
Replies: 8
Game Uploaded
Forum: ./General Spam
Author: Clockwork47
Replies: 6
Top


Who is online

Users browsing this forum: No registered users and 3 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