Cheap Xbox Games

Notes on implementing interactive articles

 tháng 5 10, 2013     making-of     No comments   



While writing my guide to hexagonal grids I ran into some html+css+js issues that I need to spend more time learning about. Here are a few things that are on my mind.





Responsive layout



I got a little frustrated with the layout options I had in HTML+CSS. I want to write HTML one way, then use CSS media queries to reformat the layout to work with wide desktop, narrow desktop, and mobile widths.



For some of my previous articles, I used floats. It works nicely in the simple case.




narrow

A

B





wide

A

B



However, for this article I often found that the best layout for narrow would be to put diagram B in the middle of the text A+C:




narrow

A

B

C




wide


A

C

B





But now the diagram is aligned with C; I want it to be aligned with A.
I don’t know the best way to do this. I ended up using three different patterns.




  1. When A and C were taller than B, I used absolute positioning to take B out of the flow and line it up with A:




    narrow

    A

    B

    C




    wide



    A

    C


    B





  2. When A and C were shorter than B, I didn’t have a good solution, so I moved C’s content into A’s and used floats. This hurt the layout on narrow devices, where it ended up in the wrong order:




    narrow

    A

    C

    B




    wide



    A

    C


    B





  3. Occasionally I just wanted things to be side by side but not floating, so that I could get this:




    narrow

    A

    B

    C




    wide


    A

    B

    C







In the end I wasn't happy with the different CSS rules that I used,
but they seem to work. I could have reformatted with Javascript but kept hoping CSS alone would do the trick. Flex boxes don't seem to help here (unless I'm missing something). It's possible CSS Regions would do what I need; it's not widely supported yet. I'm a novice with floats; it's quite possible with some cleverness I could've gotten what I wanted.





Update: [2013-05-29] With help from Jimminy on Friendfeed, I was able to simplify all of the above into one set of rules that handles all three cases. Anything that will be potentially in two columns goes into a div with clear:both. The left column elements are all float:left;clear:left. The right column elements are all float:right;clear:right. On a narrow browser, the containing div will be one column wide, so all the floats are in order. On a wide browser, the containing div will be two columns wide, and the left/right floating elements go in the left and right columns. Much simpler!



Browser compatibility



Some things that bit me:




  1. In WebKit I can use SVG’s baseline alignment to vertically center text. This becomes very handy when I want to write generic code that places text no matter what size the hexagons or what size the text. However in Gecko, I can’t use this. Instead I need to adjust the text position downwards, which depends on the size of the text. But I don’t know the size of the text in the generic code because it’s set later by the CSS on the page. So I fudged it. Also see Nelson Minar’s post on this topic.


  2. In WebKit I can use the DOM node’s .clientWidth and .clientHeight to get the size of the SVG. I then use that to center the diagram in the SVG frame. In Gecko these were returning 0, so I ended up reading the width= and height= attributes of the SVG instead.




Performance



I wrote the animations in a straightforward way but there are way too many animations running at once. I have a single toggle for the orientation (pointy top vs flat top) of all the diagrams on the page. When you change the orientation it rebuilds all of the diagrams. This is slow.



I guess I was hoping requestAnimationFrame would magically solve everything. But it doesn’t. It doesn’t know where the output will be on screen, and therefore whether the code needs to be called. So I need to do that. I need to look at each diagram, figure out whether it’s on screen, and decide whether to change it immediately or to delay it. But if I delay it, and you toggle it back, then I have stacked timer handlers to deal with. So I haven’t finished implementing this.



A simpler approach would be for me to not link the orientations together, so you’d separately toggle it for each section of the page.



Touch screens



Although I did a little bit of testing on touch screens, I didn’t spend enough time getting the interactions to work well with touch events. Instead I’m (mostly) relying on the emulation of mouse clicks. There’s a ~300ms delay for this emulation though, so it doesn’t feel smooth. There’s a library to fix this but I haven’t tried it. It’d also be nice on touch screens to tap and drag to select multiple hexagons, but I didn't implement click and drag either so I'm consistent in my not supporting the nicer UI.

  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg
