• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0

Needing to get started with HTML5/CSS3/JS!

6 posts in this topic

Well hello there! Man it's been a while since I last visited this forums..

Anyway, I know my way around proggramming turn based games with multiplayer on C and C#, but I want to tackle the web monster this holyday season. My goal is to have a working simple (even if not quite finished) turn based tiled "strategy" game by mid january, wich looking at my schedule seems quite doable.

Problem: I only know the basics of HTML and CSS (and fortunately that includes several "good practices" that have not been deprecated in the definitions of HTML5 and CSS3) and NONE JavaScript. Also the simplest of PHP, but I've done nothing more than a "Hello World!" for now.

As for graphics, good ol' colored ASCII characters will do just fine, so you could say I'm aiming at "2D" at the moment [img]http://public.gamedev.net//public/style_emoticons/default/laugh.png[/img] (actually it'd be neat if the game would eventually turn into a "full fledged" roguelike, but for now let's assume I'm not being hardcore, I'm just lazy about graphis).

Now, our dear uncle Google has shown me the existence of several interesting topics of discusion (i.e.: the state of html5 implementation, canvas, webgl, css transitions..), as well as the existance of several SDK/frameworks, some of wich are even free and open. But I'd prefer to work purely with code, Notepad++ is a good friend of mine, althought I won't complain if you know any good (free) IDE or other editor better suited for the job.

So.. Any advice as to where to start? Have books on html5 game development been written yet? I tried to look at Mozilla's BrowserQuest code on git but that was of course a bit too complex for me [img]http://public.gamedev.net//public/style_emoticons/default/tongue.png[/img]

Big thanks! [img]http://public.gamedev.net//public/style_emoticons/default/biggrin.png[/img] Edited by ZippoLag

Share this post

Link to post
Share on other sites
Here are some videos that are a good crash course in JavaScript: [url="http://www.newthinktank.com/videos/web-programming/javascript/"]http://www.newthinktank.com/videos/web-programming/javascript/[/url]
He also has some of HTML/CSS as well.

And this should get you going with HTML5 using Cocos2D: [url="http://www.gamefromscratch.com/page/Cocos2D-HTML-5-Tutorial-Series-table-of-contents.aspx"]http://www.gamefromscratch.com/page/Cocos2D-HTML-5-Tutorial-Series-table-of-contents.aspx[/url]

Share this post

Link to post
Share on other sites
First off, thanks to you both for the quick replies! [img]http://public.gamedev.net//public/style_emoticons/default/biggrin.png[/img]

Second, indeed, I'm not trying to re-invent the wheel, but merely to implement already proven successfull patterns by myself while also using what I already know. But I have no clue how to implement the game loop in web technologies D:

As I said, I know only very little about web coding, so I'm applying a learning strategy I've found to be effective in the past: implementing a small project as means of gaining extra motivation to learn a new language. That's one of the two reasons I want to stay as away as I can from plugins, frameworks, SDKs and libraries unless they are the current de facto standard and there's no easy way to do whatever I'd want to without them, specially since the technologies are still so young and changing. Also I don't have a budget, this'll be strictly a hobbyst/educational project for myself.

One extra concern I have, of course, is what I should develop the server side mechanics with. Since I could host anything on my PC, but I don't want to leave it running and with open ports just like that all the time, but if I actually end up coding something "pretty" I'd like to leave it playable on the web. That's an extra reason why I'm not using C#/ASP.Net: I know of NO free hosting sites for such technologies, while I've been using some (pretty) decent hosts for PHP and I know of a few really cheap local companies to host PHP sites, altought I only know very little PHP and I don't know if I would be better off learning some other language for (multiplayer/interactive) server side.

A rough schedule for the weeks to come sound like this in my head:

