Blog
Last modified by Victor Zhang on 16:38, 07/04/2020
Jun 9, 2020
Android Manifest Versioning
- Version code is always interger
- So it should be a good practice if start with 100 for having subversions
- General rule, larger number the recent
- The version to show is the "name" field of the version
- Rolling out new release still takes a week for google play to review
- Correction: update takes less time than new review, the 1.01 took around 1 day
Jun 5, 2020
Terraria Mods, thoughts
- Making mod is a good way of learning how to collaborate alone
- The mod loader usually needs to follow a pattern in order to "hook" the apis from the original game, so although working alone, it's kind of like working with other people.
- Usually it follows a design pattern
- Good opportunity to learn how to work from existing framework
- Now with 1.4, tModLoader become official, which lead me to believe the community will be more active, so it's easier to seek advice/help from the community.
- Gaps identified
- As it's a small hobby project, I do not want to scope to get too large.
- There's large mods with every element of the game play even transforming game play, however I'm going to make the first attempt simple.
- The one thing seems to be lacking in the current mod is weaponized mounts
- It's possible that it's not doable that's why no-one is making it
- However, there's sign the system supports that, as there's mining vehicles in vanilla and mod that has overriden the "fire/use" button for mining. Also in vanilla and mods there are auto-targeting weapons.
- Reference from other game:
- Preliminary plans:
- First step of this one is actually not design but technical exploration
- It could be that it can not be done, as if it can I'm positive someone will have attempted to make it
Jun 3, 2020
Adversarial Attack on Human Vision
- Shame on me wasting time on youtube again, it's me browsing through random videos and saw this
- The human vision very much could be hacked like AI
- However the given example, my hunch is that the picture is altered more than the computer AI Adversarial Attack example ( could totally be wrong about it, as I did not do objective verifiable calculation )
- Based on my preception the picture (again totaly could be wrong), the noise they use changed several contour feature of the "cat" original picture, but that's only one example, probably will need to see the dataset compared to AI test.
- Original paper is here: Adversarial Examples that Fool both Computer Vision and Time-Limited Humans
- So the main takeaway of the study was not to fool human, it's the indication from time-limited human vs no time-limit human(robust) to infer there's potential for AI to be more robust.
- Previous example for AI to be known vulnerable to adversarial attack is cited by Ref 13 also on same web site: EXPLAINING AND HARNESSING ADVERSARIAL EXAMPLES , "A demonstration of fast adversarial example generation applied to GoogLeNet (Szegedy et al., 2014a) on ImageNet", which shows the attack on panda image being wrongly recognized gibbon. However, I would argue this is only possible when they have control to finely rewrite input cache as 255*0.007 = 1.7 85, I doubt such grain could be picked up by real camera and even if so, would easily drown by noise of the sensor that even it accidently formed severl frames out of hundreds, in real application, the system could use statitstical method to make output more robust (Also I could be wrong), or the subtlety of modification is exaggerated.
- However it never the less points out the flaw of the algorithm so that it could be improved upon.
- There had been attempts to fool face recognition technology
- The Privacy Wars: Goggles That Block Facial Recognition Technology
- COUNTER SURVEILLANCE MAKEUP
- Spoofing Faces Using Makeup: An Investigative Study
- They are obvious, can only disable thre recognition, is it possible to project IR noise onto face to be recognized as someone else?
Like kinect's noise projection: kinect projected ir pattern, project calculated adversarial attack
Jun 2, 2020
Development log - GDice
The log of the development, major problems and things to improve
May 21, 2020
Development log - GDice - Number
- Developed Nixie Tube's appearance as spritesheet
- Test use here: Nixie Spritesheet
- Has all source files
- Uploaded to: https://opengameart.org/content/nixie-digits-spritesheet as CC-BY-4.0
- Might not be used in final project as the numbers are too small
- Maybe it's just better to photoshoot the tube running using Arduino
May 18, 2020
Raycast on Phaser Camera3D Plugin
- The problem is actually discovered by a student when trying to implement a forward running game (They need to click the enemy)
- The camera3d class provides a ray function: https://photonstorm.github.io/phaser3-docs/Phaser.Cameras.Sprite3D.PerspectiveCamera.html#getPickRay__anchor
- In that way, calculating the x,y on the target plane and then do some hit-test manually would do the job
- Used example: http://labs.phaser.io/edit.html?src=src\camera\3D%20camera\floor.js
- Modify line 33 to : var balls = camera.createRect({ x: 8, y: 1, z: 8 }, 32, 'ball');
- Add following block to create():
balls.forEach( function(ball){
ball.setData('tag', 'ball'+ball.x+':'+ball.y+':'+ball.z);
} )
this.input.on('pointerdown', function (pointer) {
ray = camera.getPickRay(pointer.x, pointer.y);
balls.forEach( function(ball){
// r is hardcoded here
let r = 4;
// calculate x y @ z of the object
let tx, ty;
let tz = ball.z;
tx = ray.origin.x + ray.direction.x * (tz - ray.origin.z ) / ray.direction.z;
ty = ray.origin.y + ray.direction.y * (ray.origin.z - tz) / ray.direction.z;
let tl = Math.sqrt( Math.pow(tx - ball.x, 2) + Math.pow(ty - ball.y, 2) );
if( tl < r ){
console.log(ball.getData('tag')+' isHit');
ball.gameObject.alpha = 0;
}
} );
}, this); - Explanation:
- the radius is hard coded here (5)
- more complex hit testing will need to be implemented for complex shapes
- manually enumerated through all object, inefficient (may need to implement some obvious exclusion for optimization)
- Extra problem
- Why is y axis reversed here?
- To study:
- Math of https://codepen.io/samme/pen/PBMaLJ ray blocking ,will be useful for next project
May 6, 2020
Imaging Device and Webcam
- As the recent need for remote learning, trying to setup stream hardware
- ITS has Doc Cam hardware however the driver they provide here: https://www.elmoeurope.com/index.php/en/download-service/software installs the device as "Imaging devices" which is somehow different from "Cameras" ( from device manager)
- TWAIN is also used by scanner so understand why it does make sense for Chat apps not supporting it
- But why do real-time doc cam register as TWAIN instead of Cameras
- It doesn't provide better quality
- Speculations:
- YUV format?
- FPS?
- Irregular resolution?
- PS Eye driver written by this company https://codelaboratories.com/products/eye/driver/
- Archive (link : https://archive.org/download/CLEyeDriver5.3.0.0341Emuline/CL-Eye-Driver-5.3.0.0341-Emuline.exe)[ ]
- Also registers as "Imaging devices" thus meaning can't be used by most of the windows apps
- Making a TWAIN to Camera bridge
- Does it worth the effort?
- As newer devices(even doc cams) supports UVC driver
- If as a hobby project, what's the effort
- Device driver
- Bridging service
Apr 29, 2020
Ultrasonic Directional Speaker
- Open source one:https://hackaday.io/project/9085/logs
- Probably first saw in "future weapons" as a military equipment for crowd control
- It uses the directional properties of ultrasound
- Modulates and trick our ear of hearing it
- Presumably can achieve a lot of interesting effects, like spatial sound
Example:
Apr 28, 2020
Alternative phones than mainstream
- It's more like a quirk than anything else
- Using alternative platform might just make your life harder, a lot of time cost more, however it's a good learning process
- Source : https://itsfoss.com/open-source-alternatives-android/
- https://www.tizen.org/ , Linux based, not fully tested ( security issue )
- http://plasma-phone.org/, Linux KDE
- https://postmarketos.org/, Linux based, not much info
- https://www.pureos.net/, Linux based, seems more tested has PC version too
- https://ubports.com/, Ubuntu linux based, has its own hardware
- https://pivotce.com/tag/luneos/, WebOS successor
- Remark: having used WebOS, the backthen web based top layer on kernal is very ahead of its time, that's probably why it failed
- The hardware/software wasn't ready making the device taking too long to boot, however now you can see a lot of OS running its interface on browser like chromeOS
- https://lineageos.org/, Android derivative
- Hardware: https://hackaday.io/project/42944-kite-open-hardware-android-smartphone
- Kite: https://www.kiteboard.io/
- A very interesting project as it focus on hardware , and not like common testbeds, it has most phone's function including cellular
- Could be very good testbed for some android based design project
- Kite: https://www.kiteboard.io/