Manually creating and editing D5 ClockSkins - Other SmartWatches

Hi all,
Firstly many thanks to Smartwatch Ticks for those excellent tutorial videos detailing what's in the XML files behind the ClockSkin faces on the D5 / Lem5 etc.
This sparked an interest in using something I discovered last year called Leo Editor (www.leoeditor.com). It's open source and written in Python. It's basically an outline editor. It has a tree structure and each node can contain text. However, the trick to Leo is that you can generate external files from any node. Also each node can be cloned and used anywhere.
This means that you can have a tree node which just contains the definitions of all your image arrays. If you want to use them for a particular face just clone the node again and paste it into your watch face structure where it's required.
The advantage with these clones is that if there's an error, once you fix it in one place, they're all fixed!
When you save your outline it writes all your generated files, creating new files for new nodes as required.
It doesn’t just support xml. It can be used to work with any language to break up code into manageable structures.
It's documentation which generates the code for you.
A concept called "literate programming".

I think there is already a software for creating android based smartwatches such as the D5.
It's called ClockSkinMaker created by @rromeroa

Clockskin Maker
Hi yes, I've had a look at ClockSkinMaker. I didn't find it very intuitive and I have been toying with the idea of developing my own that will include being able to edit the images, but for now I think I'll use it to test my faces and create them using Leo Editor.
Most stuff doesn't change anyway, it's just a matter of creating the new images, plus it makes it very easy to create a group of faces that have slight differences. Cloned nodes containing the desired "drawables" can easily be added in.
This enables very easy creation of several versions of the same face, but each one with slightly different features.
If a GUI was always better, the good lord wouldn't have given us bash!

richardtwyning said:
Hi yes, I've had a look at ClockSkinMaker. I didn't find it very intuitive and I have been toying with the idea of developing my own that will include being able to edit the images, but for now I think I'll use it to test my faces and create them using Leo Editor.
Most stuff doesn't change anyway, it's just a matter of creating the new images, plus it makes it very easy to create a group of faces that have slight differences. Cloned nodes containing the desired "drawables" can easily be added in.
This enables very easy creation of several versions of the same face, but each one with slightly different features.
If a GUI was always better, the good lord wouldn't have given us bash!
Click to expand...
Click to collapse
Ohh I see. Good luck then :good:

Related

HOWTO: save complex structures in a file?

hi,
I have a program and it has lots of settings saved in memory, when I exis the program I need to save settings in a config file.
My program has CString(s), CArray(s) and other basic int and DWORD varibles, so how can I save such complex settings?
Mohammad
as xml maybe
If you're using MFC you could always attach a CArchive to a file and serialize
Perhaps you need to either create a log file - for debugging purposes or save your settings to the registry. If its the former then, check this one http://www.codeproject.com/ce/GenericLogFunctionality.asp it should be helpful. If its the latter, then you just search codeproject and you'll find lot of tutorials on the registry. Also, you can use CEDB which is a flat table data base that can store many data type structures including files and images, use it if you need to.
It may seem like you're lost now, but you can take an overview about the cons and pros of each technique so as to choose the best one for you.
For my config file I use plain english bounded by my own tags. I use a character sequence as a seperator for lists. I convert numerical values into text that can be human readable. There are some benefits to being able to read and edit it manually if the need arizes. I also made a class purely for writing and reading from my config file. Now when I to use a config file I can just drop that class into my project.
XML sounds good and similar but it would require a greater knowledge of xml.
Registry is easier and faster to do/execute but for data that can potentially grow too much it is probably best to keep it out of registry.
Is CArray serializable? do we just simply use CArray::Serialize and it will dump all included objects into a file?
thanks
http://msdn2.microsoft.com/en-gb/default.aspx
this site may be helpfull while you wait for somebody to answer your question
If you can it would be easier to use CObArray and ensure that the array members are subclassed from CObject with the DECLARE_SERIAL / IMPLEMENT_SERIAL macros. You could also add a new << operator to the CArchive class and write the serialization routine but that would kinda defeat the object I guess.
I solved the issue using serialization, for CArray structures I used the following method:
File<<MyArray.GetSize();//store how many objects
for(all my objects in the CArray)
serialize them one by one
I did the same when loading and it works flawlessly.
Thanks all for your help

