Add a variant in chess.js ex: Bughouse variant - chess

I am using chess.js for developing a Chess game for the browser. All works well with default settings. Now I want to introduce a few chess variants like Bughoust or crazyhouse. Is it possible to add a variant to chess.js? If this is not possible, is any other framework/library to achieve this in browser-based chess games?
Thanks in advance

Related

Why Neto/Shopify use their own templating language?

Why Neto/Shopify use their own templating language instead using any popular popular language ?
When you have your own templating language you have full freedom to implement or limit the logic of the language to meet your needs.
You don't need to wait for a third party update in order to implement new stuff or objects.
Why do you think Samsung creates clones of google apps on their phones? To create an experience that they can control in some way and if they like to change or add something to do so and not to wait for google to do so. ( and some other things but that is outside the scope of this question )
Since liquid was a Tobias Lütke creation ( co-founder and CEO at Shopify ) and now is an Open Source project it was written in specific fashion in order to meet specific needs and those needs seems to be fitting for Shopify and other platforms as well.
Being popular doesn't mean being better! This is the wrong way to go.
WordPress is the most popular platform, but is it the best one - NO! There are a lot of hole provided by plugins, poorly written themes and some times core issues. While it's easy to use and extendable it opens a lot of doors for issues if you don't manage it properly.
Beats by Dre is the most popular headphones and quite expensive, does they sound as good as the price tag put on them - NO! You can buy the same quality headphones ( even better ) for less, but you are paying for the brand.
Creating new languages in the coding world is ALWAYS a good thing It might be a chore to learn it if it becomes a standard but that means that it provided something that the other popular languages didn't and this pushes the coding world forward. It's a much better alternative than to be in a standstill like when we had only jQuery and there were no new stuffs to excite the developers.
Now we have so much different things that you can choose the direction you like to go and you won't be able to learn all of them even if you try, which is a great thing to a developer who likes to grow.
Conclusion:
Being different is OK as long as that fits your needs and you are not doing it just because it's popular to be different. ( so true IRL now too :D )
This reasoning from their Github Wiki lists some of the reasons. Why Liquid Templating Engine ?
Liquid is a template engine which was crafted for very specific
requirements
It has to have simple markup and beautiful results. Template engines which don't produce good looking results are no fun to use.
It needs to be non-evaling and secure. Liquid templates are made so that users can edit them. You don't want your server running code
that your users wrote.
It has to be stateless. The compile and render steps have to be separate, so that the expensive parsing and compiling can be done
once; later on, you can just render it by passing in a hash with local
variables and objects.
It needs to be able to style emails as well as HTML.

What gamekit/engine should I use for 2d simple game in ios?

I'm thinking in doing my first ios game, I am new in ios programming and I need your advice.
The game will be very simple and 2d, imagine something like a card games.
My doubt is if i should use UIKit, spritekit, cocos2d... What is the recommended for 2d simple games with few animations?
Thanks you :)
i would recommend cocos2d, since it is widely used by many developers and can also be used for serious game development, so when you feel that you've picked it up and gotten familiar with the api, it will be something that you can continue using after the first one is released.
http://www.cocos2d-iphone.org/games/
As you can see, many successful games and it has a nice collection of features build it, so that is always handy even tho' in your first title and development training program you would also like to get as close as possible to basics which is the best way of learning, it will also allow you this.
I would not even consider UIKit as THE platform to approach at all.
as for spritekit, that could go ether way, i wouldnt use it, but it is not useless if you know what i mean.
As per your requirement, i would really suggest you CORONA SDK. Specially for simple and 2D game development. It's very fast and easy to understand and you can create game faster then cocos2d and objective-c development. Also it's support cross platform.
http://coronalabs.com/
With Corona, you will develop mobile apps in record time.

Simple animation puzzle game development

I want to develop a simple "guess next frame" game. Basically, the game will show a picture of a stock chart with the right side of chart hidden (the future price). When player ready, he will guess price up or down, and next hidden part of future price is revealed. If correct, he gets points... something like that. Simple game.
Is there any existing game code and framework that I can use to develop this? I am totally new in game development.
I suspect there is game engine or framework available to make this type of game easy and fast.
Would be best if it can run on mobile phones OS and PC
Can anyone suggest ? Thanks
Simple javascript game should do the trick. There is just some small logic involved which isnt too complicated. If you want to overdo it, you'd probably use a mvc framework. You could probably though just do a simple jQuery/HTML mixture with a small server backend for the charts that you will be presenting.

GameSalad like tools for PC

