Author Topic: SVN Source  (Read 4117 times)

Offline Cyberduke

  • Bot Builder
  • **
  • Posts: 88
    • View Profile
SVN Source
« on: September 29, 2008, 04:50:07 AM »
Is the code in SVN (Revision 22) up-to-date?
What is the plan for modularizing the different components?

How about a (and I use the term loosely) plug-in architecture,
Create a physics interface and a visualisation interface etc.

So you can just build each module in isolation working to an interface. Then at run-time, load in the relevant assemblies whereby you could swap between different implementations on a whim.

Note: This would also allow for self-patching, your boot module can check the versions of the assemblies download and patch them before loading and running them. (If it found an update for itself it would have to restart itself then start over)

The simulation module would implement an interface which exposes enough information such that any GUI implementation can be passed a reference to the simulation and draw the current state of the simulation (in any style it wishes), retrieve basic global stats and data for graphs etc, the job of interpreting and expressing the data in some useful form would be down to the GUI implementation. That way we could just build a very quick and dirty GDI+ display for testing that would suffice for now.
The simulation itself would have a reference to an object implementing the physics library interface.
(Obviously existing physics libraries would need an adapter to adhere to our interface) If you did want to build your own then it can implement that interface directly.

I think this is basically what you had in mind, but I couldn’t find anything laying things out in detail.

Also this way you *could* more easily run everything in its own thread thus totally separating the running of the simulation and the rendering of the simulation’s state, this also means that your graphics card’s performance does not cap your ‘cycles per second’ potential, you could be running your simulation at 50cps and rendering it at 30fps, obviously it just means that it would skip drawing some cycles. And conversely simulating at 5cps and still render at 30fps repeating the drawing of some cycles (but would appear much smoother to the user if you were also rendering superfluous data like information about the cell the cursor was over for example)
« Last Edit: September 29, 2008, 04:57:18 AM by Cyberduke »

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
SVN Source
« Reply #1 on: September 29, 2008, 05:28:29 AM »
It's not up to date.  I've done some work on it since that lives in a new repository (moving around lots of files and setting up various folders).  I'll get the wiki up to date Monday hopefully.

Yeah, my present thinking involves interfaces like that.  I haven't written it up anywhere.

There was an abortive C++ version I worked on a few years ago that worked like that: the graphics thread ran at some fixed FPS, and the core engine thread ran as fast as it could.

Offline Cyberduke

  • Bot Builder
  • **
  • Posts: 88
    • View Profile
SVN Source
« Reply #2 on: September 29, 2008, 07:34:47 AM »
I have just been reading about minerals and 'flavoured' smells, bots using the shells from corpses, etc
Will the new wiki updates contain a list the currently agreed features?
Or is it all still very much ‘up in the air’?

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
SVN Source
« Reply #3 on: September 30, 2008, 01:55:09 PM »
Everything's still pretty much up in the air.  I have some feature goals I enumerate, look here and here(at the end, under long standing feature requests and feature list for 3.0).

The what-I-have-at-the-moment code can be peeked at here.  At the moment I'm stuck trying to learn XSLT to transform NUnit's console output into something readable.

Hopefully I'll update some wiki pages when I have a free second, but truthfully I'm pretty exhausted so things outside of work, food, and sleep aren't high priority
« Last Edit: September 30, 2008, 01:56:25 PM by Numsgil »

Offline Cyberduke

  • Bot Builder
  • **
  • Posts: 88
    • View Profile
SVN Source
« Reply #4 on: October 06, 2008, 04:09:36 AM »
Well, for now until I get better acquainted with the project and while you’re still mulling over some of the fundamentals, I’ll work on some of the more generalised aspects of networking the project, and have a play with creating an GUI that can auto patch, load in other modules and connect to the network, browse a bestiary etc.

I think we will have to create two lightweight GUI  ‘clients’ one for windows and one for the X-box due to the differing requirements of the UI and features we could actually use, including differing approaches to networking, aka X-box Live (unless you’re a large company and can get on MS’s good side), everything behind these lightweight UI’s  would remain the same. For now we would just work on the Windows client and forget about the X-box, when we have something up and running, we can think about how an X-box version would work. Just keep everything in managed code.

I am still debating whether or not to create a custom XNA GUI or use ‘winforms’ with a handle for XNA, unfortunately doing so actually requires scraping a part of the XNA code base (the ’Game’ class) and requires you to write your own Graphics Device implementation.
Of course if you ever wanted to get this running on an X-box in any shape or form you have no choice but to write your own basic GUI anyway (There are number of GUI libraries out there though).

