Elsewhere there are things that we all miss, yet it takes just one to notice...

WebGL Demos

Okay, a new page WebGL Demos has been added. So far these have just been knocked up in CopperCube using the CopperLicht WebGL 3D engine. Very easy to use and for demonstration purposes, good for eye candy shows.

 

I’ve always tried hard to stay away from HTML, CSS and Javascript because I never saw the point when I’m a programmer that can do so much more than front end web stuff.

As time goes by I will be showcasing other engines such as LibGdx and Parallax3D.

So keep your eyes peeled…

Linux shell scripts

Another thing I’ve been playing about with for the last couple of weeks is automating stuff using shell scripting.

Wow! How much time can it save you by just writing a simple script.

There’s been loads of times when I wanted to backup my project. Not only can a small script do that but it can also rename and older backup file to something else as well. By just dropping a script into a directory and run it, I’m now capable of personal version control. Okay not quite the same thing, but I know what I mean.

I’m on the verge of now being able to run scripts to automatically update software on a remote machine too using ssl. So far I can package up various pieces of software (build them if needed too) and use the scp command to copy them to a remote machine. All I need to do next is to be able to run commands and scripts over ssl. Almost there.

This shell scripting is amazingly powerful.

Qt now works with the latest Android SDK/NDK

After a short time to install 5.9.2 of Qt and then without my fingers crossed even, I loaded up Qt and loaded one of the 3D Android compatible examples.

After the first build complaining about API level 1 I fixed that and ran it again. And voila! My phone ran it. All being very slow because it was that water demo one.

Woo hoo! Might be back to Qt for desktop and mobile app dev again.

Java vs C++ for 3D mesh building

A few days ago, playing around with LibGDX again I was getting back into 3D programming and created a very simple demo of a load of spheres and the camera rotating around the scene as below:

Which on my laptop ran just fine. It took about a second to generate all the meshes for each of the spheres.

Took bloody ages on my phone though, even though it’s a quad core 64 bit android phone. Approximately 5 to 8 seconds. Ouch.

None of this nonsense in C++ for starters. I know this from a very old project I was working back in the day. Procedural map generator. More about that here: PROCMAP DBP LINK

So for the last couple of days (actually on the evenings because of work), I’ve looked into creating a single sphere mesh and then duplicating it. In LibGdx

A minor problem to start off with is that a lot of LibGdx’s mesh generators have been deprecated and I don’t know how long for now, and I can’t find examples on how to use the new stuff. This would have made things easier, but that minor problem got bigger.

It seems that ModelBuilder only runs on the GL thread, so I tried the MeshBuilder. No luck there after trying to hunt info down on google, (Maybe google is hiding it from me :P) how to use the thing.

So I gave up, closed the project, might go back to it if the next step fails.

I’m waiting on a huge update from Qt. Oh! At this time it has finished downloading and updated.

The previous versions of Qt didn’t work with the latest Android SDK/NDK. Fingers crossed with this one…

Next…

A quick faff about

Faffing about with libGDX tonight, all in Java, I’ve realised yet again how simple it can be setting up sh.. stuff in Java.

I went straight into the 3D scene, two new classes, one as a controller for a demo scene setup and the first scene. The controller just does the timing which does zip at the moment. The second class is the ‘Screen’ which sets up my first screen. Really simple. A camera,  a cube and a simple motion.

I had to stop because of the time tonight. I really wanted to faff around with the mesh builder again and custom shaders. Gonna be some time before I produce those screens, but that’s coming up.

Android App for setting up devices

I started this last week sometime before the hackathon and finally got back on to it tonight. Most of my Android programming has been purely native C++, so setting up a UI is causing a bit of pain.

The first couple of screens are fine, actually the third screen is now, I click something and it loads up a new Intent. The first screen is just buttons, the second screens fetches devices that are not setup and displays those.

When a device that hasn’t been setup has been selected then the next screen pops up. I already know how to pass data from one activity to another so that’s not the problem. The issue at the moment is the UI layout. The first attempt threw all the widgets to the top of the display when it was run. Then I realised I needed to setup things up using layouts. So far so good, I’ve got all my inputs, some with buttons next to the text input field.

Most of my UI stuff has been laying stuff out and then resizing everything to the display and accounting for the aspect ratio. This is alien to me but I am getting used to it as I go along.

I know that on Android I can also use portrait and landscape modes, to which I haven’t yet sussed out yet, but I do know they use fragments. I’ll get to that soon enough.

The Android app is simple enough anyway, so there’s little need to fancy it up. It needs to do a few jobs only. And they are all using a basic UI and no graphics (yet).

There’s no time tonight to do the communication between the app and the server, but essentially it will assign the device to an area and a category and give it a name.

The following step from this will be assigning the playlist, which, erm, I do want to use thumbnails for.

EDIT:

Using the putExtra, I’ve sent the stuff I need to the new UI screen. I’ve done that before so it was easy this time.

Lesson learnt at my first Hackathon