Gửi email bài đăng nàyBlogThis!Chia sẻ lên XChia sẻ lên Facebook
Bài đăng Mới hơn Bài đăng Cũ hơn Trang chủ

0 nhận xét:

Đăng nhận xét

Popular Posts

  • Games Design and Games programming students team up.
    Our Games design students collaborating with web design coding students @JAMUCLAN . Coding Tutor Mark Porter and Design tutor, Bev Bush brou...
  • Hexoshi - inspired by Metroid
    Hexoshi ( forum thread ) is a libre game generally inspired by the Metroid series, notably the older versions. It is seeking funding using ...
  • Cara Klaim PS+ 14 Hari Secara Gratis (new trick 2019)
    Sebuah trick yang saya coba beberapa hari yang lalu, saya menggunakan trick ini untuk mengklaim game gratisan PS+ Region 2 karena di region...
  • Introduction to TiltBrush by Google.
    My first experience of drawing with Tiltbrush with the Vive headset was exciting as it felt like a very new experience.   We also arranged...
  • White Paper Games launch 'The Occupation' at EGX Rezzed 2017.
    White Paper Games are showing their new game 'The Occupation' at EGX Rezzed this week, March 2017. See the trailer here : Check out...
  • Marco Carmo is Games Design Nominee for Lancs Arts festival 2018
    Many congratulations to  Marco Carmo  who is our Nominee for Games Design in the Media Tech Lancashire Arts Festival Awards 2018.  #lancsart...
  • Review Indie Game: Sigi - A Fart for Melusina (PS4)
    Sigi - A Fart for Melusina merupakan sebuah game 2D plat former adventure buatan dari  pixel.lu , game ini bercerita kan tentang petualanga...
  • Review Indie Game: FullBlast (PS4)
    FullBlast , merupakan sebuah game indie pesawat arcade developer dari Ratalaika Games , Game yang cukup menarik, dan saat memainkan nya kita...
  • Posting iseng Out of Box
    Iseng-iseng posting out of box aja, setelah coba searching di youtube dengan key "Kenapa Harus ASUS ROG?" ternyata banyak juga vid...
  • Examples of work by UCLan first year Games Design students.

OpenGameArt Summer Game Jam #3 has begun

One of our affiliate websites OpenGameArt (OGA), a free repository for public domain and copyleft licensed art, has just begun hosting this...

Tìm kiếm Blog này

Được tạo bởi Blogger.

