Cocos2D-XNA Getting Started Part 1

No Comments

Today we are going to take a look at creating our first Cocos2D-XNA program.  This will focus on Windows and Visual Studio and then cover the other systems in separate parts.

We are trying really hard to make this as easy as possible for developers to get up and running quickly so you guys can focus on building your games.  One of the ways is with templates that are available to be installed within Visual Studio for the systems that we support.

What you will learn:

  • Finding and Installing the Cocos2D-XNA Templates
  • Creating a new Cocos2D-XNA Empty Game Solution

More

CCLabel and System Fonts

No Comments

Wanted to talk about some enhancements we started working on the end of last week.  The team introduced a new object called CCLabel which will use the fonts that are installed on the system.  This should make it a lot easier to get started for developers that just want to output simple text without having to load a TTF or XNB font file.

The caveat right now is that it is only available on Mac, iOS, Android, Ouya, Windows and Windows GL.  We are working on a solution for the other systems as well.

There is a new test called SystemFontTest that was made available for those systems as well.

To use this type of label you just need to create a new instance of CCLabel using one of the following constructors:

1
2
3
4
5
6
7
8
9
10
11
public CCLabel(string text, string fontName, float fontSize)
 
public CCLabel(string text, string fontName, float fontSize, CCTextAlignment hAlignment)
 
public CCLabel(string text, string fontName, float fontSize, CCTextAlignment hAlignment, CCVerticalTextAlignment vAlignment)
 
public CCLabel(string text, string fontName, float fontSize, CCSize dimensions)
 
public CCLabel(string text, string fontName, float fontSize, CCSize dimensions, CCTextAlignment hAlignment)
 
public CCLabel(string text, string fontName, float fontSize, CCSize dimensions, CCTextAlignment hAlignment, CCVerticalTextAlignment vAlignment)

You can then use this CCLabel just like any other label that you would create.  In each of the constructors above the fontName parameter would be a font that is installed and available on the system.  You will have to be careful here because fonts could be different from system to system and platform to platform.  For instance using “Marker Felt” as a font name may work well on iOS and Mac but on Windows you would need to use “Felt” for the same font name.  It would be best to stick with normal fonts in these cases.  For more esoteric fonts you still have the option of CCLabelTTF, CCLabelBMFont or CCLabelAtlasFont.

Please give this new CCLabel a try and let us know if it works for you.

Cocos2D-XNA

No Comments

Hello everyone.  It has been a while since I have updated this blog but hopefully have the time to do more.  I have worked on quite a few different projects in the last couple of years after working on the MonoMac project, most significantly MonoGame, System.Drawing implementation using coregraphics and other various projects.

This brings me to my newest project – Cocos2D-XNA, the parent repository located at Jacob`s github repository, which was started by Jacob Anderson of TotallyEvil Entertainment.

A short description of the project can be found here Cocos2d For XNA Home Page and just to be clear it uses MonoGame for the rendering engine on all the different platforms.  We support true XNA projects as well.

In the last couple of months we have spent a lot of time fixing rendering problems, getting the source repository on github.in order, C#-ifying the code, and basically converting the objective-c-isms to our favorite C# patterns like using Actions, Events and Delegates.

We will also have some pre-release 1.0 templates available through Visual Studio as well as NuGet packages via the Extension Manger.  We are finalizing the pre-release 1.0 version of these now.  We are also working on Xamarin Studio integration, so stay tuned.

In the next couple of days I will also be starting some articles on Getting Started with Cocos2D-XNA on the different platforms.

Until then head over to the Cocos2d For XNA Home Page and say hi or just look around to start getting familiar with this great multi-platform game creation platform.  You can also reach us on IRC at #cocos2d-xna where the developers, Jake, Gena and myself, hang out.

MonoGame Takes Tentative Steps into 3D : MonoGame 2.1 Announced

1 Comment

Hey everyone

Welcome to another release of MonoGame 2.1.  We have been hard at work trying to make MonoGame bigger and better.  We have some new functionality which includes our first steps to 3D support as well as bug fixes, optimizations and more XNA 4.0 support.

We have to give a big thank you to all the people that provided feedback, bug fixes and especially the people that wrote samples that allowed us to focus on specific bugs.

Dominique Louis does not have his name in the official press releases but he has been the coordinator of the project and doing one hell of job keeping us all working to our common goal.  Please give him a shout at https://twitter.com/#!/SoftSavage

More

MonoGame Goes Multi-platform: MonoGame 2.0 Announced

1 Comment

Hello everyone

I am pleased to be the one, on behalf of the MonoGame team, to announce to the world that MonoGame 2.0 has been released today. Here is the official release announcement below:

MonoGame is an open source implementation of the XNA APIs that allows developers to build 2D games that run on Android, iPhone, iPad, Mac, Linux and Windows using the same code base, or reusing existing XNA code that runs on Xbox 360 or Windows Phone 7.

MonoGame 2.0 release is a major evolution of the platform. We went from only supporting the iPhone to becoming a cross-platform stack that now also runs on Android, Mac, Linux and Windows. To help developers get started, more than twenty individual samples and more than five complete starter kits are shipped with this release.

More

MonoGame goes Linux!

1 Comment

MonoGame is now available on Linux.  A big thanks goes out to Andre for all his efforts to make the port available.

Now you no longer have to learn XNA (2D only for now) programming on Windows.  Instead you can use your favorite operating system.

MonoGame is now available on 5 different platforms: Mac OSX, iPhone, Android, Linux and  MonoGame even offers a version for Windows as well.

Check out the samples that are available: Linux Samples

MonoGame and MonoGame-Live

No Comments

Well we have made more progress on the Networking package and an update is in order. 

Multiplayer now works for Mac, Windows (MonoGame only), iOS and Android via local networking and we have successfully connected to peers using these different operating systems.  You can also test this out yourselves using the Peer2Peer sample code found in the git repository.

Now for the exciting part.  Myself and technomage have been working on getting multiplayer working over the internet.  Right now we are calling it MonoGame-Live (subject to change in the future) and it consists of an introduction Master/Server component that also supports NAT-Punch through using the Lidgren Network library.  Last night we have successfully connected multiple peers using the server from multiple operating systems.  There are still some glitches to workout but progress has been made.

The source is already in the git master and can be found here: Peer2PeerMasterServer

Your input would be greatly appreciated if you are interested in maybe hosting your own gaming server. 

You can join us on the MonoGame irc or the MonoGame discussion list.

MonoGame and the Framework.Net package for multi-player games

2 Comments

Hello everyone.  Sorry for no updates lately but have been busy with life challenges and in my spare time a little hacking on MonoGame for the Mac OSX.

I just wanted to let everyone know that we got the Framework.Net package usable in MonoGame and there are two samples out there.  We implemented the package using the Lidgren Network library.  There are still a few problems but we now have the Peer 2 Peer sample from Microsoft up and running across local lan networks.

What this means for you as game developers is that you can write your multi-player games on other platforms using the same code as you write now with XNA.

One caveat is Profiles.  I still have not figured out how to implement this yet.  Right now there is a hard coded Profile and no way to sign-in via the Guide but it is coming.  If any of you have any ideas to discuss on this please let us know.

You will still use SystemLink in your code for connection type but because the Window’s XNA implementation uses their own proprietary protocol this means that we still can not interact with a Window’s game.  That is unfortunate but unless they are willing to share their networking protocol we are stuck with connecting with all the other systems except for them. 

There is work being done on building the same functionality into the iOS and Android ports and should be available soon.  So that means you will be able to have multi-player games connecting from all the technologies that MonoGame supports.

We are looking for testers as well as people who are experienced with the networking side of things to help us implement the rest.  Since I only have one windows machine, running under parallels I can not test how a real XNA program interacts with SystemLink network due to the one user profile signed in restriction.

One thing in particular is the interaction when the Gamer is ready, for an example take a look at the NetworkStateManagement sample.  Not really sure how to implement that without being able to see a real session in action.  So if you have any ideas of how it should work give us a shout.

MonoGame is using MonoMacGameView

1 Comment

As the title says MonoGame is using MonoMac’s MonoMacGameView to drive their cross platform XNA gaming development platform.

More

MonoMacGameView now part of MonoMac

No Comments

Hello everyone.  Have not been updating lately but hopefully will catch up this weekend with a lot of content.

We now have a MonoMacGameView as part of the add-in which you can find as part of the MonoMac.OpenGL namespace.  You will have to compile from source to as it did not make it into the MonoMac 1.0 add-in.

I also wrote a sample using the MonoMacGameView called MonoMacGameWindow which you can find as part of the samples here.

Hope you find it useful and I can’t wait to see what everyone does with it.  If there are any questions on how it is used please let me know here or you can find me on the monomac irc list.

Older Entries