Anyone knows of a tool like GameSalad for PC in which you don't have to write scripts or anything but just use the existing behaviors and events to create custom game logic?
Thanks
If you are looking for a cross platform game constructor you might want to try Flowlab, which runs in a web browser.
Construct from Scirra is a free, open-source, drag and drop, game engine. There is however talk of them making a paid version of Construct in the future.
I've only used Construct once, so I don't know that much about it, but i do know a lot about GameMaker.
As long as your not trying to do something complicated like a 3D or MMO game, (both of which GameMaker supports, but with major limitarions) I would recommend you use it, especially if your just starting out. GameMaker is one of the easiest if not the easiest programming language to learn. It also teaches good programming skills. As I mentioned before GameMaker uses drag and drop so you can easily transition from the D&D to the progeamming aspect of GameMaker.
As mentioned in the above posts RPG Maker is another popular tool , but it's limited to RPG games, and doesn't allow you to easily transition to an actual programming language. It's also very restrictive in what you can do.
When you feel like getting into some more advanced gaming engines, Blender is a great tool to use for creating 3D games. It can also be used to create 3D modules and has the ability to create animated movies.
I've never used PyGames before, but Python is a easy language to learn, and would probably be the best way to transition from a D&D program to a programming language.
*GameMaker can be extended in functionality with DLLs and Blender can be extended with Python.
So to summarize, GameMaker is a great tool for creating Games. RPG Maker and Construct are other possibilities, but from my view there not as good as GameMaker. when your ready to get out of Drag&Drop gaming engines Blender, PyGames, and GML(Game Maker Language - the advanced part of the GameMaker product) are all great resources.
PlayBits has an interface similar to GameSalad and makes games for Windows Phone 7, using your PC. Here's the link: http://www.playbits.com/?page_id=171
RPG maker here you can find it is a light weight game engine but if you are clever you can make really good apps
In terms of game development for iOS and Mobile development using the Windows platforms you might want to have a look at these two:
http://www.giderosmobile.com
and
http://www.stencyl.com/
Although I haven't, yet, used the Gideros solution, it's targeted specifically for Mobile platform development and has what looks to be a tidy UI with code folding and syntax coloring if you're comfortable with a traditional coding approach.
Stencyl is an interesting product, it sits beyond the capabilities of Gamesalad and uses a blocks metaphor for programming which works well.
Personally, I wouldn't use any tool that has a single platform for output, which is why I stopped using Gamemaker (I'm aware it now has a Macintosh client, but the quality of the application has been terrible and their player isn't much good either.)
If you're looking for GameSalad for Windows you might want to check out our HTML5 game engine Construct 2 which functions in a similar way.
It's also got an event based system with no programming required, and there's an extensive free edition available for you to try out as well.
You can use Yoyo Game's GameMaker:Studio also.
GameMaker is one such tool.
There is also The 3d Gamemaker, by the same people who make other rapid-game-development tools like DarkBasic.

How do I hook into a game and write a script to manipulate it?

I know this is a pretty open question but I was wondering how people go about writing scripts that will "play" a game, or manipulate it in some way. I had been thinking that I'd try to get a working AI to play a game for fun, but don't even really know where to start. Are there any good resources to learn this? What are good languages to use? Once I have the language, how do I get my script hooked into the game? I was thinking of just trying simple flash games, if that helps.
Thanks a bunch!
Are you looking to "play" an existing game, or write some sort of a game that can then be scripted?
If the former, you find that game's API and start writing code in the appropriate language. E.g. Unreal-powered games use UnrealScript and ship with the tools so you can embed new functionality. You're pretty much dependent on the game creators leaving an "in" such as this...
...unless you want to get totally nutty and hack the executable itself to execute your own code somehow. For information on how to do this, search for information on game "trainers". I'm not sure what a great set of search terms would be, but I know a lot of games do have trainers released, so type in "trainer <my_favorite_game>" and see what you get?
You can do this quite simply in Java 6.
expose your objects/functions in your Java app into the scripting environment
For example you can expose your character or the game world into the scripting environment and allow the script to control it.
invoke script functions/methods from Java environment
Allow the script to customize behaviours, add new actions, etc. Another use of this is to override the default build in game rules and load your own house rules. Another use is as a macro facility. Typically this would be part of the main game loop
use the script as a data/level file
For example, in a game likes SpaceHulk where it is mission based, you can use a script to define a game specific DSL, and us this DSL to define new missions. When the game starts up, it evaluates the data file and create a model of the game.
To integrate a scripting engine into Java, simply do this
ScriptEngineManager mgr = new ScriptEngineManager();
ScriptEngine jsEngine = mgr.getEngineByExtension("js");
jsEngine.eval("print('Hello world!');
To expose an object into the script environment
jsEngine.put("avatar", avatarObject);
//An avatar object is now available in myscript.js
jsEngine.eval(new FileReader("myscript.js");
To invoke a function in the script
jsEngine.eval("function hello(name) ... ");
Invocable inv = (Invocable)jsEngine;
inv.invokeFunction("hello", "Fred");
One of the problem with scripting is that, the script has access to your entire application. You can restrict what the script can 'see' by setting a classloader when you create the ScriptEngineManager instance.
Java 6 comes with a bundled JavaScript engine. However I prefer Groovy and loading Groovy basically mean changing 'js' in getEngineByExtension() to 'groovy'.
I know that a lot of people say that Java is not fast for games, but if you are writing turn based games or social games like Farmville then I think it is more than adequate.
For C/C++ based games, I think the preferred script engine is Lua. I've not used it so I cannot comment on it.
The best way to do that is to use the API provided by the game, if there is one. The Civilization games, for example, come with a very complete modding engine that allows you to script whatever you want. The same can be said for Age of Empires and a variety of other games.
Simple flash games, though? That'll be tough. Those don't generally provide any supported way to script, so you'll be left with simulating input. It'll be tough.
The easy way is to control mouse and keyboard functions with autoit. You can also read out information from your screen, but it is a bit limited It is good to just check if things changed or check whats on a certain area of the screen if you know there are a limited amount of possibilities. Not so easy to read and interpret text. Autoit is excelent to automate games like farmvile. I have also made blackjack bots for online casinos. And use it for small but mundane and repeating (manufacturing) tasks in RPGs. Dont expect to build an AI for an RTS or FPS though.
Autoit is easy to find with google. A fast and small download. Excelent documentation and you can learn it in days.
The hard way is what people wrote about above here i guess. Interacting with the game data. Searching information on that is what brought me here. I see its with C++ or Java. While the languages are all similar and you can use them all after learning 1, these come with complicated software environments that take lots of time to learn. The possibilities and chances to make something really reliable are much much greater though.