Im making a fairly big game for Mac appstore, and i would like to control my levels using XML. Basically I just need to be able to read co-ordinates out of the XML document and into cocoa, where I can use them to move objects for each level. How do i parse this file in cocoa?
Thanks for your help
NSXML should have everything you need to get started.
Related
I'm in the process of developing an RPG using Apples SpriteKit framework. All is well: I have NPC & game objects all that the player can interact with. Plus, I have a text box to display text. Now, I want to implement quests & such but I'm currently stumped on figuring out a good way to create such game content. I did come across Ray Wenderlich's tutorial (https://www.raywenderlich.com/30561/how-to-make-a-rpg) on making an RPG and using Lua as the scripting language of choice, but after trial & error, I realized the luaObjectiveC bridge is far too old & deprecated (not sure how to fix the myraid of defects & errors) & there aren't any viable counter alternatives. I tried looking in github but couldn't find anything useful to get me started. Thus, I realize I must code my own implementation from scratch.
Any suggestions/tips for how to go about solving this process? Should I have some sort of JSON file that stores dialogue text which is called upon & has appropriate content retrieved & displayed inside the text box?
I'm hoping to make this a more-or-less flexible solution so I can use it in future projects.
If you are just starting your game now, go ahead and start using the iOS 10 Tile interface for world construction. See this raywenderlich tutorial for more. The tile interface handles constructing the world and the performance of tile based rendering for you. You still need to implement the game logic, items, and so on. JSON is just as good as any other storage means. You are going to need to implement dialog logic yourself. I would also suggest that you have a peek at my texture memory reduction framework which is very useful for loading complex images that would otherwise consume a ton of texture memory.
I am trying to make a basic application which show my track on the map while walking. Is there any tutorial or source code.
Thanks in advance.
Edit: A friend helped me by this code sample code but it didn't run well http://dl.dropbox.com/u/31913717/MapTracking.zip
I am not at all an iOS developer, just never learned. However, I know that iOS has a KMLViewer that might be useful. Otherwise you will likely have to parse the KML as XML and then figure out what to do with it.
I am trying to make an iOS game. It's going to be 2D and tiled, but I am having some difficulty because really don't want to use external libraries if at all possible. I am using Tiled for designing my maps. Does anyone know of a tutorial or article that helps explain making a custom TMX loader?
This is supposed to be a learning experience that's why I don't want to use cocos2d.
Managed to figure it out for myself, TMX files are just XML and after some testing I was able to get one to load with NSXMLParser. The XML is described in detail here
https://github.com/bjorn/tiled/wiki/TMX-Map-Format
Can anyone help me, I'm a n00b at this and still learning.
I simply need to load an XML file into a table view and add a search function to it which filters the table view. I was looking for a tutorial on this or some sample code.
This is for a Mac app.
Here is the apple tableview guide
http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/TableView/TableView.html
and here is the NSXML guide
http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/NSXML_Concepts/NSXML.html
If you look at my post here I am using a NSURL connection to get local xml, in place of a web service.
Accessing Local file using NSURL
I would strongly suggest getting a copy of the Big Nerd Ranch iOS programming guide, it covers exactly what I think you want to do near the end of the book.
Are there some particular library files available on OS/X that are relevant, I am just not sure where to start.
You'd probably want to use the QuickTime for that. There is some sample code that does this. However, it's not the nicest way to access metadata. The newer QTKit Framework somehow still requires you to fall back to the C-based APIs. There is another example from Apple embedding meta data writing into a Objective-C method. This might be the best starting point for you.