Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #37803

Re: Tetris rough draft (very rough)

Newsgroups comp.lang.javascript
Date 2019-11-16 21:53 -0800
References <19746231-7b69-47b2-b5c3-21d97a7227de@googlegroups.com>
Message-ID <d5d45944-e196-4478-a3f8-11f4b96ba4e1@googlegroups.com> (permalink)
Subject Re: Tetris rough draft (very rough)
From luserdroog <luser.droog@gmail.com>

Show all headers | View raw


On Saturday, November 16, 2019 at 6:13:35 PM UTC-6, luserdroog wrote:
> Many thanks for the suggestions to my questions about
> my game loop. I have it a little more fleshed out now.
> But there are a whole host of little problems, not least
> of which is the sluggish response. I'm also having 
> difficulty getting the pieces to rotate around their
> center points. 
> 
> I chose to represent a tetromino piece as a 4x4 bitmap 
> in an integer expressed in hexadecimal. This worked great 
> on paper, but the logic to manipulate them is getting a 
> little cumbersome and confusing.
> 

Found a nice graphic at tetris.wiki/Arika_Rotation_System 
which suggests that I can handle rotation around a center
by adjusting my placement of the bits in the 4x4 frame.
I also think things will be easier if I represent the board
as s 2D array instead of an array of integers.

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Tetris rough draft (very rough) luserdroog <luser.droog@gmail.com> - 2019-11-16 16:13 -0800
  Re: Tetris rough draft (very rough) luserdroog <luser.droog@gmail.com> - 2019-11-16 21:53 -0800
  Re: Tetris rough draft (very rough) Julio Di Egidio <julio@diegidio.name> - 2019-11-22 09:07 -0800
    Re: Tetris rough draft (very rough) luserdroog <luser.droog@gmail.com> - 2019-11-22 21:47 -0800
      Re: Tetris rough draft (very rough) Julio Di Egidio <julio@diegidio.name> - 2019-11-23 05:47 -0800

csiph-web