Free Common Dialog available

My experiences last year with building an open file dialog into GSMbeam made me want to have a more reusable solution. So I present my common file dialog here for any one to use. It is a open file dialog and a save file dialog. You just need to get the base class from my site and have a look at the example code to use it. It is very easy to use if you already know how to dynamically load a dll at run time. The dll exports 3 functions. One instantiates an object of the base class, one destroys it. Very easy.
The dialog is a big improvement on my previous one. It has search capabilities and it better adjusts to screen orientation ( I can't test for vga devices sorry, but it should work). It lets the user interact with the file system and returns a full path of their desired file to open. for saving you can suggest a file name (and path) and the user can just accept it or choose another. The save dialog then returns their desired path. The starting directory can be specified in both modes. The art is nice looking and intuitive.
I provide a small app for those who can't be bothered to code it but just want to have a look. All it dose is load the dll and demonstrate its functionality.
Lovely work!
V
Hey dude it sounds great. Unfortunately, the link is down, so it doesn't look great yet
Anyone has a copy ?
yea right man
the link is dead....pls be informed if there is new link...Alive

getting a single xml node

Hi guys I'm newbie to android development and I need some help...
I want to make an app that will use data from an xml database and there are two points where I need help cause I find java with xml too complicate...
eg.
Code:
<items>
<1><name>box</name><price>2.00</price></1>
<2><name>pencil</name><price>1.00</price></1>
</items>
1)get a single xml value from a child node(eg.name of 1st item - "box")
2)get an xml database from child nodes (to use it as data source for a listbox) - this one is not nessesary
Thank you for your time guys...
I had never used xml in my programs before android either, so when starting off I found xml a little uncomfortable and found myself wanting to avoid it too. If you take the time to learn how the different xml files are used and how these objects can (easily) be used in your code, I think you'll see why its a lot better to just go with it. It helped things click for me when I understand that every xml object/attribute has a related java object/setmethod, which made me realize how much more organized and simple my code was using the xml.
I don't fully understand what your asking how to do, but it sounds like your trying to "swim upstream" by developing your own system of xml instead of using the android xml namespace. I would recommend doing some reading at developer.android.com, its really not too hard to get your head around and I think it will make your development go a lot more smoothly
Hi guys its me again. I send a lot of hours on searching about an easy way to use xml...
The easier way I have found called DOM but I have 2 questions:
1) how to load files from an android project easily(refered with less command line and without using inputstream)
2) how to use xpath to easily navigate on android
Prefered to see some examples...
Thanks 4 all...

[Library] BobEngine - Easy to use 2D game engine for Android