Lưu trữ Blog

  • tháng 7 2019 (1)
  • tháng 6 2019 (11)
  • tháng 5 2019 (7)
  • tháng 4 2019 (10)
  • tháng 3 2019 (7)
  • tháng 2 2019 (14)
  • tháng 1 2019 (16)
  • tháng 12 2018 (20)
  • tháng 11 2018 (14)
  • tháng 10 2018 (12)
  • tháng 9 2018 (25)
  • tháng 8 2018 (6)
  • tháng 7 2018 (5)
  • tháng 6 2018 (10)
  • tháng 5 2018 (12)
  • tháng 4 2018 (33)
  • tháng 3 2018 (5)
  • tháng 2 2018 (10)
  • tháng 1 2018 (25)
  • tháng 12 2017 (5)
  • tháng 11 2017 (5)
  • tháng 10 2017 (2)
  • tháng 9 2017 (6)
  • tháng 8 2017 (3)
  • tháng 7 2017 (8)
  • tháng 6 2017 (13)
  • tháng 5 2017 (12)
  • tháng 4 2017 (17)
  • tháng 3 2017 (14)
  • tháng 2 2017 (10)
  • tháng 1 2017 (9)
  • tháng 12 2016 (3)
  • tháng 11 2016 (13)
  • tháng 10 2016 (14)
  • tháng 9 2016 (3)
  • tháng 7 2016 (3)
  • tháng 6 2016 (5)
  • tháng 5 2016 (1)
  • tháng 4 2016 (8)
  • tháng 3 2016 (2)
  • tháng 2 2016 (3)
  • tháng 1 2016 (3)
  • tháng 12 2015 (5)
  • tháng 11 2015 (8)
  • tháng 10 2015 (2)
  • tháng 9 2015 (5)
  • tháng 8 2015 (3)
  • tháng 7 2015 (2)
  • tháng 6 2015 (2)
  • tháng 5 2015 (6)
  • tháng 4 2015 (6)
  • tháng 3 2015 (5)
  • tháng 2 2015 (4)
  • tháng 1 2015 (4)
  • tháng 12 2014 (4)
  • tháng 11 2014 (4)
  • tháng 10 2014 (5)
  • tháng 9 2014 (5)
  • tháng 8 2014 (4)
  • tháng 7 2014 (8)
  • tháng 6 2014 (9)
  • tháng 5 2014 (4)
  • tháng 4 2014 (6)
  • tháng 3 2014 (8)
  • tháng 2 2014 (5)
  • tháng 1 2014 (8)
  • tháng 12 2013 (8)
  • tháng 11 2013 (8)
  • tháng 10 2013 (9)
  • tháng 9 2013 (11)
  • tháng 8 2013 (8)
  • tháng 7 2013 (7)
  • tháng 6 2013 (10)
  • tháng 5 2013 (12)
  • tháng 4 2013 (14)
  • tháng 3 2013 (8)
  • tháng 2 2013 (3)
  • tháng 1 2013 (2)
  • tháng 7 2012 (2)
  • tháng 6 2012 (1)
  • tháng 5 2012 (1)
  • tháng 4 2012 (1)
  • tháng 2 2012 (1)
  • tháng 1 2012 (2)
  • tháng 12 2011 (1)
  • tháng 10 2011 (1)
  • tháng 9 2010 (3)
  • tháng 8 2010 (1)
  • tháng 6 2010 (1)
  • tháng 4 2010 (1)
  • tháng 2 2010 (1)
  • tháng 1 2010 (1)
  • tháng 11 2009 (1)
  • tháng 8 2009 (1)
  • tháng 7 2009 (1)
  • tháng 6 2009 (3)
  • tháng 5 2009 (3)
  • tháng 4 2009 (1)
  • tháng 3 2009 (2)
  • tháng 1 2009 (3)
  • tháng 12 2008 (1)
  • tháng 11 2008 (2)
  • tháng 8 2008 (1)
  • tháng 6 2008 (2)
  • tháng 2 2008 (2)
  • tháng 11 2007 (1)
  • tháng 7 2007 (1)
  • tháng 6 2007 (2)
  • tháng 4 2007 (1)
  • tháng 3 2007 (1)
  • tháng 2 2007 (1)

