It is ok to fail #7DRL

After noticing some Twitter friends were taking part in a seven day rogue-like challenge I decided to give it a go, knowing that I would fail from the start. I have a 6 month old daughter who takes up all of my time but I do have the odd hour to dev at night… rather than sleep!

My idea was a simple rogue-like, as you play and level up a random island that you start on grows in size and spawns new items and resources.

I created a simple chunk manager which only held one chunk; an array of tiles. Each tile has a texture(s) and also a box2D collision box. I decided to use box2D to manage the collisions rather than roll my own solution.

Found a nice Tileset on Open Game Art and started replacing water and grass tile placeholders; made a good start at using all of the tileset:

Made a start adding random items to the map (trees) and notifying the objects of collisions via box2D collision listeners:

Screen Shot 2017-03-16 at 00.34.48

Given I was only spending an hour or two each evening working on this I made some decent progress and made sure the code was clean and efficient, only actually managed 3/4 days out of the seven but am happy with what I got done and will work on this along side other prototypes.

I enjoyed starting a project from scratch and learning more about box2D collisions, there are some great tutorials available at iForce2D, worth checking out. There is no harm in starting something you know you will fail from the start given you learn by doing so.

Hacking my baby cam (Motorola MBP853)

Late August my daughter was born, I bought a wifi webcam to put into her room, one which boasted a feature packed mobile phone app for remote viewing, pan, tilt, room temperature and more.

motorola-focus-85-wi-fi-camera

The mobile app to control this webcam was broken from day one, the service did come back online a few days later and has worked quite well since but I had to question what I would do if the camera connectivity software failed.

I decided to find out how to use the camera as a dedicated IP device, there was no information from the manual or the supplier so I went digging.

 

Find the IP
My first step was to check my router maintenance page to identify the device IP address, this was the only unknown item in the list:

Screen Shot 2017-01-11 at 22.07.21.png

Using the Mac Network Utiliy I scanned the IP and discovered a web service on port 80:

Port Scan has started…

Port Scanning host: 192.168.0.30

Open TCP Port: 80     http

screen-shot-2017-01-11-at-22-07-55

Test Page
After playing (tried a few obvious page names) about I discovered a file “http://192.168.0.30/test.html“, this appeared to be a test page for the webcam, probably used at the factory to ensure the camera is fully functioning, although the video did not load I was able to move the camera, although the move function had no auto stop and the servo sounded like it might break!

screen-shot-2017-01-11-at-22-08-54

Clicking the centre arrow stopped the camera from trying to over rotate, at this point I was a little worried that a page existed with full access to a camera which would be pointed at my child, all you needed was access to the local network.

Viewing the source of the page its quite easy to see the available functions and how to control the camera:
screen-shot-2017-01-11-at-22-10-36

The send_command function code: AJAX_get(‘/?action=command&command=’+ cmd)

The video player which did not function showed us the URL required to watch the stream although it is hardcoded “rtsp://192.168.193.1:6667/blinkhd”.

screen-shot-2017-01-11-at-22-11-12
Updating the IP I was unable to view the video as it was secured, I put the URL into Google and came across an article with much more detail about hacking the a similar Motorola camera http://atom0s.com/forums/viewtopic.php?t=45

Wifi Setup
 It is possible to configure the network settings via wifisetup.html:

Screen Shot 2017-01-11 at 22.28.33.png

Viewing the Video on a Mobile

The article tells you that the video can be viewed if you pass the credentials: rtsp://user:pass@192.168.137.36:6667/blinkhd

The Real Time Streaming Protocol (RTSP) is a network control protocol designed for use in entertainment and communications systems to control streaming media servers. The protocol is used for establishing and controlling media sessions between end points.

wikipedia

Searching the Apple App Store for RTSP you will find several viewers, adding the correct URL to the app I installed on my iPhone made it possible to view the camera feed, while a username and password was required it was very insecure and every device would have the same config.

image_uploaded_from_ios_1024

Conclusion
I now have a method to use and configure my webcam without relying on the Hubble software, this is especially useful when the service is down or if it is every pay to use.

