Blog about (Web-) Programming, Graphics and Games.

26.01.2017

Text search with a folding editor

Implemented text search for the web folding editor. Similar to the advantage of folding editors in general, that an overview of a whole document can be given while details are blended out (folded), with text search an overview of lots or all text-occurences is visible at once. In Detail finding text works as follows:
  1. Highlight all visible occurences.
  2. Highlight closed folders with a number of hidden occurences inside.
  3. Successively point the cursor to different occurences, possibly open folders for hidden occurences and closing them again if next occurence is elsewhere.

12.12.2016

Happy Feast of Winterveil!

Last blogpost of this year, everyone a good transition to 2017! Assembled 2 2D javascript experiments. First has a walking and tumbling Santa Claus with randomly generated snow flakes. Second renders vegetation, moving as a frog runs through it.

► Start Santa Claus
► Start Vegetation


28.11.2016

Recent subjects

Projects and contents that currently didnt manage to get own blogposts, only tweets. 🙂

19.07.2016

Buckminster Fullers Jitterbug

Another small demo inspired by an article of journal 'Spektrum der Wissenschaft'. Its a simulation of a so called dancing octahedron (or Buckminster Fullers jitterbug), where trianglepoints are connected pairwise. In the simulation having only the triangles would make the object fold together. Thus auxilliary structure (gray lines) is needed to shape its form and behavior. In the demo the object can be dragged around (mouse/touch).

► Start

19.06.2016

Conet Android App

My first android app is online. Its a basic webserver with simple file-upload and file-synchronize via home wifi, thus creating a decentralized local wifi cloud. App is currently public beta:

► Install

Project consists of 2 components:
1.) a basic webserver where webapps are able not only to simply load files from filesystem (XMLHttpRequest) but also to save them to it.
2.) if there are multiple devices with this app running connected to home wifi, they see each other and synchronize files.
Thus Conet is somewhat like working with cloud files, without the cloud: Edit data on a device (possibly offline), then after getting home, file-changes are distributed to other devices, where the work might continue.
Howto start: Start app. Start browser with url "localhost:7000". See examples.

25.04.2016

Wloom 17: Script-Generated Levels

Mission is to create game levels with scripts. First demo shows 3d architecture being constructed using simple commands (box,gate,corridor,..) and raytracing. Second has a simple landscape with transparent vegetation. For each demo there are 3 links, the level-script shown with the web folding editor, the level-script run in the web 3d editor and the resulting level playable in wloom game environment.

Demo 1: Architecture
Source · 3d-Editor · Play

Demo 2: Landscape with transparent vegetation
Source · 3d-Editor · Play

28.02.2016

Recent projects, Start 2016


History wikidata visualisation: ellipse > line. [Start]
Also first time tinkering with SVG.

New Threejs demo is online. Now with textures,
details, skybox aaand.. hamburger menu. [Start]

Web folding editor with syntax highlighting
for mobile and desktop. [Start]

26.10.2015

Recent Three.js demos

08.09.2015

Back to VR, now mobile.

About 2 years ago I got the Oculus VR device DK1. It was great pixelated fun. VR apps could be written in the browser with the help of plugins or socket-connection to an external vr application. Today browsers start to make it easier by implementing WebVR (and deprecate plugins, but thats another story).
     
Now that I needed a new mobile phone to replace the trusty samsung s3 mini, it was a quick decision to get a s6 together with a gear vr device (by samsung & oculus). Its great fun again, less pixelated. Oculus home app starts as soon as s6 and gear vr are connected and has great apps and vr media, my current favorites are 'Dreadhalls' and 'Anshar Wars'. When I wanted to examine WebVR, there was the problem, that Oculus home app always autostarted and no browser would be visible through the VR device. First solutions, the internet offered, were to somehow disrupt the usb connection between s6 and gear vr or stop gear vr service with a rooted android or to switch to oculus developer mode, which only works, if you have (fake-) deployed an oculus vr app, else you only get the message 'You are not a developer!'. Didnt liked them solutions and thought to ditch gear vr and get a google cardboard (or similar universal vr device) instead. Also thought, this would be the worst vendor lockin issue ever. Then I got pointed to the app Package Disabler Pro, which is able to suspend gear vr service on a not rooted system (for 1.70 €). Now WebVR was possible, did test it with the spindex app, found on this WebVR tumblr. The spindex app uses WebVR and falls back to PhoneVR, if the browser doesnt support WebVR. I adapted this approach for the Wloom game environment:

► Simple gfx
► Complex gfx


      Finally a general thought about phone VR. I always wanted to do computer work outside (park/garden), but stationary hardware and sunlight make that difficult. There are notebooks/laptops, but sunlight is still a issue and you might want a bigger display or multiple screens. Phone VR could be the solution to mobile workplaces, phones have all the tech within and the power of desktop (office) pc's. Phone is always there, for the workplace only vr-glasses and maybe bluetooth keyboard is additionally needed. With VR, screensize is no issue (can be 360°). What is needed is VR workplace software, like VR desktop, but maybe utilizing not only the bigger field of view, but also the additional dimension that comes with VR.

23.07.2015

Wikidata Historymaps

The project fetches history data from wikidata (with time/location) and displays them using google maps. Data fetching starts with a person (i.e. its wididata id) and recursivly loads a number of data of ancestor and descendants. Places of historic events are clickable markers, where a description window can be shown. There are lines drawn between places of a persons history and between places of ancestors to descendants.

► Niklot
► Henry the Lion