Nhãn

  • ‘Drawing for Games’ session!
  • 'Plinky Plonk' version 2 is out!
  • #DS16 Uclan Games Design Private view.
  • #UCLanCF - MA Show
  • 0ad
  • 14 Uclan Games Design Alumni are credited on Lego Starwars Force Awakens.
  • 2d
  • 2x0ng
  • 3D
  • 3rd Year student
  • 9-Bit Idol pitch for Dare To Be Digita
  • A Grand Day Out with UCLan Games Design.
  • a las barricadas
  • A very Merry Christmas to you all
  • AAA Game Review
  • Action Games
  • Adam Mattis.
  • Adventure Games
  • alienarena
  • Alpha Texturing
  • ALUMNI GAMES DESIGNERS HAVE ‘THE FORCE’
  • Alumni Robin Willians work results in demand for GTA vehicle.
  • Alumni Sian Knight begins job with Fat Fraken Studios.
  • ancientbeast
  • Andy Gahan
  • Andy Wood of Double Fine Productions QA Session
  • annex-glest-mod
  • antargis
  • arcade
  • arewealone
  • art
  • Arthur Parsons
  • Arthur Parsons of TTGames awarded an Honorary Fellowship from Uclan
  • Arthur Parsons visit to Uclan Games Design Course 2017
  • article
  • arxendofsun
  • arxliberatis
  • assaultcube
  • Athletic achievements by Uclan Games Design student
  • AtomicGameEngine
  • Augsburg University of Applied Sciences visit to Uclan
  • award
  • BA Games Design at UCLan
  • BA(Hons) Games Design at Uclan.
  • BA(Hons) Games Design UCLan Graduates
  • Bajakan
  • ball-rolling
  • Bank BTN
  • Berita
  • Best Game Award at Uclan Games Jam 2016 .
  • bge
  • BIG CONGRATULATIONS to WHITEPAPERGAMES
  • Blackvoxel
  • blender
  • bombable
  • bos
  • bos-wars
  • boswars
  • BugBox- visual programming experiment.
  • bullet
  • bushidoblocks
  • bygfoot
  • canvas
  • cataclysm
  • Chocolate Doom
  • codecombat
  • commercial
  • community
  • competition
  • Computer
  • conquests
  • contest-gamedev
  • corebreach
  • Crates and Barrels
  • creativecommons
  • Crosby Game WIP
  • crowdfunding
  • crowdsourcing
  • crystalspace
  • Cube2
  • cytopia
  • Dan Bavin starts new job at Ninja Theory
  • Dan Bavin wins Creative Focus Award for Design 2015
  • darkmod
  • darkplaces
  • data dealer
  • deadmorning
  • Debut
  • deceiver
  • design
  • Design Director at Travellers Tales
  • devcorner
  • dhewm3
  • Diablo
  • Digital
  • Doom
  • Doom3
  • Double presentation by Alumni for UCLan Games Design
  • duckmarines
  • eatthewhistle
  • ecksdee
  • emiliapinball
  • emscripten
  • Emulator
  • Engine
  • engines
  • erebus
  • escoria
  • European Women in Games Conference 2016
  • Even more recent graduates now working in the Games industry
  • event-conference
  • Excellent NSS Uni Stats for Uclan BA(Hons) Games Design.
  • extremetuxracer
  • FGD
  • Fighting Games
  • Finale of the Games Design Degree Show
  • Finalist in 'Break Through Talent' Award.
  • First week of Uclan Games Jam 2015
  • First Year Games Design Students make games at UCLan
  • First year project examples
  • flare
  • flash
  • flightgear
  • Fraud
  • Freeablo
  • freedink
  • freegamer
  • freeorion
  • freesound
  • Freshers Games Design Challenge 2018
  • frogatto
  • FS-UAE
  • Further good news for UCLAN 3rd year student
  • future
  • Gagal
  • Game
  • Game by Nellie Sandblom as published on Scirra Arcade.
  • game engine
  • GameDevelop
  • Games
  • Games Course Alumni Postcards
  • Games Design and Games programming students team up.
  • Games Design course visit from Concept Games Artist
  • Games Design day of Speakers from industry.
  • Games design first years using 'actual' Ether-One assets.
  • Games Design Graduation ceremony 2018
  • Games Design students at the Harris.
  • Games Guru
  • Games student chosen for Noise Festival
  • Games students visit Blackpool Zoo and Tower
  • Gatget Review
  • genre-adventure
  • genre-buildingsim
  • genre-cards
  • genre-educational
  • genre-engine
  • genre-exploration
  • genre-flighsim
  • genre-fps
  • genre-mmo
  • genre-platformer
  • genre-precision
  • genre-puzzle
  • genre-racing
  • genre-roguelike
  • genre-rpg
  • genre-rts
  • genre-sandbox
  • genre-shooter
  • genre-space
  • genre-stealth
  • genre-tbs
  • geometry
  • gigalomania
  • Girls design games @jamuclan
  • glamour
  • GLSL
  • godot
  • Gorynlich
  • Grads In Games visit to UCLAN for the Get in the Game Careers Talk Tour
  • Graduate success
  • graphics
  • Gratis
  • grids
  • gsoc
  • h-craft
  • Hand Painted texturing
  • Hardware
  • haxe
  • HDD
  • hedgewars
  • hero of allacrost
  • hexagons
  • hexenedgeofchaos
  • hexoshi
  • Horror Games
  • html5
  • http://gamescourse.blogspot.co.uk/2017/03/ba-games-design-at-uclan.html
  • https://www.uclan.ac.uk/about_us/case_studies/game-jam-2018.php
  • ideas
  • idtech2
  • idtech3
  • idtech4
  • Indie Games Review
  • indiegogo
  • Induction week for BA(Hons) Games Design Uclan.
  • Info Handheld 3DS
  • Info PS4
  • Info TV
  • infrastructure
  • International Women's Day celebration
  • Introducing Pinterest to students as a visual research tool
  • Introduction to PanoPainter.
  • Introduction to TiltBrush by Google.
  • ioquake3
  • ironbane
  • irrlamb
  • irrlicht
  • James Burton - MA Games Design - UCLan
  • jediknight
  • jme
  • jmonkey3
  • jrpg
  • Jual
  • keeperrl
  • Knowledge
  • language
  • Lego Game Design Live brief
  • licensing
  • lincityng
  • linux
  • linuxgameawards
  • lipsofsuna
  • Live Stream on Twitch TV.
  • love
  • löve
  • löve2d
  • lugaru
  • MA Design Degree Show - UCLan. Featuring our MA Games Design students!
  • MA Games Design Show at Uclan 2013
  • mac
  • making-of
  • Mandiri
  • mapgen4
  • maps
  • Marco Carmo is Games Design Nominee for Lancs Arts festival 2018
  • math
  • MCV talk to the finalists ahead of this year’s Women in Games Awards.
  • Meet the Developer - Steven Thornton
  • Meet the Developer. Stephen Morris of Greenfly Studios
  • MegaGlest
  • MIT
  • mode-multiplayer
  • mode-onedevicemultiplayer
  • mode-singleplayer
  • Moonshades
  • More robot games designed by Year 1 Uclan Games design students
  • More Top-down shooter games- designed by year 1 Uclan students.
  • More Uclan Games Graduates from class of 2017 now have jobs!
  • Movie Review
  • My Story
  • Mystery
  • naev
  • neverball
  • New Games Design Students arrive for Induction week
  • Nik Hughes. Realtime Job Update
  • Nintendo Switch
  • noise
  • Nominated for Develop Award
  • nova pinball
  • occulusrift
  • oceansheart
  • octaforge
  • ogre3d
  • olpc
  • open-source
  • openart
  • opencaesar3
  • opencity
  • opendungeons
  • openflashpoint
  • openfootball
  • opengameart
  • openig
  • openjk
  • openmw
  • openra
  • openxcom
  • osx
  • overdose
  • ows
  • pathfinding
  • patreon
  • Pete Bottomley to talk at GDC 2015
  • Peter Dimitrov makes his mark.
  • Peter Dimitrov.
  • Peter Field - Games Designer at Naughty Dog
  • Peter Field from 'Media Molecule' visits Uclan Games design
  • Peter Field of Media Molecule visits Uclan Games Design
  • pinball
  • pixel art
  • Platform Games created by Year 1 Games Design students @UclanCF
  • platform-android
  • platform-handheld
  • platform-html5
  • platform-linux
  • platform-osx
  • platform-webgl
  • platform-windows
  • Playful ideas by Bev Bush - try them on GameJolt.
  • pleethebear
  • Plinky Plonk Xmas App is live
  • Portable Console
  • portrait-marathon
  • PotM
  • power
  • programming
  • project
  • projectfootball
  • projectofthemonth
  • PS Plus
  • PS+
  • PS4
  • PS4 Bajakan
  • PS4 Original
  • PS5
  • PSN Store
  • Puzzle Games
  • racer
  • racing
  • Racing Games
  • ransom
  • Recent Graduate employed as a Games Designer
  • Recent Uclan Games Design Graduates now in work!
  • redeclipse
  • retro
  • retro games
  • retux
  • Review
  • roguerepublic
  • Role-Playing Games
  • ROTC
  • rpg
  • rts
  • Rumor dan isu
  • ryzom
  • Saija Sipila interviewed on Linkedin.
  • Sarah Akers and Will Butterworth visit Uclan Games Design
  • scifi
  • SDD
  • sdl
  • Secret Santa day for Uclan Games Design
  • Shaun Mooney
  • Shooting Games
  • Siân Knight
  • Simulation Games
  • sintel
  • sintelthegame
  • solarus
  • Some of our UCLan Games Design Success Stories.
  • space station 13
  • spacenerdsinspace
  • Spider Man
  • Sports Games
  • SSD
  • standalone
  • Stealth Games
  • steam
  • strategy
  • Strategy Games
  • Strife
  • structure
  • Student Hero Nomination for James Moorby
  • stuntrally
  • style-historical
  • style-retro
  • style-sci-fi
  • summerofcards
  • superpowers
  • supertuxkart
  • Survival Games
  • systemshock
  • Tales of Maj'Eyal
  • TBS
  • td
  • terminal-overload
  • Terra Centauri
  • Tesseract
  • The Castle Doctrine
  • The Great Northern Creative Festival
  • The Great Northern Creative Festival Games Event.
  • The Great Northern Expo award for Games Design 2108
  • The Great Northern Festival - Games Design UCLan
  • The Impact of Play in Society.
  • THE NORTHERN FESTIVAL AWARDS
  • theskyofverdun
  • theyearning
  • Three more Games course Alumni Posters
  • Tips and Trick PS4
  • tobutobugirl
  • tol
  • ToME
  • Top Down Shooter Bugs
  • Top Down Shooter BUGS!
  • torque2d
  • torque3d
  • tournament
  • towerdefense
  • tremulous
  • triangles
  • Trip and Trick PS4
  • tutorial
  • UCLan Alumni selected as part of BAFTA Games Crew.
  • UCLan Alumni Steph McStea named in the 100 rising stars of the UK games industry.
  • Uclan BA(Hons) Games Design Book
  • Uclan Game Jam 2015
  • UCLan Game Jam 2017
  • UCLan Games Alumni 'White Paper Games' featured in both Edge and Games TM Magazines.
  • Uclan Games Design - Night of the Private View 2014
  • UCLan Games Design Alumni
  • Uclan Games Design Alumni are amongst the best at EGX 2017
  • Uclan Games Design Christmas Party 2018.
  • UCLan Games Design Course trip to EGX 2018
  • Uclan Games Design Degree Show 2013
  • Uclan Games Design degree show 2014
  • UCLan Games Design Degree Show 2018
  • UCLan Games Design Degree Show 2019
  • Uclan Games Design Easter Quiz
  • UCLan games design groups present Lego game ideas.
  • Uclan Games Design Induction week 2014
  • Uclan Games Design Second Year student showcase 2014
  • Uclan Games Design Student
  • Uclan Games Design students in Global Game Jam
  • Uclan Games Design visit EUROGAMER 2015
  • Uclan Games Grad Steph McStea is now...
  • Uclan Games Jam 2016 Finale and Awards
  • Uclan Games Student designs Summer Reading Scheme characters for The SCART Club
  • UCLan Games Student enters Rookies Competition 2019
  • Uclan Games students working with 'Soccer Manager'.
  • UCLan Global Game Jam 2016
  • Uclan Groups present GAME JAM concepts
  • Uclan Lecturer
  • Uclan's Games Design Alumni
  • Ukie team on the UK pavilion at Gamescom
  • unvanquished
  • UPS
  • Urho3D
  • valyriatear
  • vdrift
  • vdrift-ogre
  • veraball
  • video
  • video games
  • Views of Preston created by Uclan Games Design Students
  • Visit from Tom Kewell of Foundry 42
  • Visit to Uclan Games Design by Joe Nelson
  • visits Uclan Games Design course
  • voadi
  • voronoi
  • vote
  • voxel
  • vue
  • Warner Bros. visits Uclan
  • warsow
  • warzone2100
  • wesnoth
  • White Paper Games launch 'The Occupation.
  • White Paper Games launch 'The Occupation' at EGX Rezzed 2017.
  • WhitePaper Games QA session with Uclan Games Course
  • windows
  • worldforge
  • wtactics
  • WTS
  • Wurmsyn
  • wyrmsun
  • xonotic
  • ya3dag
  • Year 1 Games Design student completes timelapse concept art film.
  • yodasoccer
  • ysoccer
  • zelda
  • zero-k

Báo cáo vi phạm

Giới thiệu về tôi

Admin
Xem hồ sơ hoàn chỉnh của tôi

Copyright © Cheap Xbox Games | Powered by Blogger
Design by Hardeep Asrani | Blogger Theme by NewBloggerThemes.com | Distributed By Gooyaabi Templates