Hello, XDA!
I have created my own 2D game engine that utilizes OpenGL and sports many features to help make programming 2D games for Android as quick and simple as possible. I created this engine for use in my own projects but then I thought why no make it open-source? I think other people could benefit from this and input from other developers could help fine tune this thing so it's as good as it can be.
So I gave my engine the name "BobEngine" after my online alias and uploaded the first public release called "BobEngine 1.0 Thingama" to GitHub. That was months ago and now I've finished working on the next update: BobEngine 2.0 Shishka.
I've got a post on my website detailing what's new in update: http://www.bobbyloujo.com/2015/01/bobengine-20-shishka-update.html
BobEngine uses a similar structure to GameMaker games so if you've ever used that you may be interested in BobEngine. BobEngine uses a specialized BobView to display the content of Rooms. Rooms are collections of GameObjects which each have a graphic and attributes such as x and y positions, width, height, angle, frame, etc... Rooms and GameObjects also have step, newpress, and released events built in. The step event happens each frame, the newpress event happens when a new pointer is touched on the screen, and the released event happens when a pointer is lifted from the screen.
There are many other tools included with BobEngine and the best way to start learning how to use them is have a look at the examples that are included! In the GitHub repository you'll find an Android Studio project called "BobEngine". This project contains the "bobEngine" library module that you'll need to include in your own projects if you want to use BobEngine. Also in the BobEngine project are modules for each of the included examples. Currently there are examples that demonstrate the structure of a BobEngine game, how to use input from the touch screen, and how to manipulate the camera. I'll be creating more examples in the future to show off all the things you can do with this engine!
All the methods and data members in BobEngine are internally documented and the examples include a lot of internal documentation to help you out as well.
I'll keep updating the library with new things as I think of them. If there is anything you think should be added go ahead and post about it in this thread.
Benjamin Blaszczak
a.k.a. Bobby Lou Jo
@Bobbyloujo on Twitter
Edit: Forgot the GitHub link: https://github.com/Bobbyloujo/BobEngine
@Bobbyloujo
Thanks man will try this today and welcome 2 xda :highfive:
Thanks sir...pls give us some game template made from your lib
Great job man. It looks great.
I will try as soon as possible
Sylvain
Thanks man. Will surely try it out. good work.
Awesome, just what I've been looking for. Thanks!
nice work, and thanks for putting your time and effort into it.
Could this be used to recreate "biomenace" for android?
Thanks everyone!
@berlyshells Anything you want to see in particular? I could probably throw together a Flappy Bird clone real quick or something...
@verbuyst It certainly looks doable if you put the time and effort into it.
Bobbyloujo said:
..
Click to expand...
Click to collapse
im not really looking for anything in particular..probably any game source with comments (of the functions/what for is this code etc..) inside the code would be nice haha i just requesting but its you're choice sir im sorry im just a newbie
TIA
A new example has been added to the repository per @berlyshells request. This example is called Jumpy Bug and it is a Flappy Bird clone. It demonstrates what a full game programmed with BobEngine looks like.
Bobbyloujo said:
....
Click to expand...
Click to collapse
thank you very much sir..you are indeed a good hearted person..this is what i really love on xda
While working on my most recent project I made a few changes to BobEngine. The changes have been uploaded to GitHub.
Changes:
The extra functionality provided by BobActivity has been moved to a new class - BobHelper. A BobHelper can be used by any activity. When using a BobHelper, be sure to call its onResume() method from your activity's onResume() method. BobActivity still functions the same way it did before. BobHelper is useful for when you want to use some other kind of activity has your application's main activity but still want the extra functions from BobActivity. For example, if you want to use BaseGameActivity from the BaseGameUtils library for Google Play services.
SplashActivity has been totally changed because, frankly, it sucked before It is now an abstract class. Create your own activity for showing splash screens and extend SplashActivity. Implement the setup() and end() methods. In the setup() method, call addSplash(R.layout.your_splash_layout, time_in_ms) to add a splash screen to show as defined by an xml layout. You can add up to 10 layouts. Add them in the order you want them to show. The end() method is called after the last splash screen has been shown. In the end() method, start an intent for your main activity and then call finish() to close the splash screen activity.
Other small changes.
How many games have made using library? Looks cool)
Thanks..I tried AndEngine and it failed to import on my Android Studio.
Marshal3 said:
How many games have made using library? Looks cool)
Click to expand...
Click to collapse
Uhm... about three. There's Plane Popper, Crazy Taxi Driver, and I just finished Bounce the Beach Ball. Other than that, I've made a few examples that you can find in the repository - including a Flappy Bird clone. Also, I've been working on a platformer.
basil2style said:
Thanks..I tried AndEngine and it failed to import on my Android Studio.
Click to expand...
Click to collapse
Let me know if you need any help with BobEngine!
Hello again, XDA!
I've updated BobEngine again. This update brings the following major additions:
Gamepad support! You can now get input from any standard gamepad using BobEngine. A new example has been added to the Android Studio project that shows and explains how to use this new gamepad support. The example is called controllerexample.
Multiple quads per GameObject. Up until now, a GameObject consisted of a single textured quad (well, two triangles that form a quad). Sometimes it is useful to have many quads grouped together. If you use this, note that all the quads for each GameObject must have the same graphic. This is a very niche feature that I added for a particular purpose but didn't end up using myself. If you'd like an example of what can be done with this, let me know and I'll make one.
Some other miscellaneous stuff has been changed as well. It's been so long since I posted an update that I forget everything I changed! One useful change I made was to the camera features. Rooms now have their own camera values, meaning if you change the camera in one room, then switch to another and change the camera there, then switch back to the first room the camera will be where you left it in the first room.
BobEngine can of course still be found here on GitHub: https://github.com/Bobbyloujo/BobEngine
Here's a video showing off gamepad support: https://youtu.be/vRdaaaJnqGk
As always, if you have any questions feel free to ask. Also, if you've made anything with BobEngine I would love to see it! Whether it's something big or something small I'd love to see how others have used my engine
If you haven't already, please follow me on Twitter. My handle is @Bobbyloujo and I post updates about the games and things I'm working on there pretty frequently. Right now I'm working on something pretty big!
Another new update today!
Changes:
* TextDisplay object added! TextDisplay is a GameObject that can be used to output text! Text can be centered, aligned left or right. A new example has been added to show how this new object can be used.
* A new 'visible' attribute has been added to GameObjects. Setting gameObject.visible to false will cause the object to be hidden so it isn't drawn.
* The getAngle() function in Room.java was broken. It has been fixed so now getAngle() and getAngleBetween() both work properly.
* The getRatioX() and getRatioY() functions sometimes would not work properly on some devices. This has been fixed.
* When using multiple quads per GameObject, the performance has been increased. This was done by collecting vertex data from the quads in a way that does not require the concatenation of many arrays.
As always, the repository can be found here: https://github.com/Bobbyloujo/BobEngine
It'll really help me out if you follow me on Twitter: https://twitter.com/Bobbyloujo
And like my Facebook page: https://www.facebook.com/BobbyLouJo
If you have any questions or would like to report a bug, please leave a message in this thread or PM me on XDA, Twitter, or Facebook.
Have a great week!!
Version 3.0 Bobsled
It's been a while, but in the time since my last update I've added a lot of new things to BobEngine. Since it's such a big update, I'm giving it a new version name: v3.0 Bobsled. Here goes:
RoomCache - In BobView.java you will find a new static class called RoomCache. As the name implies, RoomCache is used for storing and retrieving instances of Rooms. The nice thing about RoomCache is that you can call getRoom(Class roomType) with any class type that inherits Room and the function will return an instance of that room type, even if you haven't manually added a Room of that type to the cache. The function getRoom(...) will search the cache for an instance of roomType and return it if one is found OR it will create a new instance of roomType using reflection and return that. You'll also notice that there is a getRoom(Class roomType, Object... args) function. If you have created a room type that takes parameters other than (BobView view) like a default Room does, you can use this method to pass the required arguments to initialize a new instance of that room type if need be. The cache holds a specified max number of Rooms. When the cache is full and a new Room is added, the oldest Room is removed. You can make your own RoomCaches, but each BobView has it's own cache with an initial size of 3. To access it from your BobView, just call getRoomCache().
Along with RoomCache, BobView has received two new goToRoom overrides: goToRoom(Class roomType) and goToRoom(Class roomType, Object... args) for switching to rooms retrieved from the RoomCache.
Input events (newpress, released) are now handled on the main thread (same thread as step event). Handling game logic on the separate input thread was causing a lot strange glitches in my games when values were being changed when I was not expecting them to be changed. Now, input will be handled on the same thread just before the step event.
For even more convenience and even quicker game development, a new constructor has been added to GameObject: GameObject(Room room). This will automatically assign an instance ID number AND add the object to the room. What typically looked like this before:
Code:
GameObject object = new GameObject(room.nextInstance(), room);
room.addObject(object);
Now looks like this:
Code:
GameObject object = new GameObject(room);
So simple! The old constructor is still there and behaves the same way for those who want it and for backwards compatibility.
Setting GameObject.visible to false will now hide all Quads belonging to that GameObject. This will not change the Quad.visible field for any Quad. Also, similarly to GameObject, Quads are now added to the GameObject when initialized.
Animations can now be played once and looped for a limited number of times. animationFinished() will return true when an animation has finished playing.
Animation class - a new class has been added to GameObject.java. This class can be used to predefine animations with a start frame, end frame, fps, and loop times.
Previously, I was using 3 coordinates for each vertex. I learned it's possible to use only 2 in OpenGL. Since the 3rd vertex is not needed, I changed the code to use only 2 vertices. I'm not sure if this actually caused any performance improvement.
Graphic.Parameters class - A new class in Graphic.java allows you to predefine Graphic parameters to use with GameObject.setGraphic(Graphic.Parameters params). Useful for when you want to switch between graphics on a GameObject often.
A new method in the Graphic class called setDimensions(int width, int height) allows you to set the height and width of the DPI level image you want to use for setGraphic(Graphic g, int x, int y...). Previously, you would have to use setPreciseGraphic(...) if you had different sized images for different DPI levels that have multiple graphics on them.
Set the color intensity of all GameObjects on a specific layer using Room.setLayerColor(int layer, float r, float g, float b, float a).
Graphics management (this is a big one):
The Room, Graphic, and GraphicsHelper classes have been updated to improve and simplify management of graphics for large games. A new GraphicsHelper.cleanUp() method makes it easy to manage graphics. You can choose points in your game to call cleanUp(). When called, Graphics that have not been used recently will be unloaded and removed from the GraphicsHelper. Graphics have a new public field called 'persistent' which when set to true will cause the graphic to remain loaded when cleanUp() is called. All non-persistent Graphics will survive through a set number of cleanUp() calls before they are removed. If a Graphic is removed but then a GameObject tries to use it again, it will automatically be re-added to the GraphicsHelper and reloaded.
You can also manually call:
Graphic.load() to load a graphic after is has been added to the GraphicsHelper.
Graphic.unload() to unload a graphic
Graphic.remove() OR GraphicsHelper.removeGraphic(Graphic g) to unload and remove a Graphic from the GraphicsHelper.
OKAY, I think that's just about everything. I actually had to look through the changes in the GitHub commit to remember all the things I've changed xD There are a few other small changes but I didn't think they were important enough to list. Now I want to ask you guys something:
Is there any interest in a full-blown tutorial series for BobEngine?
I could start with the basics, then explain more advanced features like graphics management. I could also take requests for certain tutorials. I could even cover general game development topics and how to implement them with BobEngine. Doing this would be a lot of work so before I dive in I really want to gauge the level of interest in BobEngine. So far, it's been difficult to tell how many people are interested because I haven't gotten an overwhelming amount of replies here but every once in a while I get a PM or email asking for help. So if you're using BobEngine raise your hand!
And of course: if you've made anything with BobEngine I would love to see it! I've seen a few things and it makes me happy to see you guys using getting some use out of my engine.
Thanks for your time! If you have any questions, just ask. You find any issues with BobEngine, post them here or on GitHub and will fix them. Also don't forget to let me know if you're using BobEngine!
Once again, the repo can be found here: https://github.com/Bobbyloujo/BobEngine
Thanks again,
Ben a.k.a. Bobby Lou Jo
Twitter: https://twitter.com/Bobbyloujo
Facebook: https://www.facebook.com/BobbyLouJo
you are great and i should more from you
I am a new man in the electronic area, and you have developed your own staff, you set a good example for me.
Jackiefire said:
I am a new man in the electronic area, and you have developed your own staff, you set a good example for me.
Click to expand...
Click to collapse
Thanks! Your support means a lot.

