Resurection?

Jun 3, 2011 at 1:49 PM

Anyone keen to get this thing resurected? Seems like it has been quite some time since there's been any activity here. I am very keen to get this thing updated to .NET 4. My only trouble is with the DirectX & graphics stuff, I am clueless when it comes to that. If anyone can help, has ideas, advice or anything, please let me know.

Jun 3, 2011 at 10:45 PM

I would love to get this resurrected! I have tried to do that, but hit an issue with the networking and DirectX. for this game to work, it need to be migrated to .net 4.0, WCF for networking and the latest DirectX!

Jun 6, 2011 at 7:28 AM

Well, I'm not so sure on the DirectX anymore. I've been doing quite a bit of reading on XNA, which to me, looks like it might be a better option? Also, it looks like there'll be more support for it, the resources for XNA graphics development seem to be quite extensive. What were your issues with the DirectX & the networking?

At the moment, I am going through a book on XNA development & it looks like a decent enough fit.

Jun 6, 2011 at 8:10 AM

I agree, XNA is a better option. I dont have any experience in DirectX or XNA.. and my issues were compatibility with Windows 7 and recent version of DirectX.

Networking issue, is you have to open ports on the firewall to accept peer connections. UPNP is not something that the game had and you wont be able to run the game on multiple PCs within the same lan! That was my experience.

I thought, it would be better to implement WCF and have it connect to the server/azure instance to download the animals/payload. This would work without any issues, and it can be extended to allow for P2P scenarios (using UPNP) 

Coordinator
Jun 6, 2011 at 2:49 PM

Hi guys,

I'm glad to see people interested in the project. I think it's a fun project but we just stalled after release.

On the reboot idea, XNA should be the way to go but that would require a complete rearchitecture of the core of the system. I do have a plan for a plug-in architecture (today probably using MEF, at the time I wrote the proposal MEF didn't exist) which would allow for generic graphic engines to be plugged into the core. This requires a bit of a separtion of the UI (which is partially done) and a better abstraction of the Graphics portion (which right now is written in a COM based DirectX wrapper). A native DirectX implementation needs to happen then potentially the XNA version can be plugged in.

The biggest hurdle right now is a) get it rebuilt on .NET 4.0 and b) get it working on x64 Windows 7. When released it was fine for Windows Vista but only 32bit. The COM DirectX wrapper was broken. There's a fix you can do (register the DLL manually) but it's a hack and really not a good scenario.

On the WPF front there is a WPF front-end which I think is checked in but not complete. WCF would be great and a private build I have from Microsoft is WCF compatible but not checked in. Unfortuantely it's a complete fork as it replaces several chunks of the core. Right now it's a matter of sitting down with 3 or 4 major forks that I have and trying to reconcile them. I'm just trying to find time to do that but it's something that will take a full weekend to do, which right now I don't have timewise.

Keep the conversation going though as interest will keep thing alive and hopefully get me to timeslice enough to get it done and potentially bring on more people to help (the "official" onboarding process is involved but patches can be submitted through CodePlex).

Thanks.

Jun 6, 2011 at 3:27 PM

a) get it rebuilt on .NET 4.0 and b) get it working on x64 Windows 7

I would prefer the priorities reversed, but I guess it will go hand in hand

Coordinator
Jun 6, 2011 at 3:28 PM

@iancorper Actually yes I agree. After looking at it, I think getting the x64 version working on Windows 7 should be first priority. That *might* mean running on 4.0 but it can be accomplished with 3.5

Jun 6, 2011 at 4:59 PM
Then we would need to define the desired behavior if someone tries to run it somewhere else.

On Mon, Jun 6, 2011 at 8:28 AM, bsimser <notifications@codeplex.com> wrote:

From: bsimser

@iancorper Actually yes I agree. After looking at it, I think getting the x64 version working on Windows 7 should be first priority. That *might* mean running on 4.0 but it can be accomplished with 3.5

Read the full discussion online.

To add a post to this discussion, reply to this email (terrarium2@discussions.codeplex.com)

To start a new discussion for this project, email terrarium2@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Jun 7, 2011 at 3:10 PM
Edited Jun 7, 2011 at 3:11 PM

@bsimser,

 

Could you elaborate how you went about and replaced the visual part to wcf? (or is explaining a timely effort aswell!)

Did you put your forks in to source control?

 

PS: I still think this project is unique!

Sincerly,

Steve

Jun 7, 2011 at 5:27 PM