The device needs to be made more secure, I will look into changing the username and password or contact the supplier to see if they will provide firmware updates, these test files should not have been left on the device.

I have the option to use the feed on a spare monitor in my study which will be useful or even produce my own apps.

 

 

 

#Octobit Pixel Art – A month of pixels

I have been away from game development for a while, created the odd pixel art for the daily challenge but have had other work keeping me away. With said work about to finish I can finally get back to the hobbies I love, pixels and code!

To celebrate my return and to get back into the creative mood I am going to give #Octobit a go (31 days of pixels). I will try to throw in some simple LibGDX browser protypes along the way.

I have had a look back at some work I am most proud of:

Scuba – I made this in about 15 minutes, its one of my more viewed pieces due to being shared by 8BitPorn.
View on Twitter

When Ron Gilbert re-tweeted this think I smiled for a week!
View on Twitter

My first game attempt, part wrote my own Java server which cost me some money (AWS free is not free when you thrash the bandwidth) one day I will revisit this game but it will not be multiplayer.
View on Twitter

Ben Porter’s Moonman for Pixel Dailies – you should take a look at Ben on Twitter, look forward to playing this game!
View on Twitter

Was a big fan of Nucleur Throne and Vlambeer pixel art style
View on Twitter

Really loved the Lion King movie, starburst colours for pixel daily.
View on Twitter

Next project – Working on a simple browser game, a tiny island that grows as you progress. At the moment just an art concept and small amount of code.
View on Twitter

Wales Games Development Show 2015

#WGDS15 A games exhibition set in the Welsh capital celebrates it fourth year and a great array of talented game designers/developers. Full details of the event available at the website: www.walesgamesdevshow.org/

I missed the previous event so made sure to book on early this time around, a developer I follow on twitter @xiotex was running a beginners Unity course so I signed up and really looked forward to attending. I have always developed games in Flash and Java, trying Unity a few times never got into it so this was a chance to revisit the framework and meet up with a great dev. You can check out Byron’s latest project here: caretaker-game.com

unity_tutorial

Byron’s Unity tutorial in full swing

I really enjoyed the Unity tutorial, I do find using a GUI odd being so used to plain text editors but it was fun, I plan on learning a little more and using the tool for a game jam in the near future.

After the tutorial session I was ready to check out some of the games on offer, before I entered the main hall had a quick look at some retro kit, the stall was run by Super Tomato who are situated in Cardiff. The guy on the stall was really helpful and gave some great advice as I am looking to buy a Mega Drive, will be stopping by their shop soon!

CH3TWafXAAAqRxW

I then had a walk around the main hall to see what was on offer, there were some great games to check out, all the developers and artists were friendly and keen to show off their work, here are a few of the games I saw.

Theo and Lizzy
A game by Peter Harries and Ollie Elliott, really enjoyed this game which is a constant runner with only one button, you swap between floor and ceiling running to collect gems and find the exits. A cool feature of the game is the entrance remaining open so a few wrong clicks and you are back at the previous level! Not usually a fan of these games but this certainly has a new take on the genre, great visuals and music made this one of my favourite games of the day.

CH3zWseWEAATKoy

The old Gods are Dead

In this narrative driven PC game set in the Cuban Missile Crisis you play your way through multiple choice tests in an attempt to secure a place in a secure bunker. Played a 20 minute demo which was entertaining, in one scenario you were asked if you would have killed Hitler given the chance to time travel, each answer prompts the narrator to comment on your decision.

Check out the team behind the game on Twitter: National Insecurities

CH3oQLGWsAA04ll

Friendship Club
A multi-player shoot um up by Force Habit, did not get a play of this but watched for a while and looked like loads of fun. With a maximum of 8 players there was much carnage as the fun looking characters dodged projectiles including there own as they bounced around the level. On dying there is a chance to spawn as the “finger of God” and squish your opponents.

CH3qk73WIAApqwI

Solitude
“Solitude is a coop multiplayer survival game by RogueVec. Played from a first person view, you play as a crewman of a ship lost in space. How far will you go?”