RTL smartwatch change os- editor?

Hi i have Microwear U9 use RTL8762D cpu and Mactivepro app. is it possible to change os or have watchface editor?
attach an any watch face file to understanding format of it. too much chinesse models but mostly just a clones of each other.
How can i learn watchface file format?
actually it's a complex task.
- at first, you must be able to write some peace of code, at least to disassemble/assemble watch face file ("wf" below). you not required to be a super programmer, but ability to write little app you must have. of course editor with gui wold be more preffer
- you must separate frame (image) blocks (even without decoding for beginning), to understanding where it begins and where it finishes. not for each frame, but you must investigate a logic of a placement.
- you must find the pointers to frame blocks
- investigate structure of frame block descriptions
- now you may try to decode frames
- analyze header structure
- make a simple viewer for this format and try to use it for as many compatible wf'ses as it's possible, to be sure what you can read it all correctly
- try to make a writer and test your results
- polish the editor.
a good practice is a learn an any already described formats, even not compatible. at least you'll got a basic understanding how it works. for sample, I'd described one of the easiest here https://forum.xda-developers.com/t/...face-structure-direct-connect-via-bt.4502303/ read an "about watchfaces" spoiler.
if you still want to investigate a wf format of your watch, I will give you some cues/hints/helps, but would not make all of it for you.

Categories

Resources