Saturday, 19 March 2022

2019 Week 2

  This morning my body pulled me awake early, I rolled over and ignored it. It's something I do a lot, it's something I need to get better at, there's too much to be done. I got showered and let the cat that had been meowing at me to get into the room I am currently borrowing. I nearly didn't let the cat in, but it's technically more his room than mine.

I got dressed and made my way to my old apartment in South Croydon, a long trip. Today I cleaned it out, threw away clothes and books and crap that I no longer needed or wanted. I made four bin bags full of stuff, and managed to get my possessions down to; a suit case of clothes, some books, a bunch of engineering and tinkering stuff (think LEDs, soldering iron, etc), picked up the Deviant Robot banner and was out the door. I didn't really feel anything, not even when I saw my now ex girlfriend had hidden away our pictures, not even when I was throwing away stuff that she had bought me.

My current living space is with a friend from university, his house mate is away for two weeks (his cat is not) so I have this space till that time. It's not much of a space however, so I have put some things at my desk at work, the books and the tinkering tools. The only things I left at my old place were an Xbox, a pair of hiking boots and my computer. I couldn't quite manage these things just now, but she is fine with them staying there.

The week started on Sunday I guess, when I told her that I didn't want to be with her anymore, that she had faults but I was unwilling to let her change them. I had been emotionally checked out for a while now, it was only happening this late because I didn't want her to be alone for Christmas. We had been going out two years. She was a very good partner, a good friend and we made a great team. I felt she was a trap though, I was too comfortable, too settled, no need to strive to do better or leave our little cocoon. I had named it a gilded cage, because no matter how nice it was, it was still a cage. I wanted more, I wanted great sex, I wanted long conversations and I wanted someone that stirred me into poetry. We never argued, we liked the same stuff, but I didn't feel she knew me... Which might have been my fault. I also didn't feel like we could have a conversation where it wasn't a zero sum game.

Let me explain; having a conversation should be a win win. Everybody should learn something, even if they are right, even if they are wrong. She never got that. Frustrated if someone had an alternative opinion, ready to regurgitate half read or heard facts and always along the three themes that shape her personality so completely. This was the big issue, every time she opened her mouth I knew where the conversation was going, and I didn't want to listen to it again.

I packed some things as she began to cry and take our photos down. I took the long route to Robin's house. I felt the sadness around the edges, maybe I was a bit in shock, maybe I just didn't like hurting her but it was the right choice. I met Robin for a beer, I watched him play Resident Evil (remake of one) then I slept (horribly) on his couch. I went to work the next day and we got started on the new year at Odd Tales.

I will skip over work, least said the better. I will work here for now, see if things improve.

Tuesday I tried to go to Hackspace in their new location in Wembley, but it was totally underwhelming... I wanted a hub of activity and cool projects, somewhere I could learn. I got a few guys in a half finished refurbished office. Maybe I will check back there later. I do want to make my robot, but I might have to learn on my own.

So we should talk about her. At this stage, she is funny, fun, so smart, nerdy and proud of it... She is hot as hell, sex is maddeningly good, but she is also the sweetest cutest thing I've ever laid eyes on. She looks at me all wide eyed and small mouthed, I crack, every time. She is a marvel. She is also a talented graphic designer and I feature heavily in her drawings. I've never met anyone who is perfectly what I want... Now I just have to wait and see if it sticks. Gods below, I hope it does.

I moved into Olly's spare room in a night of spliffs, DJ decks, pizza and video games. I had such a good time, I just hope it doesn't become habit... but Hey, it's only for two weeks. I deserve a little fun. I've been walking on egg shells for so long.

I hope I can write more of these, I hope I can get better, I hope they mean a lot to me someday. That's what she did, my ex, kept diaries... My memory has always been terrible, so this is clearly the best thing.

Until next week.

Saturday, 10 September 2016

Driving with your Face (VR)