@bsimser, thanks for the response, I agree keeping the conversation is a good idea, I was beginning to worry that this project was not really going to have much done to it. First, I can't seem to get the client working at all, and I can't seem to get the dll registered manually, but then again I am running Windows 7 64 bit.

Is there any work that you might be able to pass onto anyone willing to help? Or maybe some documentation or diagrams re the architecture? I think eventually a layered approach would be a fantastic idea. An idea I was toying around with was possibly taking a DDD approach to the architecture of the eco system. Thoughts?

I look forward to hearing future developments.

Tim

Jun 7, 2011 at 9:44 PM

I would love to see this project come back to life!

i can contribute to the networking/communication infrastructure of the game (client  & server)

Jun 8, 2011 at 10:59 AM

I'd be happy to contribute wherever I can. Although, in my humble opinion, I think if it were redesigned with the eco system as a domain & the rest of the solution layered nice, we could make it easier to understand & get more people contributing on different layers.

I'd be happy to work on the ecosystem domain for it.

Jun 10, 2011 at 1:41 PM

i can contribute to the overal design specification (agile: use cases or user stories) of the game (client  & server) if complete redesign is what is needed!

Jun 10, 2011 at 1:48 PM

That would be pretty cool if everyone was keen? We could get a product backlog going.

Jun 20, 2011 at 1:43 PM

I've played around a little bit witH XNA, it seems OK, definitly had stuff working on windows 7 64bit, just basic sprite moving stuff and a bit of collision detection. No idea about network stuff other than a little bit of web service/SOAP stuff a long time ago.

I think a new client/server may be quicker than trying to fix up the old one. (hopefully)

Jul 16, 2011 at 6:07 PM

I would love to get this working again as well, and will contribute as much as I can.

Jan 15, 2012 at 1:12 PM

Me too.  Is there a prioritized list of things to tackle?    Any idea how much work fixing the two big issues (4.0 and win 7/64) will take?    I've done a little XNA too, would be happy to help port that way. 

Jan 16, 2012 at 5:10 PM
sarmaad wrote:

I agree, XNA is a better option. I dont have any experience in DirectX or XNA.. and my issues were compatibility with Windows 7 and recent version of DirectX.

Networking issue, is you have to open ports on the firewall to accept peer connections. UPNP is not something that the game had and you wont be able to run the game on multiple PCs within the same lan! That was my experience.

I thought, it would be better to implement WCF and have it connect to the server/azure instance to download the animals/payload. This would work without any issues, and it can be extended to allow for P2P scenarios (using UPNP) 


I have been doing for some time the research for the game I'd like to built and my first option was XNA. I have even started to develop. However, recently I found out that XNA is not going to be supported in the Windows 8 and DirectX will be still there. So, I have started to look for DirectX resources. One of them is this one. This project is even somehow similar to the project that I wanted to create, at least the overall idea. I didn't really look closely at the all functionallity.

Mar 23, 2012 at 2:46 PM

I'm not sure that is 100% correct, according to this article - XNA games will continue to work but cannot be sold through the metro store. oh well, can't sell this project anyway as its open source... (source http://www.giantbomb.com/news/the-future-of-xna-game-studio-and-windows-8/3667/)

On a related note, I have started to do my best to rewrite the code in XNA - so far I have managed to get it to draw the background and a message, so im hoping sprites wont be far off. However, im trying to get it to draw more than one frame - can ayone point me at where the timer is in this, so I can see why my Draw method is only being fired once.

This is what it looks like at the moment.

http://www.inspired-apps.org.uk/Media/Default/3rd%20party/TerrXNA.PNG

I put the date / time in the message to try and see if it was actually rendering more than one frame but it is not. not yet anyway.

Regards,

Scott

Coordinator
Mar 23, 2012 at 3:09 PM

Hi guys,

Sorry for being lax in jumping into this. Yes, the system needs a good fixover. I applaud the efforts Scott and others are doing but a couple of things.

  1. I would like to get the community going again and XNA really is the only option here (we tried doing a WPF version but it's a mess)
  2. GDI+ > XNA is a bit of a mindset shift because you're going from event processing and painting to a game loop system (but it's doable, it's just architecturally it's different under the covers).
  3. Its great the effort is going forward and feel free to carry on but I don't want to see too much fragmentation. I would rather do something like a reset back to v1 of the app (and server) and put together a plan to surgically do a GDI+ > XNA swap (although again I'm not sure the validity of this model due to the way it works under the hood).
  4. There is a server component (and the peer to peer networking) which is vital to the way the system works (although you can play in the sandbox mode). The system was originally written a long time ago in a galaxy far, far, away so there are lot of opportunities for change here.

