Jump to content
MakeWebGames

Recommended Posts

Posted

As most of you should have notice, lately I was busy with the NWE project. But it's time for me to have again some fun for myself.

I thought about what I could start and ideally use myself NWE for something such that I would see NWE as game developer and not only as engine developer. Yet I want to have some fun so want to make something completely differently from what we usually see on MWG.

By itself the concept is not unique nor new. Let me explain what I want to try to do (not given I will finish it or if it will really work well):

- The game is basically a war bot game

- You can code your own bot (with a scripting language not all that different from JS)

- You can trade logic or bots (for those which do not manage to code their bot for example)

- Fight inside arenas or do special missions like for example harvest planet X or whatever.

So how does it different from the many coding bot frameworks or games? Well you will code and debug your bot directly from your browser, try your bot, and then the arena or mission will be run both on your browser and on the server (to check if you really won it or not).

Combats will be for the player in real time, yet if you leave your bot in the arena, others will fight your bot at their speed / time.

If you win, you will win game money, which will let you upgrade your bot(s) and progress inside the game.

So... let's see if I can make the scripting language work as I wanted, if that pass I'm pretty sure I will succeed in the adventure.

If some of you is interested in this adventure let me know, I'm open to any really interested co-author.

Posted

Got the first prototype running:

http://temp.nowhere-else.org/botacus/test.html

So what do you see? Basically imagine the left side red little square is your bot, on the right side you see the code for it. Currently the code is as stupid as it can, but the parser and the language are pretty much there (I must clean up a couple of things and make sure all the parts works as they should still). You can basically then set the code, and run it. If you retry, please press the stop button and then run again (otherwise it currently do not work).

Sure, the thing is... as lame as possible, and you may wonder why did I took all that time and effort to have a moving square on the screen. The trick here is that there is like a virtual machine running the code, it's not simply JS, but a similar looking language which is implemented in JS. The same language will be implemented in PHP to run the tests on the server to confirm the winners. Yet on the browser side you will be able to see in real time how things go, and I was thinking even to show the current executed line as well as the local / global variables.

The difficult part was to change my parser and execution tree to be able to execute instructions per instructions to implement the run of multiple bots at the same time, to update the interface and do not block the browser. I would have somehow loved to use web workers or others, however IE9 do not support them, and therefore somehow kill the option for me.

  • 1 month later...
Posted

A little update, you now see a "map", a bot, and its gun, while running the script you see the bot moving around and rotating the gun. It was mainly to test how well it would work with the art, if CSS sprites would be enough, and if it would work well. I will check if CSS rotations may be used or not to make yet even smoother rotations as currently there is only 36 positions which means an angle of 10deg.

Anyhow you can already play a bit with the script, make different paths, and see how the thing starts to work:

http://temp.nowhere-else.org/botacus/test.html

  • 2 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...