Monday, May 12, 2008

Completion

Neon Culture, as this semester's project, has come to an end. The following are features I was able to include:

  • 3D Graphics:
    • Cells as cubes with colored wireframe for team identification
    • Borders Identified clearly
    • Background "Prominence Maps" to show colors on a local scale
  • Artificial Intelligence
    • Moves always in at least the general direction of a reasonable target
    • Becomes more aggressive when it has an advantage
    • Has a toggle feature for switching between AI personalities
  • XBox 360
    • Paint application runs superbly and is easy to use
    • Paints one cell at a time or fills areas
Also, here are some errors that I was never able to correct:

  • 3D Graphics
    • Cells cluster on top of each other, making it hard to identify how many there actually are on the screen at one time
  • Artificial Intelligence
    • With the exception of completely red images, cultures usually eventually reach an equilibrium and pace back and forth inconclusively
  • XBox 360
    • There is a bug where sometimes the "Back" button will cause the game to ask for another image randomly
    • Sometimes the border cells are a bit past the edges of the screen
Also, here are some options for further expansion that I was unable to make work:

  • 3D Graphics
    • Model meshes for cells that actually look like bacteria
    • Circular, petri dish environment and entrancing, neon background
  • Artificial Intelligence
    • Give players some competitive control over individual team's behaviors
    • Have a tie-breaking element to fix pacing stalemates
  • XBox 360
    • Allow for saving of images/games
    • Implement an internet component
Overall, however, I am exceedingly pleased with how the project has come together. Despite these flaws and questions for expansion, each element is both functional and appealing, leaving me with a contented feeling on each. I feel that Neon Culture is complete.

Thank you for reading through my blog. I hope at least some part of my experience has been valuable to you. For further information, see below, but otherwise, this is Tyler Silber saying thank you and goodbye!

SDF: http://www.cs.lmu.edu/~tsilber/SDF.zip
Final project: http://www.cs.lmu.edu/~tsilber/Neon_Culture_v1_0.zip

(If you have anything else you want to know, leave your contact info in a comment here and I will hopefully check in and see it and be very happy to communicate)

Sunday, March 30, 2008

Program is Half-Full

Too much time between this and my last post, but progress has been strong! The following changes and possible near-future changes are of note:

First, the graphical glitch in image importing has been solved, and it now imports all fashions of image files. It was a simple matter of discovering Microsoft's existing object classes and importing them, a process which also netted me more knowledge in the Visual Studio SDK. Resizing of images was done in the same way, and I can really do that dynamically to whatever size I want.

Second, I think that I finished placing all of the object classes, including the AI behaviors class. I decided not to instance behavior as an object, and just use it as a utility class. It has been given some filler code for now which essentially turns cells in random 90-degree directions. It makes them like a stub, for testing reasons, but also gives them an obvious activity to do so I know that the code flow is actually running through there.

Third, on XBox-specific news, I have settled on a paint application that interfaces to my Neon Culture project as the CMSI 499 portion. Of course, everything else will port to the platform too. Nothing is truly tested right now, however it is in a good phase to begin coding the paint application, as my data structures have beeen well defined. I should really look into the possibility of using gamer tags, or whatever those little ID pics are called on XBox Live as image files. Not that I could use those images, but if those can get on XBox Live perhaps there is hope for me uploading images another way.

Fourth, an alpha version is coming due in two weeks. What I need to satisfy before that requirement is simple:

  • Hit detection. Cells need to be able to interact/eat each other. The skeleton for this is in place, I just need some serious advice on how to divide up the battlefield; in particular, a very strange type conversion between variable-size grid locations and floating point numbers.
  • Boundaries on the playing field, both inhibiting movement and visibly expressed.
  • Any AI at all. It doesn't have to be fancy, it just has to steer towards the nearest blob of targets instead of wandering haphazardly through the environment.
  • Possibly cell reproduction. It doesn't exist yet, but it wouldn't be hard to add. The architecture was made in a way that is mindful of this future inclusion.

Finally, for future expansion. This past week has brought to my attention the possibility of using 2-D graphics instead of 3-D. Specifically, that I could switch between them, and it may not be that hard. Definitely this should be at the back of my mind for now, but it would be impressive to change between graphic modes with the press of the space bar and would demonstrate the modular nature of my code and how, when I say the graphics are independent from the mechanics, that it is the truth.