A simple plan around upgrading the technology would be something like this:

GDI+/Winforms -> XNA (client)

ASP.NET -> ASP.NET MVC (server)

Networking -> SignalR or something similar for the networking component (maybe node.js for the server?)

First steps

There's a bit of a chicken/egg problem here. First off the codebase needs to be recompiled on > 2.0 .NET but the problem with this is the DirectX component running on something like .NET 4. DirectX (and managed DirectX) died a horrible death sometime between the .NET 2.0 and 3.5 stages so I think it's possible to get the GDI+ stuff working on .NET 4 but it would be thunking down to a COM wrapper (or the last managed DX release).

I see Scott has an XNA implementation working (at least visually) but I'm not sure how much of this is a POC vs. something that could be a starting point? Was it a GDI+/DX replacement of the graphic calls? The other option is a total greenfield XNA version. So File > New > XNA project then graft in the various classes for the logic and redo both the UI elements and main drawing loops (breaking out the drawing logic from the game loop). A lot of it is separated so this shouldn't be a horrible exercise but probably a few nights of ugly hacks to get it stable.

I *promise* I will dedicate a few hours this weekend (probably Sunday night it looks like) to sit down, do some spikes in compiling and maybe fork or commit a version that at least will be more modern than what is current (technology wise). Or a new fork/release path that will be a full XNA rewrite. Not sure what the most viable path is right now but feel free to chime in here.

Mar 23, 2012 at 3:37 PM

I agree with the fragmentation issue, I downloaded the latest realease and was overwhelmed by the fact that lots of it looks empty.

So my XNA code was taken from (i believe) changeset 23363. I have compiled all the projects in .net 4 - but I have not fixed the issues, for example the security issue you get with the obsolete calls for the appdomain buts, I added the legacy support flag. I'll let someone more experienced change that bit.

<

runtime>
<
NetFx40_LegacySecurityPolicy enabled="true" />
</
runtime>

The way I've started was to override the picturebox in a similar manner to the DirectX stuff, so the graphics device is now drawing to the picturebox. I personally suggest running that to conclusion and then going back and rewriting the UI entirly in XNA? my personal thoughts being if we can get something working, we may get a lot of people interested in helping, rather than bumbling along with nothing working for the next 6-12 months?

I'm happy to commit what I've got so far if you want to fork from 23363, there is a fair amount of code change tho. I'll be guided by you on this.

Regards,

Scott

Coordinator
Mar 23, 2012 at 3:44 PM

Nice. 23363 looks like a good option to go from. There were a lot of things added before that so it might make sense to go from there (rather than going all the way back and trying to graft on fixes again). That changeset might be where things went squirrely but I'll take a look and see where things are at.

There are also a couple of patches around dead organisms I need to check and see what the patches are and fold them in. There might have been a bug in the initial system and I don't want to loose that.

All of the new WPF stuff and that can go by the wayside as XNA probably is the way to go here.

PS thanks for pushing on this as I need a kick in the butt to get this project back on track.

Mar 23, 2012 at 4:18 PM

No worries - I learned .Net on this; and I've wanted to play around with it for years now. Besides I'm always up for learning something new and XNA has always piqued my interest ;-)

Mar 23, 2012 at 8:45 PM

Woo Hoo!!!

I've managed to hook it into the timer so the time in the corner is marching on! now... chainging the viewport to scroll around the world!

Mar 23, 2012 at 9:13 PM

Nice!  Is it time to check it in?  I'd love to help, just give me something to do.  

Mar 23, 2012 at 9:26 PM

Woo now the cursors work!

Re: checking in - I've not worked with TFS in a while - but because I started from a changeset that was a long way back I cant just generate a patch? or can I?

Mar 23, 2012 at 9:27 PM

Did you start w/ 23363?   And did we decide we're going to scrap everything after 23363?

Mar 23, 2012 at 9:32 PM

Yeah I started with 23363, kinda a few days before discussing it, but it shouldn't bee too difficult to add any changesets from later commits. The problem is if I generate a changeset now Bil is going to have to consilidate my changes to all those done after 23363.

Mar 23, 2012 at 10:26 PM
Edited Mar 23, 2012 at 10:26 PM

Ok, so I have now got the scrolling working as well, but im .. confused, and its getting late!

The world appears to be generated based on the power of my computer, so the actual size is 3 times larger than the background texture, how do I draw the next texture?

I'm ready to commit now, well I think its stable enough for others to start having a look now, but I'll wait for instructions on how.

Have a good night all.

Mar 24, 2012 at 4:15 PM

wauw it's really progressed that far. After absence I will put in my own input and support!

Mar 25, 2012 at 5:53 AM

I guess access to the source code by TFS, I need to be added as an Developer to the project? no anynymous! I used username@SND and my password but that did not work (offcourse my own username)

Mar 25, 2012 at 9:05 PM
Edited Mar 25, 2012 at 9:06 PM

Yeah I found that as well.

Its progressed well today - I've got the background tiling correctly, the minimap updating, plants showing, animals showing - and animating, but not moving yet. Well, they do move, but so fast i think they can fly!

Anyway, tomorrow im going to try and get the movement working better and the teleporter working and i think its nearly ready for testing for a release build ;-)

Mar 26, 2012 at 4:27 PM

Ok, so I have got the animation working, its a little too fast at the mo because I had to take out the skipframe and paint only plants code as everything has to be painted in XNA, I cant pick and choose but it looks ok.

I do have a problem someone may be able to help with however...

 

I've made a sample herbivore that does the following:

// continually move north
BeginMoving(new MovementVector(new Point(this.Position.X, this.Position.Y - 100), 2)); 

The problem being that XNA coords are different to the ones used, as the 0,0 points is top left, not bottom left. I think. meaning that my little bug is showing as ActualDirection = 90 and so is pointing to the right of my screen but sliding upwards... so I think we need to find the code that does the actual direction calculation and adjust to account for the new coordinate system. correct?

Mar 26, 2012 at 5:46 PM
Edited Mar 26, 2012 at 6:07 PM

I thought the problem was solved but its not working; this is the bit I think is wrong...

Vector direction = Vector.Subtract(CurrentMoveToAction.MovementVector.Destination, currentPosition);
                //Vector unitVector = direction.GetUnitVector();

                //double angle = Math.Acos(unitVector.X);
                //if (unitVector.Y < 0)
                //{
                //    angle = 6.2831853 - angle;
                //}

                //// convert radians to degrees
                //actualDirection = (int) ((angle/6.283185)*360);

                actualDirection = (int)Math.Atan2(direction.X, -direction.Y);
I think I've got it this time:
Vector direction = Vector.Subtract(CurrentMoveToAction.MovementVector.Destination, currentPosition);

actualDirection = (int)((180.0 / Math.PI) * Math.Atan2(direction.X, -direction.Y));
Mar 26, 2012 at 8:03 PM

I need some help now - Im in the PaintSprites method, I can work out correctly which frame I need from the sprite sheet, but where in the world to put that sprite eludes me, there is tsSprite.XPosition / tsSprite.YPosition and orgState.Position.

using tsSprite means that the graphics bounce arround because XDelta and YDelta end up being > 99999999... orgState.Position seems to work well, except that when moving the sprite seems to move in the wrong direction... im confused now...

Mar 27, 2012 at 6:43 PM
Edited Apr 2, 2012 at 6:30 PM

I made a fair bit of progress yesterday and today, so i've pacakged up what I've done so far - should work on x64! feel free to download and try it.

Teleporter is now confirmed working.

This is version 2.1.0.4475

http://terrarium.inspired-apps.org.uk/Terrarium-2.0.msi

Issue's im looking at currently are:

  • seems that the tick() is too quick? creatures dont seem to live long enough to do anything meaningful, ie find food / reproduce
  • creature sizes... don't look correct, I'd appreciate other peoples opinion on this, or comparison with someone who can run the old version.
  • change the size of the text so it all appears onscreen
  • adding a background grid (easy, i've just not done it yet.)
  • when setting skins use the enum only
  • I think I may change the font, I dont like that font, thoughts?
  • may be worth adding a Current Plants count similar to the current Animals one.

 

Fixed issues:

  • work out if my frostbitten critters (serialization errors) are client or organism based. - Turns out in my serialize method it was throwing not implemented exception. duh... 
  • fixed the small icons (minimise, maximise, close window etc)
  • centred the energy and injury bars correctly under plants and animals

note that you may need to wait for the first LED to go green before adding any creatures or plants, or youll get an error from the server - it should only take 10 - 15 min to turn green.

Scott

 

Coordinator
Mar 29, 2012 at 3:45 AM
ScottMacleman wrote:

Yeah I started with 23363, kinda a few days before discussing it, but it shouldn't bee too difficult to add any changesets from later commits. The problem is if I generate a changeset now Bil is going to have to consilidate my changes to all those done after 23363.

Hi Scott,

I'm not sure the best approach here but I think we'll dump everything after 23363. Once you have a stable build I'll check it out and do a diff from 23363 then do a full commit (blowing away everything before that). I think it'll work, just creating a local copy of the entire repo to try this out.

Thanks.

Apr 16, 2012 at 9:18 AM
bsimser wrote:
ScottMacleman wrote:

Yeah I started with 23363, kinda a few days before discussing it, but it shouldn't bee too difficult to add any changesets from later commits. The problem is if I generate a changeset now Bil is going to have to consilidate my changes to all those done after 23363.

Hi Scott,

I'm not sure the best approach here but I think we'll dump everything after 23363. Once you have a stable build I'll check it out and do a diff from 23363 then do a full commit (blowing away everything before that). I think it'll work, just creating a local copy of the entire repo to try this out.

Thanks.


Hi Bil,

Any luck?

Scott

Jul 20, 2012 at 10:12 AM

So I've now got a full time job again so I've not got much time any more, well not nearly as much as I did have.

I've also been watching the server over the last few months, looks like only 3 people have ever connected, not including me!

 

Nov 27, 2013 at 8:22 PM
Hi Guys!! wow! really good advances!! This url http://terrarium.inspired-apps.org.uk/ seems to be broken now.

Is this https://terrarium2.codeplex.com/SourceControl/changeset/69709 the last changeset? Is it working? Can I have to download lastest source code to make this work? I mean, the last source code includes all the work from ScottoMacleman, isnt it?

Thanks!
Greetings from Argentina
www.hernanzaldivar.com
Mar 22, 2014 at 12:44 PM
Hey,

So, I've been really busy with work recently so I've not had that much time. I do have a free weekend so I thought this would be a good point to do something.

I've been waiting for bsimser to let me know when he was ready to fork, as I started from a fairly old checkout I thought it would be better to fork from there and add my change set. Having done this a few times before I know its a lot easier than trying to get it into the Head Rev, but as its been so long and I would love to see more interest I'm going to bite the bullet and commit a patch today. I'll then leave it to a project dev to do with as they see fit.

I'll give them a while to do something with it and if nothing happens I'll publish my code somewhere else, but I would rather see it here where in my opinion it should be!

Anyway, we'll see what happens.

Scott
Mar 23, 2014 at 8:14 AM
Scott,

Looking forward to your patch!

Regards,
Steve
Mar 23, 2014 at 8:54 AM
Hi Steve,

I put it up last night, Enjoy!

Scott
Coordinator
Mar 23, 2014 at 1:22 PM
ScottMacleman wrote:
Hi Steve,

I put it up last night, Enjoy!

Scott
Scott,

Thanks tremendously for this. I will look at it this week and see what to do with it. I'm assuming you did both client and server but maybe not the server part. I have an azure account dedicated for this now and will be setting up a permanent server because that's sort of key to this thing working fully (you can run in sandbox mode but that's no fun). Again, thanks for this and maybe we can get this project up and running again.

-Bil
Mar 23, 2014 at 4:13 PM
No worries Bil, happy to help, I'm just sorry it took so long. I think getting a server up is a good idea. I didn't do that much work on the server but it was working correctly [mostly].

Looking forward to getting more people into it. Fingers crossed we will get critical mass once we get it all working!
Apr 14, 2014 at 1:52 PM
I could not build latest version... Does somebody has arleady builded binaries?
Coordinator
Jun 14, 2014 at 2:43 AM
Getting back to this project today. I've asked for the repository to be converted from TFS to Git or Mercurial and I'm currently evaluating the two outstanding patches and will have them applied shortly. Love this project, just had to find time to claw it back to the top of the pile. Thanks everyone!
Jun 15, 2014 at 4:51 AM
That's great news bill
Coordinator
Jun 15, 2014 at 12:34 PM
Just a note that there are a LOT of changes going in to make it work on "modern" systems. A new set of repositories has been setup on Github so there's a new SDK (available via NuGet now), new server, new API, new client, etc.

You can start to see it take shape here:
https://github.com/terrariumapp

More details, documentation and all that is coming as I'm building it up today.

Thanks!
Sep 22, 2014 at 12:35 PM
Great news, Bill. I'll definitely keep an eye on the Github repo's!

What do you mean with "modern" systems? Is your aim to get it working for the latest .NET version?