Jump to content

  • Log In with Google      Sign In   
  • Create Account

Good platform for mostly-text-driven browser games?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
8 replies to this topic

#1 SeraphLance   Members   -  Reputation: 1393

Like
1Likes
Like

Posted 26 April 2014 - 11:23 PM

As a bit of background, I've been programming in various languages for years and years, but I've pretty much stayed completely out of the browser space since HTML 3 in high school, and out of the web space except for some Java Web Services at my last job.  I know HTML 5 is all the rage, but with my antiquated experience I can't really understand why, since to my knowledge it's just a presentation language.

 

I want to make a menu/text-driven RPG, nothing fancy like WebGL or the like, and the browser space seems like a good way to do it since these requirements pretty much scream HTML.  What's a good, flexible engine and/or environment for developing these sorts of things?  Not knowing anything about this stuff, I've been looking into frameworks like Django (because I like python, and absolutely despise JavaScript).  However, that doesn't really seem to be the right direction.

So yeah, uh... Anyone have any tech suggestions or at least can lead me in the right direction?



Sponsor:

#2 Shippou   Members   -  Reputation: 1524

Like
0Likes
Like

Posted 27 April 2014 - 06:46 AM

JavaScript is what makes "HTML5" so flexible.

 

 As far as text game engines, you may want to build your own, since all frame works I know of focus on 2d and 3d environments, and contain a lot of "fluff" that is unnecessary in "1D" games.

  THIS GOOGLE SEARCH may help you on your way.


 Reactions To Technologies:
1. Anything that is in the world when you’re born is normal and ordinary and is just a natural part of the way the world works.
2. Anything that's invented between when you’re fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it.
3. Anything invented after you're thirty-five is against the natural order of things.

- Douglas Adams 2002


 


#3 Hollower   Members   -  Reputation: 672

Like
0Likes
Like

Posted 27 April 2014 - 02:13 PM

If the game is entirely client-side Pyjs is probably sufficient for your needs. It is a Python-to-Javascript compiler and widget framework.

A simple database connection for saving games/stats online shouldn't be too hard, but anything more complex like multiplayer interaction you will certainly want a full server-side framework like Django.

   


Edited by Hollower, 27 April 2014 - 02:14 PM.


#4 SeraphLance   Members   -  Reputation: 1393

Like
0Likes
Like

Posted 27 April 2014 - 11:50 PM

If the game is entirely client-side Pyjs is probably sufficient for your needs. It is a Python-to-Javascript compiler and widget framework.

A simple database connection for saving games/stats online shouldn't be too hard, but anything more complex like multiplayer interaction you will certainly want a full server-side framework like Django.

   

 

I know this is somewhat of a faux pas, but I don't really know what I want to make in terms of game design.  Would converting from a multiplayer to a single player game be reasonable on something with one of those kinds of Web Frameworks, or are you basically all-in?



#5 Brian Sandberg   Members   -  Reputation: 1329

Like
0Likes
Like

Posted 28 April 2014 - 07:01 AM