At the Sprint24 Hackathon in Liverpool at Ziferblat I learned a lesson fast. My dietary needs and health come first over trying to do what everyone else is doing.

I’d already prepared myself by taking the necessary tablets with me in case of a minor hiccup, ie they had normal milk. But this wasn’t enough.

The team I was with at first had a great web interface designer and had no problems knocking up pages for the challenge we took. Two drinks of coffee and a smidgen of a dash of milk. One tablet to counter.

A few hours in and I was on my own. At that point I’d had two cans of fizzy ‘zero’ cans of pop. During the second can I took another tablet. I wasn’t feeling too good.

Whilst I was on my own and feeling rough on the inside, I starting to feel like I wasn’t getting anywhere, when one of the organisers came over. I explained my team had gone and that I had reservations as to whether they would be back, which they had told me would be tomorrow morning. This was about 4pm’ish. The organiser, I can’t remember his name but remember what he looked like, said he would hook me up with another team.

Very shortly after I was hooked up with another team and paired with the youngest of the team. A very smart lad he was and understood a hell of a lot. And a surprisingly enough, a very quick learner. We got on with investigating the challenge.

And then, pizza turned up. Which was my downfall. It was only one slice of pizza that took everything out of me.

Because of what the effects where to my body, and with everyone around me snacking continuously, I couldn’t speak out about what it was. Although the truth I did say, was I was zapped of energy and getting tired.

I also know that there’s alcoholic drinks I can’t have. One of them being lager. I must’ve had two before I realised for certain that there was no coming back from this. Two light beers would normally have no effect me. This was all adding up

All I did, was keep smiling the best I could. My brain had shut down on me and my normal mode of focus was shot too hell. Try as I did, I couldn’t get my body from feeling so rough and lethargic. I had to eventually tell the team I was calling it a day and going home. I’d rather tell them that rather than say I would be back in the morning and not turn up.

The day before, the missus had bought in some stuff that she would have prepared for me for this event, but I turned it down. These were all on my safe to eat and drink list and would’ve lasted more than two days.

Lesson: It’s not good for your health trying to fit in. Especially when you cannot eat or drink what’s to hand, when there’s a supermarket just down the road.

It’s 2am, I’m at home and I’ve not started to recover yet.

Good luck to all at Ziferblat Sprint24 Hackathon

Perseverance and a nice win

I’ve already got the media manager software completed, although it will get a huge face lift in the near future. I’ve also got a running server that at the moment does quite a lot of things. I’ve also got the player on the devices making solid connections. New devices show up in the file system and internal databases. All the servers responses are currently 100%.

Tonight, I got my android app communicating with the server. After a silly mistake, the app now fetches new devices from the server and displays them ready for the next step. All connections are completely over the internet and via TCP. Eventually, once all test have been completed, all the security will be put into place. I’m not even thinking about security just yet because the later I leave it before the final product, the more secure it will be.

Actually, that very last sentence has just got me thinking about security. I seriously need to start securing this right now. Tomorrow I will implement the initial security layer (which is configurable).

Still no code snippets, sorry.

And still a fair bit of work to get done.

10 PRINT "HELLO WORLD"
20 GO TO 10

Personal project update Wed 20/09/17

The player software I am writing which had a big refactor last night now sends its unique ID to the server. The server also now stores this without a playlist which can be picked up by the mobile application which I started last week, but tomorrow I will work on.

At the moment, the server does actually look through the internal database and responds to the client, which is working so far. At the moment it just responds with a zero playlist and closes the connection.

I was too busy to be adding the encryption which can actually wait for now.

The next step is to get the Android software to be able to create temporary playlists, pick up empty devices, duplicate other devices playlists and set a new device up. Just this bit will take a little while because the Android API is quite huge and I’m used to using Qt, not Android Studio.

What I ought to be doing, which is what I do at work, is to keep a progress diary. I’ll make a start on that now actually. This I can update every time I work on my own projects.

I’m happy with the progress so far because even though I get a maximum of 2 hours after work and maybe a little bit more at the weekends, this particular project is taking shape finally.

There will be one main PC piece of software that will control everything as well as a few Android apps that do their bits. The devices player and the server are the easy bits. Although through time, I’ll have to look at making this scalable.

Project update (no code snippets tonight)

My personal project has taken a huge face lift. The original player code has been stripped and split into two classes, the media client layer and the player itself.

The media client is the heart of the player which handles the communication with the server and supplies the player with its playlist. It’s still not compete by far, but closer to what I need it to do.

The player at the moment does zip all. The intention is to have it playing a media file and then check with the media client of any updates which will adjust it’s playlist. All previous tests of the media player have been running great.

The android app is still waiting on the above media client and its communication with the server so that I can move that one forward.

Basically tonight has been refactoring a lot of code. With a lot of testing in between. So far so good, but I’ve run out of time for tonight. Two hours isn’t enough.

I’ll need some time to do some Blender work soon also.

Posts navigation

1 2 3 4 5 6 7 8 9 10 11 12
Scroll to top