Skip to content

Minor improvements to gl-Tron#7

Open
flide wants to merge 14 commits into
Chluverman:masterfrom
flide:master
Open

Minor improvements to gl-Tron#7
flide wants to merge 14 commits into
Chluverman:masterfrom
flide:master

Conversation

@flide

@flide flide commented Nov 26, 2015

Copy link
Copy Markdown

Following improvements (according to me ) have been made :

  1. Trail length is now limited : makes the game run longer and you get a chance to try out novel strategies, and opponents don't get to suicide as fequently as earlier.
  2. Game is now on full screen.

flide added 14 commits July 14, 2014 23:29
This is my first attempt to make this game more interesting.
In this first try, I have limited the trail left behind. Interestingly
the trail left behind currenly is measured in number of turns (was
already there in the code, could not help it). So, for now the max trail
left is 10 turns.
Should make this configurable.
Borrowed the logging mechanism from my another project TouchBoard.
and a few cosmetic changes to the code while trying to understand it.
With the previous Logger, the className tag was needed to be set for
each class in it's constructor : inconvenient and too-much to remember.
So, made it now mandatory to pass the class when calling the Logger
methods. Also, added wrappers to the functions in case the programmer
gets as lazy as me and don't want to type the WHOLE name for the logging
functions.
The changes are all cosmetic. All I am trying to do is understand the
code so pepering it up with the log statements and indenting the code to
my taste. Git is still new to me, don't really know how to use it. So I
think all these changes are not relevent for the branch "trail", so want
to switch back to master. Hence, commiting all changes.
Found that the android.os.Handler object was being imported but was not
used anywhere to do anything. So removed the references to the same from
all places.
There were 2 variables _x and _y declared in the class as private but
were used only in one function where there were set and then passed to
the renderer. Could not see how they contributed to the class, so
removed them and refactored the code to work without them.
Have only added a few logging statments and changed another few
intentations, no major refactoring yet.
Since the GLSurfaceView.Renderer is an interface and functionallity-vise
is very similar to a view (albit a bit more specific), I found it easier
to remove an extra layer of object-calling/message-passing
(whatever-it-was) to be... not necessery. Hence, merged the OpenGLView
and OpenGLRenderer classes and refactored (I have come to love that
term) the OpenGLRenderer class completely.
Borrowed the setImmersive function from the Touchboard application.
Games should be run in fullscreen, so here it is.
Switched the whole code to make it work with android.opengl.GLES10
package. Since I am hoping to upgrade the code to GLES 2.0 and maybe to
GLES 3.0, hopefully this is the first step towards it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants