|
341
|
Player / Games / Re: Far Cry 3: Blood Dragon
|
on: May 02, 2013, 10:39:07 AM
|
|
So, the biggest problem with the game so far is one that I feel is inherent of all "parody" games. To parody a problematic feature of a game, you typically have to emulate it. This means that if you are parodying something that isn't fun, you have to put something that isn't fun in your game. I get that the tutorial is short and is a joke, but it is still a shitty way to start the game.
|
|
|
|
|
342
|
Developer / Technical / Re: Read XML to Unity
|
on: May 02, 2013, 10:17:05 AM
|
Sorry, that's in my code: TextAsset xmlFile; //Get this from the loading of resources or whatever XmlDocument xml = new XmlDocument(); xml.LoadXml(xmlFile.text);
That's how I handle the xml parsing at least.
|
|
|
|
|
343
|
Developer / Technical / Re: Read XML to Unity
|
on: May 02, 2013, 09:46:33 AM
|
|
Yeah, I assumed he was doing that since he said he was able to loading it after changing it to .txt, but that goes without saying.
|
|
|
|
|
344
|
Developer / Technical / Re: Read XML to Unity
|
on: May 02, 2013, 08:40:02 AM
|
So, here's how I parse Ogmo into Unity: Editor/OgmoImporter.cs using UnityEditor; using UnityEngine; using System.IO; public class OgmoImporter : AssetPostprocessor { public static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets, string[] movedAssets, string[] movedFromAssetPaths) { foreach (string asset in importedAssets) { if (asset.EndsWith(".oel")) { string filePath = asset.Substring(0, asset.Length - Path.GetFileName(asset).Length) + "Generated Assets/"; string newFileName = filePath + Path.GetFileNameWithoutExtension(asset) + ".txt"; if (!Directory.Exists(filePath)) { Directory.CreateDirectory(filePath); } StreamReader reader = new StreamReader(asset); string fileData = reader.ReadToEnd(); reader.Close(); FileStream resourceFile = new FileStream(newFileName, FileMode.OpenOrCreate, FileAccess.Write); StreamWriter writer = new StreamWriter(resourceFile); writer.Write(fileData); writer.Close(); resourceFile.Close(); AssetDatabase.Refresh(ImportAssetOptions.Default); FileUtil.DeleteFileOrDirectory(filePath + Path.GetFileNameWithoutExtension(asset) + "_possibleSizes.txt"); } } } }
OgmoLevel.cs using UnityEngine; using System.Collections; using System.Collections.Generic; using System.Xml;
public class OgmoLevel { public string name; public int width; public int height; public Dictionary<string,OgmoLayer> layers; public OgmoLevel(TextAsset xmlFile) { name = xmlFile.name; XmlDocument xml = new XmlDocument(); xml.LoadXml(xmlFile.text); XmlNode root = xml.FirstChild; width = System.Convert.ToInt32(root.Attributes.GetNamedItem("width").Value); height = System.Convert.ToInt32(root.Attributes.GetNamedItem("height").Value); XmlNodeList children = root.ChildNodes; layers = new Dictionary<string,OgmoLayer>(); for (int ii = 0; ii < children.Count; ii++){ OgmoLayer layer = new OgmoLayer(children[ii],width,height); layers[layer.name] = layer; } } }
OgmoLayer.cs using UnityEngine; using System.Collections; using System.Collections.Generic; using System.Xml; public enum LayerType{ TILES, GRID, ENTITIES } public class OgmoLayer { public string name; public int tileWidth; public int tileHeight; public List<OgmoEntity> entities; public int[,] tiles; public OgmoLayer(XmlNode layerNode, int width, int height){ entities = new List<OgmoEntity>(); LayerType type = LayerType.ENTITIES; name = layerNode.Name; if (layerNode.Attributes.GetNamedItem("tileset") != null){ type = LayerType.TILES; } else if (layerNode.Attributes.GetNamedItem("exportMode") != null){ type = LayerType.GRID; } switch (type){ case LayerType.ENTITIES: ParseEntityLayer(layerNode); break; case LayerType.TILES: ParseTileLayer(layerNode,width,height); break; case LayerType.GRID: ParseGridLayer(layerNode,width,height); break; } } protected void ParseEntityLayer(XmlNode layerNode){ tiles = new int[0,0]; tileWidth = 0; tileHeight = 0; for (int ii=0; ii < layerNode.ChildNodes.Count; ii++) { entities.Add (new OgmoEntity(layerNode.ChildNodes[ii])); } } protected void ParseGridLayer(XmlNode layerNode, int width, int height){ string text = layerNode.InnerText; string[] textLines = text.Split(new string[2]{"\n","\r"},System.StringSplitOptions.RemoveEmptyEntries); tiles = new int[textLines[0].Length,textLines.Length]; for (int ii = 0; ii < tiles.GetLength(0); ii++){ for (int jj = 0; jj < tiles.GetLength(1); jj++){ tiles[ii,jj] = System.Convert.ToInt32(textLines[jj][ii]); } } tileWidth = width/tiles.GetLength(0); tileHeight = height/tiles.GetLength(1); } protected void ParseTileLayer(XmlNode layerNode, int width, int height){ string text = layerNode.InnerText; string[] textLines = text.Split('\n'); for (int jj = 0; jj < textLines.Length; jj++){ string[] splitLine = textLines[jj].Split(','); if (tiles == null){ tiles = new int[splitLine.Length,textLines.Length]; } for (int ii = 0; ii < splitLine.Length; ii++){ tiles[ii,jj] = System.Convert.ToInt32(splitLine[ii]); } } tileWidth = width/tiles.GetLength(0); tileHeight = height/tiles.GetLength(1); } }
OgmoEntity.cs using UnityEngine; using System.Collections; using System.Collections.Generic; using System.Xml;
public class OgmoEntity { public string name; public int x; public int y; public float width; public float height; public List<Vector2> nodes; public Dictionary<string, string> entityAttributes; public OgmoEntity(XmlNode node){ XmlAttributeCollection attributes = node.Attributes; name = node.Name; width = float.NaN; height = float.NaN; entityAttributes = new Dictionary<string, string>(); for (int ii = 0; ii < attributes.Count; ii++){ XmlNode attribute = attributes[ii]; switch(attribute.Name){ case "x": x = System.Convert.ToInt32(attribute.Value); break; case "y": y = System.Convert.ToInt32(attribute.Value); break; case "width": width = System.Convert.ToSingle(attribute.Value); break; case "height": height = System.Convert.ToSingle(attribute.Value); break; default: entityAttributes[attribute.Name] = attribute.Value; break; } } nodes = new List<Vector2>(); for (int ii=0; ii < node.ChildNodes.Count; ii++) { XmlNode childNode = node.ChildNodes[ii]; attributes = childNode.Attributes; Vector2 nodePosition = new Vector2( System.Convert.ToSingle(attributes.GetNamedItem("x").Value), System.Convert.ToSingle(attributes.GetNamedItem("y").Value)); nodes.Add(nodePosition); } } }
Then it all gets used like: string levelFolder = "Levels";
Object[] levels = Resources.LoadAll(levelFolder + "/Generated Assets" , typeof(TextAsset));
List<OgmoLevel> levels = new List<OgmoLevel>(); for (int ii = 0; ii < rooms.Length; ii++){ levels.Add(new OgmoLevel(rooms[ii] as OgmoLevel); }
As you discovered, Unity doesn't like TextAssets with odd extensions, so the editor class takes care of that. Beyond that, the code is relatively straight-forward and should handle most of want you need to do. Caveats: - My code is shit - I probably don't actually handle the Ogmo file format to spec. It grabs everything that I need from Ogmo, so you'll have to test and make sure it does what you want.
|
|
|
|
|
345
|
Player / General / Re: Game Pirates get Pirated
|
on: May 02, 2013, 02:53:47 AM
|
Playing devil's advocate here, there is the possibility of two developers independently making nearly identical things without having copied each other. In most cases, it's more probable that copying was involved (whether intentional or subconscious), but not necessarily always the case. It would be pretty terrible to have created something from scratch with no knowledge of a similar product that had recently been released, then have your product branded as a clone of it despite never having seen it before. No one would listen to claims that your work was original, even if it truly was.
I'm not familiar enough with this case to weigh in on whether it's an intentional clone or not, just cautioning against initiating witch hunts due to oversensitivity.
That's stupid, because Game Dev Story came out ~2 years before they even started work on Game Dev Tycoon, and a simple googling of '"game dev" game' the first non-Game Dev Tycoon result (excluding the one about Ludum Dare) is about Game Dev Story (and before this stupid story blew up, I'm sure it was the #1 result). Give that the game is about as close to another game as one can be without being a pure clone, I'm not giving them any benefit of the doubt.
|
|
|
|
|
346
|
Player / General / Re: Game Pirates get Pirated
|
on: May 01, 2013, 10:17:05 AM
|
For comparison here is Game Dev Story:  Running down the list: -The art is different, obviously, but they have essentially the same design. People sitting at computers with icons (actual icons in Game Dev Story, colored circles in Game Dev Tycoon). - Identical UI elements. Hype, Y# M# W#. - Identical game elements. Bugs, Research, Design, the idea of mashing two genres together to make your game. - Similar game elements. Art and music went away and technology took their collective place. Fame became # of Fans. All told, the game seems to have nothing new (the only difference I can find is that they merged art and music and replaced icons with colored circles).
|
|
|
|
|
347
|
Player / General / Re: Game Pirates get Pirated
|
on: April 30, 2013, 06:15:08 PM
|
i think those are fair points, however, both of those are basically the same point: that they aren't "original". i don't think that's necessarily a bad thing though, not every game can be original. if not for all the unoriginal doom clones that were released shortly after doom was, there would be no fps genre. unoriginal clones are just a side effect of the formation of a genre. look at minecraft-likes and tower defense games for more examples; as any genre forms you are going to get a bunch of clones, it's just how the process works
it's like, if there's less than a few hundred games in a genre, we call them all 'clones' of the original game, if there's several thousand games in a genre, we just call them games in a genre
Well, I mean I do think that they are two separate things. At their root, yes, both of them are essentially "A group of people have gaps in their knowledge and therefore find this interesting." Specifically, this type of soft DRM has been in effect since at least '94 (since I know Earthbound has it), perhaps longer. I guess the irony here is that the made it specifically about piracy, which some people find hilarious? I think it merited about half a smirk from me, but there's no accounting for taste. As for cloning? Yeah, I understand that there is room in a genre for similarity, and that as more games come along that's how a genre is formed. With that, I think all games fall along a continuum of relation to any other game which is something like: Clone (Luftrauser Clone -> Luftrauser) | Near Clone (Ninja Fishing -> Ridiculous Fishing) | Same Genre | Different Genre I think most people recognize that the "Clone" is bad. The "Near Clone" is where things get very grey and muddy. I'm not saying this game is a full "Clone" but I think it sits in between "Clone" and "Near Clone". I think VDZ's point about 'Falling block puzzle games' being a genre but 'Tetris' not being a genre is the correct distinction. Obviously, similar games are going to exist, and that's entirely ok (and a good thing as seemingly small tweaks to a game can reveal new things about a genre). But this doesn't seem to bring anything new to the table (except for the 'cute' DRM). @Sinclair Yeah, management games have existed, and obviously there are going to be similarities between games of the same genre. But even looking at Kairosoft, they produce very similar games, but they always bring something new to the table. I'm having trouble putting it into words, so I'll go through some management games to try to make my point. Rollercoaster Tycoon vs Zoo Tycoon: Very similar gameplay (in that it is all about managing customer reactions), but the difference in theming and other mechanics (like the rollercoaster creation) mean these seem suitably distant. Rollercoaster Tycoon vs Theme Park: Despite similar gameplay and theme these games feel different. Perhaps it's the humor of Theme Park, or the greater emphasis on Rollercoasters in Rollercoaster Tycoon, but I wouldn't say that Rollercoaster Tycoon is a clone of Theme Park. Game Dev Story vs Game Dev Tycoon: I find it hard to find any differences here. The gameplay is the same. The theme is the same. The graphics are different? Their font choices are bad? Not sure that they are pushing the genre forward in any sort of substantive way.
|
|
|
|
|
349
|
Player / Games / Re: What are you playing?
|
on: April 30, 2013, 12:12:25 PM
|
|
That is a game that has aged marvelously. And the late 90's is not a period where 3d games have aged well.
|
|
|
|
|
350
|
Player / General / Re: Game Pirates get Pirated
|
on: April 30, 2013, 11:46:33 AM
|
|
Yeah, I think it is two things: 1) This isn't a novel idea. As such, those of us who know it isn't a novel idea have a bit of backlash over the response to this one. 2) Their game is a pretty blatant clone of GameDev Story, and I think most indies treat game cloning as a worse sin than game piracy.
|
|
|
|
|
351
|
Player / General / Re: Game Pirates get Pirated
|
on: April 29, 2013, 07:10:46 PM
|
|
Self-righteous inconsistent rip-off of Game Dev Story? A+++++ Would not give a shit again. 10/10.
So, I'm all for no DRM, but there message seems a bit muddled. Piracy is only a major affect in the pirated version? So, they don't think piracy is a big enough affect to have it be a large part of the non-pirated version?
I mean, I get the irony, but either they think it's something major and important and it's in both versions of the game, or they don't think it's something major and thought it would be funny and only put it in the pirated version. I'll leave it as an exercise for the class to figure out which one it is.
|
|
|
|
|
352
|
Developer / Design / Re: Poker based combat
|
on: April 29, 2013, 05:04:34 AM
|
|
Well, it depends where you are. If you are in the US, yes, it is illegal (although this might change if you are in New Jersey or Nevada). Elsewhere? Maybe not.
|
|
|
|
|
354
|
Developer / Art / Re: show us some of your pixel work
|
on: April 27, 2013, 01:05:28 PM
|
Thing I did for Ludum Dare.
The lighting is a bit off (if the shadows are cast from the sun that appears to be directly overhead, why is it lighter on the front?), but I love it.
|
|
|
|
|
355
|
Player / Games / Re: Monaco
|
on: April 27, 2013, 12:09:41 PM
|
Guards can also see through windows, can't they?
Yes.
|
|
|
|
|
357
|
Player / Games / Re: Monaco
|
on: April 26, 2013, 02:24:23 AM
|
|
I think it took me a total of 30 minutes to get to the "good" parts. And that's including reading the story and futzing around the menus. Active play time was probably on the order of 15 minutes.
It's not like FF13 and the never ending tutorial, or something.
|
|
|
|
|
358
|
Developer / Technical / Re: The grumpy old programmer room
|
on: April 25, 2013, 05:35:52 PM
|
Are you doing something like: ... if (JumpPressed()){ vy += 10; } ...
Because that would get the behavior you are seeing. Instead you'd want something like: ... if (JumpPressed()){ vy = 10; } ...
The other thing to be aware of is jumping while on a moving platform. If the platform is moving up, you'll want to boost the players jump by the speed (or a slight factor more, say 1.2 times) of the platform. If it is moving down, let the player jump as normal.
|
|
|
|
|
360
|
Developer / Technical / Re: 4 billion bullets.
|
on: April 24, 2013, 12:26:11 PM
|
|
Yeah, I guess it could just be Player ID + Counter.
EDIT: Obviously not actually adding them, just the combination of the two.
|
|
|
|
|