Thank you for reading, I'll be back to post again soon,
-Tyler

Monday, February 11, 2008

Functioning (but buggy) graphics engine

Success over the past week!

I have succeeded in setting up some semblance of a graphics engine in this Neon Culture build. A prototype of the cell object class, another class taking in two images and turning them into cell arrays, and the main class to handle all assigning of vertices and indices are all done. Currently it only dices one image up into one mass of cells, and that image is drawn starting at the origin. Which image is chosen for the process is changed by altering a hard-coded string (yes, it makes me wince too, but in my defense it is only set in one place and then passed out from there so at least I'm not going to end up with many concurrent string issues) which is the file name of the image I have ready. I intend to implement a function that will pop up a file browser at startup, and in fact have the following resources ready to help me accomplish that:

http://msdn2.microsoft.com/en-us/library/system.windows.forms.openfiledialog.aspx
http://www.java2s.com/Code/CSharp/GUI-Windows-Form/showsbrowsingforafile.htm

In addition, there is a rather annoying bug that has resulted in an incorrect interpretation of the image's colors. Instead of a vibrant picture, the result is a grayish, muddied mess. My first thought was that that it has shifted which bits it was reading to the right or left to result in incorrect colors, but the cells are all gray, and one would think that even by random chance there would be some vibrant colors. They are getting averaged out somewhere and I'm not sure how yet. Also, the camera is in the wrong place, and perhaps top of my list is setting up a CVS repository. Never have your source code in one place only!

However, all of that aside, here are some promising benchmarks:

50,000 pixel image
  • Time to convert into 50,000 cell objects: negligible
  • Vertices to display on screen: 3,000,000
  • Indices to display on screen: 120,000,000
  • Frames per second: approximately 30
Back to work!

-Tyler

Sunday, February 3, 2008

It begins...

Welcome to:
  • Computer science enthusiasts
  • Curious XBox developer wannabes
  • Gamers
  • Friends and family
  • Dondi!!
Welcome to the first blog posting on my senior project, thus far called "Neon Culture". Before I can get down to the good stuff, I must lay down the groundwork for this site, seeing as this is my first time posting here. I should begin with who I am, what I am striving to achieve with the next 3.25 monthes, and what the guiding purpose of this site is.
  • My name is Tyler Silber, I am a senior at Loyola Marymount University in the Computer Science department, and in the future I want to become a game developer. I have recently taken up this project as an attempt to combine three key elements of what I am studying this semester into one accomplished, final project. Those elements are:
    1. Sound software development practices, and a thorough understanding of the process implied therein.
    2. A worthwhile application of artificial intelligence in a working software system.
    3. Integration of Microsoft's XBox 360 game console and Windows XP operating system not only as destination platforms, but also as potentials to explore as far as possible.
  • The project is currently named "Neon Culture". It is a game of competitive evolution between two brightly colored cultures of bacteria on the battleground of a petri dish. Individual cells possess their own personalities depending on their coloration and attack, defend, or breed accordingly. The original culture is assembled chromatically from a .bmp file provided by the user at the game's beginning, and from there the battle is very hands-off.
  • The purpose of this blog is to document the development process this semester with a specific focus on the third part of my project which interacts with the XBox 360 technology. It is a journal of my progress and my plans with regards to XBox interactivity.
Anyway, now that that introduction is out of the way, I practically have nothing to write about. I am using C# as the programming language behind my project with Microsoft Visual Studio as my IDE and XNA as my graphics API. I am using these because of the incredible simplicity behind using them, as well as my experience with similar systems. I have successfully connected a project from the computer to an XBox 360 with the XNA development toolkit running and started up the game. I have also gone through the first two lesson on the following site, from which I am learning as fast as I can: http://www.riemers.net/

So far everything has been smooth. My past experience in OpenGL and Java programming has made the transition to XNA and C# easy. I intend to begin programming the background logic of Neon Culture over the next week, as well as research as far as I can into importing and creating .bmp files on the 360. I will update again within a week with more news.

Thank you everyone,
-Tyler