The Set Up

 When I did Dino Party, a VR game for the Oculus Rift, we explored several control methods that just used your head. Now obviously we found out a lot, mostly what makes you feel sick. So I decided that I should recreate some of this fun nausea for the Google Cardboard.

 Then came the decision of which mechanic to use. The Cardboard doesn't have head tracking so several of the head bobbing and weaving games were out. The gyroscope is in there. To be honest tilting your head from side to side or nodding gets a bit tiresome. So I settled on using the player's focus as the main control method, that is to say, where they direct their gaze.

 Now you can freely download Google's VR package for Unity, it comes with a lot of extra stuff that it didn't used to, I spent a while deleting all the samples and demos from it. Then I set up a simple scene, I wanted to control a vehicle of some description through a simple yet increasingly difficult task.

 Mobile games have a strong grounding in endless runners and simple minimalistic art forms, I wasn't looking to do anything ground breaking, especially when I only have the weekend to prototype the idea.

 After a bit of rejigging, I got the basics of the Cardboard working and tested. Important as the SDK has been updated, best to check it runs a build before continuing on. Apparently it creates all the VR camera stuff at run time, instead of just having a prefab with all the rig and two cameras in the editor mode.


Gameplay Mechanics

 What we need is a stage, something simple that can always be within the player's line of sight, more like an arena than a race track. I made it round, so that the player has the added difficulty of staying on it, maybe I'll add some ice later... with the aid of collider materials.

 Then it's just a case of adding a rigidbody to a cube, and then we can start programing a few mechanics.

 The most important one is a raycast from the camera to the floor, this way we can make a target for the player's car to follow. Then I add a little check to restart the game if the car falls below a certain point (off the map), later I will replace this with a death screen.

 After a little fiddling to get the right raycast, and making sure the target follows the intersection of the ray and the collider, it was just a case of finding a nice method to move the little car about, I want to make it increase in speed and also to be quite unstable, adding to the joy. I don't want the car to be able to stop, so if it reaches the target it should shoot past it and spin around towards it again.



 I did have a little fun bug, where the raycast target caught the car collider and both flew towards the camera, raycast only works for floor tag now.

 Next up, getting some random collectables to spawn about, as I am just trying to make this quick they will probably be coins or something of the type. Add a little spin, and a trigger box collider and bob's your uncle. That adds to a global score. Now before I add some difficulties or anything fancy, let's do the UI system, I want to allow for quick playing and death, no extra scenes or anything... I think it would be also nice to have a few cars to choose from, might even have to unlock them.


Menu Screen

 I kept the camera in the same place, simply adding some more bits to the foreground to act as the menu system. I only need three UI buttons; Play, Exit and Switch Car (which will run through a list of cars) I haven't decided yet how I am going to block access to the cars, perhaps I'll disable the play button if you haven't unlocked it. I have put a boolean on the car, so it doesn't speed off after the title until the play button is clicked. It all resets to this point after death.

 Cardboard only has one button, so I used the raycast again, and if it detects a left mouse click, whilst looking at the UI element it will do the action. I do this by comparing the names of the objects it raycasts, not the fastest way but we only have three buttons, so leave me alone. Below is the view from your eyes, as you can see it's quite tricky, a good thing? Yet to be determined.



 I've also added in a floating text for the score, best and last... Last will update in game. I need to find a nice font, but all that arty stuff will come later.

 That's all I've got time for today... Later I will add events, that will change the arena and incorporate more things. A few examples might be;

  • Winter; a palette change and an extra skiddy arena 
  • Ramps and banks; get some cool air for extra coins
  • Multiple height platforms 
  • Scifi; do like to mess with gravity...
  • Enemies; might add some foes, bit boring though, I want the arena to be the only foe. 

 If you have any feedback or suggestions, do let me know. 

Regards,


Tuesday, 5 July 2016

Vivarium Automatica - The Plan

My Snake
Snake of the hour


I bought this beautiful orange corn snake over seven years ago, when I lived with my parents. She (defaulting to the feminine as she has never been sexed) is mild mannered and friendly, though she did once mistake my Mother’s hand for food.  She is also very inquisitive, my Father once had to dismantle the fireplace when she got loose and wormed her way into it.

I’ve recently moved into a place big enough to house my little snake, and luckily my house mates are just as excited to get a pet too. I could have left her with my parents, where she has been for the last two years, it probably would have been “easier”, but I could do with the company and she could probably do with a little more engagement. She has recently been having trouble shedding and a few years back she lost sight in one eye due to a cataract, so she deserves some extra loving.



Environment
Current setup at my parents
So the current vivarium, which I am going to use, is 1.22m long, 470mm deep and 520mm high. Notice that the entrance is quite a bit narrower. Currently there is a heat lamp, which is manually turned on/off and a heat matt that is almost certainly too old now. A non-digital thermostat is there on the hot side. Apart from that she has a little hide on the hot side and a giant log in the middle. A water bottle disguised as a rock is in the right corner with some fake plants.   






Structure
Structure brain storming

There are several issues that I want to address by designing a new environment. The first is engagement, corn snakes are by nature very curious, my snake hasn’t had a change of scene in a while, and if she has it’s been something unsubstantial like a new rock. The new environment should include plenty to explore and keep her busy.

To this end I am going to create a large structure out of polystyrene, grout and paint. Included in this will be several different heights and some tunnels into the main mound with a small hide within it. Also there shall be a small hole to put a water bowl in.

Next problem as I see it is the substrate, I didn’t like this newspaper stuff that my parents had got, much prefer something more organic, perhaps going back to wood chips. I was thinking of creating the polystyrene part to cover the whole viv, which would make cleaning easier, but decided against this because I foresaw problems with the heat matt. That and she does like to cut some shapes in wood chips.

When people do these sorts of projects, they usually stick the parts to the actual viv, which stops them moving around, or being moved. I, however, want to be able to remove the sections with some ease. How then to keep the little dear from displacing parts or even the whole thing? Sections will be cut into each layer and filled with some sort of ballast and I will devise some way to make the parts hold together, perhaps velcro.

Her little hide in the main structure will be kept topped up with moss, this will help her shed, usually in the past we have a separate box for the moss, I want to integrate this into the design. The hide will need to have a removable top, to allow for cleaning and replacing of the moss.

Oh yeah, and it’s going to be automated.



Tech
Brain storming systems

Did I read automated? Yes, you did. I have a Raspberry Pi, it’s been laying around for ages, waiting for a job. The system will have to be ready and working before the main structure is made, as wires and battery packs will need to be integrated into the polystyrene from day one.

The plan for now, is to have the Pi read the thermometer and keep the temperature right, for the time of day, based on weather data from the snake’s climate. This of course will have safety boundaries to stop it being uncomfortable. The Pi will also control the main lamp, meaning no one has to be about to manually switch it on/off. Now of course, you can buy timers, but these have to be set throughout the year to keep it in time with the season, and I am lazy.

When the lamp goes off, we should slowly and randomly turn on the LEDs embedded into the structure, these should flicker and glow to give a nice aesthetic effect. I haven’t decided yet whether to have them straight led lights, or to put them behind some coloured plastic, perhaps fake gems.

The slightly more ambitious side is to have the environment remind it’s idiot owner (me) to do several tasks; firstly cleaning (once every two weeks), secondly is feeding (one week~) and third is to replace the water. Now the first two can be done on a timer controlled by  the Pi. There could be a sensor in the water bowl, meaning that when it was low on water I would be notified. This does mean that would have to be built in, making it harder to clean the water bowl or recycle the old water. The other issue is, how will I be notified? A cheap and un-effective way is to have LEDs on the top that flash when something needs doing. I will think more on this and do a bigger blog post about the options.


Stretch Goals


I am a bit of a fantasist, I am trying my best to keep this project within scope. Here is a little brain dump of ideas I’d love to add but probably won’t!

Auto-Refill; The water bowl could be attached to a pipe system controlled by the Pi. It could take from a water tank (1L bottle?) to refill the water automatically instead of contacting me. This would mean however it would need to take the old waste water out to avoid stagnant water. Alternatively a waterfall structure could be made, which solves one problem but creates several others.

Misting machine; She has had trouble shedding before, she might need a slightly more humid environment. Though corn snakes are prone to lung problems if it is too humid. The mister could get water from the water tank and when the humidity gets below X for a certain amount of time it sprays a little.  

Camera; You can buy a small Pi camera, which I could embed at a proper angle in the main structure to give a live feed of her. But I guess what would be the point?

Internet of Things; The pi could communicate with me, either via email or by a specially designed app. It could notify me of things that need to be done. I could view stats like temperature. I could also look at the live cam feed.

Twitter; With all this information, I could create a program that does daily updates and pictures from the tank and posts them to a twitter account. I mean, why the hell not?

Regards,
Ian Thompson