And on the subject of GUI’s I thought It would be cool to have separate mini environments with their own settings accessible from the main UI you could use as ‘holding cells’ So when you feel like playing god in a evo sim you can drag and drop some bots in to a ‘refugium’ to feed them up or get them to mate, or a ‘ring’ to have one-on-one fights.  
« Last Edit: October 06, 2008, 04:42:24 AM by Cyberduke »

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
SVN Source
« Reply #5 on: October 06, 2008, 03:08:24 PM »
Quote from: Cyberduke
I think we will have to create two lightweight GUI  ‘clients’ one for windows and one for the X-box due to the differing requirements of the UI and features we could actually use, including differing approaches to networking, aka X-box Live (unless you’re a large company and can get on MS’s good side), everything behind these lightweight UI’s  would remain the same. For now we would just work on the Windows client and forget about the X-box, when we have something up and running, we can think about how an X-box version would work. Just keep everything in managed code.

XBox live is the only way to network once your on the xbox, right?  Last I heard XBox live had all kinds of limitations with XNA while they sorted out what sort of quality control they wanted to have.

Quote
I am still debating whether or not to create a custom XNA GUI or use ‘winforms’ with a handle for XNA, unfortunately doing so actually requires scraping a part of the XNA code base (the ’Game’ class) and requires you to write your own Graphics Device implementation.
Of course if you ever wanted to get this running on an X-box in any shape or form you have no choice but to write your own basic GUI anyway (There are number of GUI libraries out there though).

I think there's a more fundamental issue needing answering first.  The core of Darwinbots is running bots, which are essentially plain text files that need to be loaded at sim start.  How are we going to get the bots on to the XBOX at all?  Do they network with the user's home computer?  And then when you'll want to eventually transfer bots or whole sims back to your home computer, and how do you do that?  It might be that there's no GUI at all, that you just set everything up through Visual Studio and export a settings file as part of the upload-to-the-xbox process.

Quote
And on the subject of GUI’s I thought It would be cool to have separate mini environments with their own settings accessible from the main UI you could use as ‘holding cells’ So when you feel like playing god in a evo sim you can drag and drop some bots in to a ‘refugium’ to feed them up or get them to mate, or a ‘ring’ to have one-on-one fights.  

Yep, that idea's been floating around for a while.  It's something I want to get to for DB3.

Offline Cyberduke

  • Bot Builder
  • **
  • Posts: 88
    • View Profile
SVN Source
« Reply #6 on: October 06, 2008, 05:00:25 PM »
Quote from: Numsgil
XBox live is the only way to network once your on the xbox, right? Last I heard XBox live had all kinds of limitations with XNA while they sorted out what sort of quality control they wanted to have.
Yes, and I have never tried doing any networking (or any other development for that matter) for the X-box, but something we do have in our favour is the complexity of the networking on this project is very simple compared to say a FPS with networked physics (which it seems is what everyone else is trying to use it for).

Quote from: Numsgil
I think there's a more fundamental issue needing answering first. The core of Darwinbots is running bots, which are essentially plain text files that need to be loaded at sim start. How are we going to get the bots on to the XBOX at all? Do they network with the user's home computer? And then when you'll want to eventually transfer bots or whole sims back to your home computer, and how do you do that? It might be that there's no GUI at all, that you just set everything up through Visual Studio and export a settings file as part of the upload-to-the-xbox process.
Well, to be honest I don't yet know, I will try to find out some more, this was one of the reasons I was opting to put the x-box implementation aside for now but, keep everything vaguely compatible for when we come to look at it later on once we have something to play with. But I was imagining treating a bot not as a text file that you can do anything with (on the Xbox) but rather a binary piece of data like say a saved game or extra content, these could then be imported into the DB simulation (by CD or Xbox Live), where you could pick and choose what to include, set up the simulation from the available options and run it, then evolve and or interfere with the bots at a basic level, inserting or deleting individuals, even better if you had the holding cell idea in place.  There is perhaps even room for a very dumbed-down clumsy graphical bot editor (Take a zero bot and add units of prebuilt functionality from a selection) this in theory could all be networked over Xbox and Windows Live to link both X-box and Windows simulations in a similar way to what’s already been discussed for the pure windows client.  It should really be considered very much a gimmick though at the moment.

Shadow run is an example of a game that spans platforms from the X-box to Windows
http://en.wikipedia.org/wiki/Shadowrun_(2007_video_game)
http://en.wikipedia.org/wiki/Games_for_Windows_-_LIVE


Of course the other main option still open to us at this stage is if you don’t like the sound of all that; we can go back to an OpenGL implementation and span Windows and Linux (with mono).
« Last Edit: October 06, 2008, 05:21:43 PM by Cyberduke »

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
SVN Source
« Reply #7 on: October 06, 2008, 05:15:37 PM »
Yeah, other than making sure it actually compiles with under XBox (XBox uses a dumbed down version of .NET-- er, sorry, a "lite" version ), I'm not going to worry too much about XBox at this point.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
SVN Source
« Reply #8 on: October 06, 2008, 07:01:54 PM »
Oh, and send me a PM and I'll give you write access to the repository when you're ready.