Trying to program a connect4 style game in Android and running into issues with the views. I have worked with Java AWT and am trying to get the same functionality out of Android. A simple drawing system by which I can update the game board and have the screen remain until a button press causes a change to the game board.
I have tried looking at a few tutorials but most tend to go the XML route which I am less familiar with, and also it seems it would be harder to update each of the game board locations using XML.
Any easy to understand tutorials or specific instructions would be really helpful.
Really just looking for a way to specify locations within a view by pixel location since that makes the most sense in my mind. if there are far easier ways those would be appreciated.
All you need is drawing directly on a given canvas. The official site got the resource you need.
Related
I'm learning creating mobile android AIR apps using Flash Professional CS6.
I want to try and create a game where first there is a title screen, and then when you press play you go to the game screen.
But I can't figure out how to create an app where there are such multiple pages/docs/screens allowing you to navigate from one to the next.
If you create one .fla file then everything seems to be on the one page. Maybe the way is to create multiple .fla files, one for each screen and then in some way navigate between them? (No idea how.) Or should you have one .fla file and create the different pages as points in the timeline (sounds cumbersome and awful!).
My question is how would you achieve the above, and what is the recommended and simplest way of doing it?
There seem to be very little resources and tutorials about creating AIR apps.
There's a lot of ways to do that, it depends a bit on the scale of your project and your knowledge level.
In 'basic' flash you simply could jump to a new frame or scene containing your animations.
I'm not recommending this for a game project, as a lot of things normally change in the making and adusting all the gotoFrame() calls can be a a pain in the ... , ah well, you know where.
A cleaner approach would be to make your animations/ screens into separate .swf files or pack them all into an .swc, where you can instantiate them from, when you need them. Don't do any scripting in here, but use a centralized controller instead, that will coordinate loading and displaying the screens. E.g., you may add a Loader() in your root to load and add new scene contained in an .swf or instantiate a class from the .swc.
Especially when writing a (2D) game, you should definately check out the Starling Framework for Flash. It requires some basic knowledge of object oriented programming, though. A lot of resources can be found at the big G using "starling framework tutorial" as search term.
It's using Stage3D as basis and this way is a lot faster than rendering your content the normal flash way. The api is using very similar concepts as 'original' flash, but is a bit different in the detail. If you are starting to learn OOP, you could start here as well and get used to Starling right from the beginning.
The scope of this question is a bit broad to be answered in a post, though.
I'd suggest you get going, and ask more questions, when you encounter a specific problem :-)
Good luck!
A newbie question.
I am a newcomer to Java/Android (even UI development) .
My test apps look a little drab even though they do what the intend to do (with respect to app functionality).
Apart from Java, what are other technology needed for graphic rich app (oval 3d buttons etc).
PS: I did a lil research on this before coming here and found most of the questions were asked with respect to game development.But I am not interested in game development though.
In my history of making nice looking apps it usually all comes down to positioning the buttons and other things nicely and making custom images for buttons. If you want to simplify some things try using LIBGDX's UI tools. They allow a somewhat simplified way to load in custom images and scale/position them according to screen size.
I'm trying my hand at making a platform game and have been thinking about what I would use to design levels.
I was thinking of using a tile palette that would contain the graphic tiles and their properties. And a similar palette that would contain sprites.
This way I could drag and drop tiles/sprites onto a grid and specify property values. This could all be saved to some kind of file that would be read by the game.
Without getting too into the details, is this a sound overall strategy? Is there anything major that I'm forgetting? Or perhaps there's a better method?
This is a rather open-ended question, but I don't think there is anything wrong with your approach. You might have to try a few things to find out what works for you.
When I make platform games I find it useful to be able to edit levels while I'm playing them, by adding in code to the game which allows me to select a graphic tile from a palette and paint it onto the screen. The behaviour is usually linked to the graphic for my games but you could paint behaviour as well. You then need code for your game to save levels as well as load them. Obviously, you would probably want to remove the editor before releasing the game.
I don't know how much experience you have with game dev, but if you're thinking about making a tile-based platform game then your best bet is leveraging existing libraries/tools to avoid "re-inventing the wheel". I highly suggest looking into open source libraries/tools because you can modify them to your liking. I've had some good experience with libgdx and AndEngine in which case both have TMX support which is a file format that can be used in conjunction with Tiled map editor. I personally like libgdx because it has javadoc and very actively developed, and also that it's a framework rather than engine which gives you more flexibility (although more coding in some aspects).
I am not familiar with creating android apps by any means. However my company is looking to have an app build up. First they would like to have someone design a custom UI for it. However most apps I use at least all generally have the same core UI look/feel which is something we would like to avoid. I have seen apps though that don't even remotely look like the rest. So I am wondering if theres any place to find out what the basic canvas of an android app looks like . Is there any PSD's anywhere for this? Not one hundred percent sure what I am looking for other than concepts at the moment, but we want to know that our concepts are at the least plausible. So if anyone knows any good resources Id be interested to know.
Not PSDs, but you should take a look at the newly launched Android Design site, especially the Building Blocks section to understand what is available out of the box for you. Pretty much all of the controls you can style pretty extensively if you're willing to put the work into it, but have varying degrees of built-in configurable styling flexibility.
Note that while there's something to be said for ingenuity and being able to stand out from the crowd, there's also the flip side of comfort and usability for the user that comes with a familiar look and feel. If you're looking to come up with your own custom controls, etc. and you're not even familiar with creating Android apps, I hope your company is willing to budget a lot of time for the steep learning curve (the learning curve of Android is not so bad, but adding a lot of custom UI on top of that is not trivial for a first project).
I've been through the Android tutorials - these do a good job of introducing how we can hand-roll an Android user-interface. Actually, I do not need that level of control right now... I'm looking for something simpler...
I'd like to make an Android app which will mainly contain a number of standard UI widgets, nothing particularly fancy. Having done some VB development a long time ago (yes, I know it's crap!) - I particularly like the ability to paint user-interfaces with an interface designer and then add in the relevant callbacks via the IDE. I'm using Eclipse, so for now solutions requiring net-beans or other IDEs are not particularly helpful.
I'm well aware that this practice often produces sub-optimal code, and less than beautiful interfaces. That's not really a concern here. I just need to produce a certain effect quickly in order to prove a concept. There will be plenty of time later on for optimization if my idea is good enough.
If you create a layout xml file you get "drag/drop" for the activity layout. It's not perfect, but you should be able to accomplish what you're asking for.
How you were used to VB development won't work out for you.
You will have to create your interface in XML, and put events to the objects by code. There is DroidDraw but it won't get you further then the plain inbuilt IDE of Eclipse.
When creating XML layouts think like it a HTML layout, nested objects, tables/linearlayouts etc...