Some interesting aspects from a programming perspective: the wikidata barcode logo is 'wiki' in morse code (ref). Wikimedia commons image urls are of the form a/ab/(filename), where 'ab' are the first characters of the md5 hash of the filename.

05.05.2015

Gree - 3d graphs (of json or javascript)

Experimenting on a new project called 'Gree' (from GRaphs with thrEE.js) to display and edit 3d graphs of json data or sourcecode. Motive is, that complex interconnected networks are difficult to display in 2d, e.g. edges overlap. 3d should improve visibility. To best utilize this, stereoscopic view (e.g. via vr device) is needed, since else the graph stays 2d projection. Currently there are 2 applications. The first is a general 3d graph tool. Graph data is represented and editable in json format. The graph can be modified by dragging its nodes.
► Gree Json

Second application generates 3d graphs of javascript sourcecode and vice versa. Why make 3d graphs of sourcecode? Code (display/editing) can be in a way redundant, because everytime a function is called, its name must be written. So a function name can appear multiple times. Alternatively a function could be represented as graph node (its name only displayed once) and everytime it is called, an edge to that node is drawn. This project tries to go that direction. Here an edge between 2 function nodes is drawn if one function is called from the other. For complex code with lots functions this can give a quick overview of code semantics. 3d positions of nodes are stored as comments above related functions. If the graph is modified by dragging its nodes, javascript can be generated with updated position comments. Javascript is parsed with acorn.js and generated with escodegen.js.
► Gree Javascript

20.01.2015

Hearthstone inspired card game test

Its a card game for 2 players, human versus the computer. Cards have 3 properties: cost, attackpoints (ap) and hitpoints (hp). A card with 4 cost can have 4 ap and 4 hp. It might have more/less ap, but then less/more hp too. General formula is cost/2=ap+hp. Cards can attack opponents cards or the opponent directly. If a card gets attacked or attacks its hp decrease by the ap of the other card. If a player is attacked directly, its hp decreases, if its value is 0, the game ends. The game is written for html canvas 2d, optionally webgl. It is based on the same rendering code as a previous game demo. A focus of this game test is playability on mobile devices, as card games are perfect for them (and there is now Hearthstone for android and ios too).

►Start game

21.12.2014

Finale 2014

Long time no blogpost. Reasons were vacation, work on projects continued, this posting will summarize some. Also it will be the last text of 2014, so to everyone nice holidays and a good transition to 2015!
  • Web 3D editor now has a three.js renderer instead of the previous plain canvas technique. The plain canvas is still there as overlay to display editing informations. The scripting functionality of the editor can be used to create demos. Scripts can be started via menu or url parameter. As an example the following link loads a xmas baneling with ragdoll physics and scripted animation:

    ►Start

  • Another project (work in progress) is to display train schedules, not as single routes, but as route networks. Single routes can be optimal, but sometimes, especially on routes with lots changes, there are multiple equally good routes. Choosing the right route can be easier using a network of all relevant routes, with all information combined. Problematic with this project is, that lots train companies dont provide raw data of train connections, hopefully OpenData gets more traction.

  • Finally a canvas racing game demo.

    ►Start

09.08.2014

Tagdox - minimal tag-based document app

  • The app maintains a list of documents, each has a title, body, tags and a timestamp.
  • The documentlist can be confined via tags(pulldown) and/or free-text search.
  • The documentlist can be ordered by title or timestamp.
  • There is functionality to edit,add & delete documents.
  • At startup documentlist is loaded from localStorage or file (JSON format), on change documentlist is saved to localStorage and can be exported to a file.
  • The use case here is a movie collection. The timestamp can be used to store when a movie was watched and to choose which to watch next.
  • The app is quite minimal, it consists of 3 files: data, backgroundimage and source, which has ~11kB vanilla javascript unminified.
►Start Tagdox
(use case: collection of 570 movies)

23.05.2014

Webpage for Hearthstone data log, graph and statistics

The page lets you record results of Hearthstone games. By clicking buttons 'win' or 'loose' an outcome of a game is logged with a timestamp. The resulting game rank is visualized as graph. Data is saved in browsers localStorage and also listed in a textarea (json format). There it can be edited, imported or exported. Finally a win-ratio statistics is available, generated by counting results of each hour of each weekday.

►Start

13.03.2014

Wloom 16: Gravity game test

Game mission is to evacuate a (unconcious) robot to the exit by toggling gravity up or down. Gravity and ragdoll physics is done by bullet.js.

►Youtube
►Start game

13.02.2014

Overview of (sub-) projects and their relations

vecmath.js
- vector/matrix math
- mostly ported from java
menu.js
- screen proportional menus/gui
- desktop/mobile (mouse/touch)
bullet.js
- 3D physics engine
- ported from jbullet
pd5.js
- bone-tree 3d objects
- key frame animation, io
- inspired by doom3 md5 structure
WePaint
- web paint app
- transparency, sprite animation
W3dit
- web 3d editor
- mesh,bones,animations,textures
Wloom
- WebGl game env/testing ground
- optionally uses three.js or glge libs
cutout.js
- 2D bone-tree object animation/gametest
- canvas or WebGl renderer

31.01.2014

cutout.js - Game Test

The animation project of a previous blogpost is now extended to a game experiment, with following features:
  • Canvas or WebGl renderer via menu
  • Stereo WebAudio synth effects
  • Particle system
  • Various controls depending on system and browser: keys (wasd,cursor,ctrl), mouse, touch or gamepad
Game mission is to fight the mobs. Health regenerates over time. One should only fight single ncps at once. Current quest is to finish the game in less than 264.9 seconds. :)

►Start game
►Github repository