1. Plan thru and define what technology to use.
2. Learn the basics!
3. Experiment!
4. If failure, go back to step 1.
5. Implement simplest version of the game mechanics.
6. Implement "full" single player mechanics, with dumbest/simplest of AI.
7. Add multiplayer capabilities. (this is the point I'd like to arrive at mid January 2013)
8. Polish game mechanics!
9. Implement real AI. (probably not gonna happen until June 2013)
10. See what lies beyond! (probably fiddling with mobile and geolocation)

The mechanics for the game would be fairly simple, as I said, there's no point in describing them beyond the concept of a tile-based, turn-based, single-unit-under-your-command "combat/strategy" game.

[quote name='shadowisadog' timestamp='1354598652' post='5006973']If your goal is to create a game than I strongly advise not to try to reinvent the wheel and to use some existing framework/library/tool as the basis for your game. If you want to start "from scratch" then something like: [url="http://rhuno.com/flashblog/2012/08/01/tutorial-puzzle-game-basics-with-html5-and-javascript/"]http://rhuno.com/fla...and-javascript/[/url] may be a good starting point.

Good luck.[/quote]

I'll check that out, and thanks!

[quote name='BMO' timestamp='1354601410' post='5006981']
Here are some videos that are a good crash course in JavaScript: [url="http://www.newthinktank.com/videos/web-programming/javascript/"]http://www.newthinkt...ing/javascript/[/url]
He also has some of HTML/CSS as well.[/quote]

Thanks! I'll watch it as soon as I can clear up half an hour in my schedule [img]http://public.gamedev.net//public/style_emoticons/default/biggrin.png[/img]

PS: I've been checking out the following sites, also, just in case someone ever finds this thread by searching ;)
[url="http://www.html5gamedevs.com/"]http://www.html5gamedevs.com/[/url] (seems to be dead at the moment)
[url="http://www.html5gamedevelopment.org"]http://www.html5gamedevelopment.org[/url] Edited by ZippoLag

Share this post

Link to post
Share on other sites
Unfortunately I can't help you on where to start, since I know just as much about this as you(I've done a few websites but nothing fancy). What I can do, however, is suggest a nice editor. I used Sublime and I love it. I haven't really used it to its fullest extent, but I really love the layout and the way the editor works.

I have used Notepad++, but I can't really recall why I switched to sublime. I'm not much of use here, but if you try sublime and finds that it makes it easier for you in any way then this post is relevant so I decided to post it.

Good luck with your game, I'd love to see the result!

Share this post

Link to post
Share on other sites
If you go the library route, there [url="http://www.gamefromscratch.com/page/Links-of-interest-for-HTML5-game-developers.aspx"]are a ton available[/url]. I have recently been working with EaselJS, and other than a few annoyances, its a nice, straight forward and clean library to work with, that doesn't do all the much more than what it needs to, which is nice.

As to coding a game loop in HTML5, that's pretty simple. In an older browser, you used the [url="http://www.w3schools.com/jsref/met_win_settimeout.asp"]setTimeout[/url]JavaScript function, which you pass the time in milliseconds to wait between calling the game loop function ( for example, 1000/60 for 60 FPS ), as well as the game loop function itself. In more modern browsers, people use [url="https://developer.mozilla.org/en-US/docs/DOM/window.requestAnimationFrame"]requestAnimationFrame[/url], which works almost identically. Most game libraries use the later, then detect the abilities of the browser and fallback to setTimeout if requestAnimationFrame isnt available.

Over in the [url="http://www.gamedev.net/topic/635180-simple-game-math-tutorials/"]game programming forum[/url] I posted a math tutorial series, but each example includes a complete application written using JavaScript and EaselJS. It's probably not the best place to start, but does give you an idea of what code looks like, implements an example simple game loop and gives you half a dozen working examples to start with. I would recommend starting with a library like EaselJS, Cocos2D, etc... to get started, then roll your own later if you want to get more into the nitty gritty.

Oh, and check out WebStorm, its an amazingly awesome ide. Edited by Serapth

Share this post

Link to post
Share on other sites

Hi and thanks for the replies!


I actually read them right when you posted them all, but didn't have the time to reply at the moment.


Just to keep you guys posted (and to inform anyone who is in my same path) I've found those JS videos quite interesting, but the bulk of my learning's now been done in codecademy.com just like the MDN site suggests (https://developer.mozilla.org/en-US/learn/javascript).


I've also been lurking around reading about SVG, since it seems like a nice technology to implement other game idea I have (starting with an Asteroids clone). Sadly I've found none really good sources for this, the MDN site has some tutorials but they are incomplete..


I'm still going with the plugin-less approach!


PS: to anyone struggling and hesistating to learn JS thinking "its a really horrible language! why do we even have to use this?" I highly reccomend watching Douglas Crockford's "JavaScript: the good parts" lectures on youtube, they really changed my perspective regarding this language.

Edited by ZippoLag

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
Sign in to follow this  
Followers 0