This game looked great and sounded very interesting, you find yourself light years from home and on a mission to return. With lots of rogue elements no two journeys will be the same, work in co-op as a crew dealing with random encounters, abandoned ships and much more the game will actually ensure adventure and balance by helping out struggling players and challenging those on what appears to be a simple flight home.

CH37TkmWgAA5A1P

Overall a great day, was great to see the game dev scene in Wales is on the up, £10 well spent for sure, will be back next year!

Ludum Dare 32 – very late write up

Been very busy lately and actually playing some games so this is a very late write up. So I took part in Ludum Dare 32 which was a great experience, many ups and downs but eventually had a playable demo at the end.

I am glad to have entered and submitted a game to LD, very pleased with my overall position of 152/2821 – I will be back and hope to improve after not giving this jam 100%.

write up by @Wraithkalhttp://wraithkal.info/light-of-the-living-dead-impressions/

LD page: http://ludumdare.com/compo/ludum-dare-32/?action=preview

Day One
I was well prepared for the jam, stayed up to find out the theme then went to sleep hoping to get up early and start developing. Living in the UK means the competition starts around the time most people would be fast asleep. Got out of bed 9am, sat down and started coming up with some ideas but soon felt put off by the theme (unconventional weapon), it was my wife who gave me the torch as a weapon idea so I ran with that.

Had been playing with a random dungeon generator recently and wanted to re-write and implement this into a game, took me a few hours to re-write the code. I then added a moving character, gave her a torch which rotates to point at the mouse cursor. Was going well at this point and felt pretty happy with progress, next I recorded some sounds and added in some basic enemies that didn’t move plus took advantage of Box2D to have a decent cone light:

Day Two
Day one had gone pretty well and the game was already shaping up quite well, I had a clear plan of features needed to complete so that I could submit to the Jam, this is where things went wrong! I just didn’t feel the game was worth continuing and it just didn’t feel fun (came #139 in fun category), I wasted most of the day watching T.V, later in the evening I thought I should at least try to get a prototype that could be submitted and got back to work:

Day Three
Monday came and I had a full day of work before I could get back to working on the game, I sat down in the evening with 5/6 hours to submit. Once you miss that 48 hour deadline you are then competing with groups of people which makes placing high much more of a challenge. I managed to implement levels and a basic upgrade system to add some feeling of an actual game, improved the mood of the game by tweaking the lights and sounds. Created another enemy type and some collectable HP and torch power, but this was the end of the compo and I had to submit the game with no boss fight which was disappointing.

Here is some gameplay from the game, I wont be making further changes to the game but learnt some valuable lessons over the 3 days, next time I will stick to the idea and work through any doubts.

The Meatly Game Jam

Super Meatly Boy

SMB

https://carelesslabs.files.wordpress.com/2015/04/b078d-1424096640445.png?w=646

#MeatlyJam ran March 27th to 29th and was organised by themeatly, all the details and submited games are available on meatlyjam.com

The Meatly is a game dev themed comic well worth a look!

False Start

I had planned to take part in the jam for some time and retweeted all the hype before the jam started, was looking forward to making a “Super Meatly Boy” style game, then for some reason missed the start of it! I will put it down to over excitement.

Screen Shot 2015-04-01 at 02.58.40

Anyone who knows anything about game jams will realise 4.5 hours is a lot to miss and on top of this I wanted to use a new framework. I did a quick Google search and found Processing JS, it looked interesting and what is 4.5 hours and learning a new framework anyways. So in true Meatly comic book style I set about developing, but wait you need a local server running to test javascript games. Quick download of WAMP and I was up and running.

wamp

Coding

Hello Web! Nothing stopping me now I was reading example code on one screen and hammering out code on the other (Notepad ++). I say hammering out code what I mean is setting up an array of tiles and a hero class.

I had hand drawn some levels a few days before the jam, using Super Meat Boy as a test case, to catch up on time I decided to use these drawings as the game idea.

SMB levels

Early prototype, working out keyboard input and rendering.

screenshot

This would be the only image made during the whole jam (a tiny meatly boy), everything else you see uses framework methods to draw coloured shapes. I must admit when I see teams of people working on jam games I am a little envious, while having total creative control is great being able to delegate would be amazing.

screenshot

I quickly realised I would need two game modes, normal and edit, I now sit here and realise I should have coded in a button to toggle between modes not change hard coded values! Anyway I added the ability to click to add blocks to the screen the press a key to output the array.

While edit mode had a large array of tiles, some of which are empty, the final array for the level ignores the empty tiles, I thought while the game might look awful lets make sure it runs ok.

Lost Time

At this point I went to help out a neighbour, after some builders let her down my father in law and myself have been helping her out, so I spent 90 minutes cutting patio slabs with a large disc cutter in the cold, wet and wind.

It is frustrating to lose time during a jam but real life has to come first and you can always cut the game down in size.

Level Design

With the key mechanics in place I flew through the level design, adding obvious features every few levels like pause, restart and a timer. If you ever have a play with Processing JS then you will find its fun but limited, if you have time you will achieve anything but out of the box you write pretty much everything from scratch. All the physics and collisions are custom, I did not have any help in that respect. I used the SMB level case study to help me through the levels, I failed to add the 20 I wanted to but 15 is respectable.

More failings but some success

So i had a lot of fun learning ProcessingJS and had a nice little working prototype, some of the code was written so quickly I am not even sure how it works! I thought the jam ran right through til 12pm but once again checking details had let me down, I had planned to add bugs into the game which could be fixed by collecting fixes in the levels but this was cut.

Most disappointed not to have included sounds, music and a boss at the end of the game but I did add a total timer, bug fix count  and death counter so people could share times.

Thanks for reading and please check out all the submitted games on MeatlyJam.com!

ps. A big thanks to Mr and Mrs TheMeatly for holding this great event.

LibGDX – Simple action replay

I have been working on a “2D platformer” and while there are lots of basic features to finish I fancied something a it fun. The first time I saw a replay of gameplay was probably “Striker” or “Speedball 2” on the Amiga 500, I should imagine it was quite difficult back then. Memory not being an issue now I thought it would be simple enough to implement.

Featured image

Action Replay System
frames are the key to animation, so I would capture enough information at each tick and store it in an array of frames. The hero co-ordinates and current texture would be needed along with the current time. I already have a timer class which works as a basic stop watch.


public class Frame {
public float x;
public float y;
public TextureRegion frame;
public float time;
public float delta;
public int frame_rate;

public Frame(float x, float y, float time, float delta, int fps, TextureRegion frame){
this.x = x;
this.y = y;
this.time = time;
this.delta = delta;
this.frame_rate = fps;
this.frame = frame;
}
}

Replay Class
This class contains the array of frames which you add too every tick of your game. I have conditions to adding a new frame like… “if timer.running”, when I hit the goal hitbox the timer stops and frames are no longer added to the array.

I then have a simple if replay is true test then call the tick and draw methods of this class. Tick will push the frame onto the next in the array until it reaches the last frame and draw will output the hero, a tooltip and the current time to the screen.


public class Replay {
public Frame current_frame;
public float playback_frame = 0;
public Array frames = new Array();
BitmapFont font = new BitmapFont();
main game;
public Replay(main game){
font.setScale(.6f);
this.game = game;
}
public void tick(float delta){
if(playback_frame < frames.size){
current_frame = frames.get((int) playback_frame);
}
playback_frame ++;
}
public void draw(float delta, SpriteBatch batch){
if(current_frame != null){
batch.draw(current_frame.frame, current_frame.x-5, current_frame.y-5);
batch.draw(game.media.tooltip, current_frame.x-11, current_frame.y+24);
font.draw(batch, "Time: " + String.format("%.2f", current_frame.time), current_frame.x-10, current_frame.y+42);
}
}
public void add_frame(Frame frame){
frames.add(frame);
}
public void reset(){
playback_frame = 0;
frames.clear();
}
}

This is a quick and dirty implementation, I will re-factor the code later. There are hard coded values and textures passed in from the main class and so on, also currently I do not check the FPS for capture and playback, I assume LibGDX always runs at 60fps.