What features of your game do you expect to be handled by a framework?  (What I'm getting at is, do you really need one?)

 

Why do you despise Javascript?  There's a beautiful language hidden inside it, and if you want to do anything in a browser, while avoiding JS, you're going to have a problem. Do you know any of the of the Javascript-flavored languages that compile into Javascript?  Dart and Coffeescript would be the best examples of those.



#6 Karsten_   Members   -  Reputation: 1603

Like
0Likes
Like

Posted 28 April 2014 - 07:26 AM

If it is mostly text driven, can you get away with the occasional post or perhaps AJAX? If that is the case then I recommend the following (you have probably already considered PHP).

  • PHP - Personally not a fan, but it is the common language of the web so there is loads of reusable code
  • Wt - Allows you to write your software in C++ and it provides the rest of the web systems required to run the page (kinda similar to how ASP.NET works) www.webtoolkit.eu

If you would like the game to be more dynamic then running it on the player's web browser is the only choice. For this you will ultimately need to use Javascript but you will not necessarily need to code directly in Javascript.

  • Javascript - If done correctly (none of that JQuery stuff), can be kept clean and succinct. If you structure it in  a very "C" like way (procedural with "structs") then it is actually suprisingly pleasant to use.
  • C++ with Emscripten - This open-source Mozilla sponsored technology is awesome. You can write your code in standard C or C++ (with useful libraries such as SDL, libGL, libPng etc..) and the compiler converts your code to Javascript ready for a browser.

Of course a few other choices include browser "plugins" such as the Flash plugin or Unity plugin. These are dying technologies but might tide you over until Flash migrates entirely to running in Javascript and Unity migrates entirely to running in Javascript (also via Emscripten).


Edited by Karsten_, 28 April 2014 - 07:43 AM.

Mutiny - Open-source C++ Unity re-implementation.
Defile of Eden 2 - FreeBSD and OpenBSD binaries of our latest game.


#7 SeraphLance   Members   -  Reputation: 1393

Like
0Likes
Like

Posted 28 April 2014 - 10:01 AM


What features of your game do you expect to be handled by a framework?  (What I'm getting at is, do you really need one?)

 

Well, that's the clincher -- I don't know if/when I do.

 

I don't really have a direct vision of what I want to make, but rather a big jumble of ideas.  I'm after a sort of toybox I can mess around in.  That goes anywhere from SP to MP, and I asked that in response to Hollower who said for MP I'd need a framework of some sort.  I don't want to be completely committed to a specific scale.  I'm pretty much a total novice to this space, so sorry if my questions look stupid.

 


Why do you despise Javascript?  There's a beautiful language hidden inside it, and if you want to do anything in a browser, while avoiding JS, you're going to have a problem. Do you know any of the of the Javascript-flavored languages that compile into Javascript?  Dart and Coffeescript would be the best examples of those.

 

From what JS experience I've had (not THAT much, mind you), the language just seems overly verbose.  It's hard to read code when everything looks like "document.getelementById(someId).addEventListener('click', foo, false);"  It's possible that there's a magical world that opens up when I have more experience, but that's the sort of code I typically had to write when I used javascript, and it's a bit headache inducing.  Like you said though, it seems like I'll either have to just get over it or check out one of the code generation things, of which there's a boatload at least.

 


If it is mostly text driven, can you get away with the occasional post or perhaps AJAX? If that is the case then I recommend the following (you have probably already considered PHP).
PHP - Personally not a fan, but it is the common language of the web so there is loads of reusable code
Wt - Allows you to write your software in C++ and it provides the rest of the web systems required to run the page (kinda similar to how ASP.NET works) www.webtoolkit.eu

 

Yeah, thanks for the advice, I think I want something slightly more dynamic than that.  Even if it is just text and tables, things like animations for the menu would be nice.

 

 

Seems to me like I should just start writing something in JS or some alternative and try to leave some room to "scale up" to a server-side complement if need be.  It's going to be a bit weird trying to do that when I don't know what I'm doing, but "meh".  It's not like I can sit around not doing anything at all either.  Thanks for the advice, guys.



#8 Hollower   Members   -  Reputation: 672

Like
0Likes
Like

Posted 28 April 2014 - 02:21 PM

I don't really have a direct vision of what I want to make, but rather a big jumble of ideas. I'm after a sort of toybox I can mess around in. That goes anywhere from SP to MP, and I asked that in response to Hollower who said for MP I'd need a framework of some sort. I don't want to be completely committed to a specific scale. I'm pretty much a total novice to this space, so sorry if my questions look stupid.

 

I worded that clumsily. I didn't mean to make it sound like you must choose one or the other. You will have client and server code anyway but there are, basically, two ways you can serve a web based game.

  • Browser connects to a web page and downloads all of the game in the form of html, css, js, etc. and then the player plays the game in his browser but "offline" with no further communication with the server. This is fairly straightforward and the web server can be simple since all it is doing is serving the requested files. The player can also "cheat" if they want since they have all the game logic code.

 

  • Browser connects to a web page and downloads a client (also html, css, js, etc.) which just contains code for displaying the game and communicating with the server. As the player interacts with the client-side page it sends commands to and receives updates from the server. This keeps the game logic on the server, makes cheating difficult, and potentially allows multiple players to interact with each other at the same time. The reason I recommend using a more mature framework in this case is so you can focus on the game rather than writing both a game and a web server.

It is possible to write client with Pyjs and server with a Python web framework. This page shows examples how to do AJAX communication between the two. Ultimately, theres a bazillion different ways to do it in a multitude of languages. Obviously, standard advice: start small and play around with simplistic samples before diving into writing a bunch of code you don't know how to connect together.



#9 Shippou   Members   -  Reputation: 1524

Like
0Likes
Like

Posted 28 April 2014 - 05:14 PM

 

 

Seems to me like I should just start writing something in JS or some alternative and try to leave some room to "scale up" to a server-side complement if need be.  It's going to be a bit weird trying to do that when I don't know what I'm doing, but "meh".  It's not like I can sit around not doing anything at all either.  Thanks for the advice, guys.

 

.

 It is always a good idea to get some ideas down on paper, iron out what you want, and than start to code.

 Attempting to go into a project with no clear goal in mind can lead to headaches down the road, especially when attempting to retrofit new code blocks .


 Reactions To Technologies:
1. Anything that is in the world when you’re born is normal and ordinary and is just a natural part of the way the world works.
2. Anything that's invented between when you’re fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it.
3. Anything invented after you're thirty-five is against the natural order of things.

- Douglas Adams 2002


 





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS