GDR Forum Index
Podcast Podcast
Dev Dev Logs
Search Search
RSS RSS
Register Register
Log in Log in
Reply to topic GDR Forum Index -> Game Developer's Refuge -> Development Log - This And That (unfocused randomness) Page Previous  1, 2, 3, 4, 5, 6, 7, 8  Next
View previous topic :: View next topic  
Author Message
PoV
Moderator

Joined: 21 Aug 2005
Posts: 10859
Location: Canadia
PostPosted: Tue Oct 07, 2014 1:31 pm    Post subject: Reply with quote

:). Love the noises.
_________________
Mike Kasprzak
'eh whatever. I used to make AAA and Indie games | Ludum Dare | Blog | Tweetar
View user's profile Send private message
0xDB
Developer

Joined: 26 Dec 2005
Posts: 1655
Location: Your consciousness.
PostPosted: Tue Oct 07, 2014 1:38 pm    Post subject: Reply with quote

:D (well in Chrome it does sound at least a bit like a classic obnoxious ToBeOnTop drumloop I was trying to emulate but in FireFox... it's just noise, will look into trying to fix that tomorrow)
_________________
0xDB
View user's profile Send private message Visit poster's website
PoV
Moderator

Joined: 21 Aug 2005
Posts: 10859
Location: Canadia
PostPosted: Tue Oct 07, 2014 7:36 pm    Post subject: Reply with quote

Firefox and Chrome clip the sound differently. I wrote about it (I think) in my thread. I forget the details, but I think it's a 'values above 1.0' thing. Like, if you keep your numbers under 1.0, they'll be consistent across browsers, but above 1.0 it's no-mans-sound-land.
_________________
Mike Kasprzak
'eh whatever. I used to make AAA and Indie games | Ludum Dare | Blog | Tweetar
View user's profile Send private message
0xDB
Developer

Joined: 26 Dec 2005
Posts: 1655
Location: Your consciousness.
PostPosted: Tue Oct 07, 2014 9:57 pm    Post subject: Reply with quote

Hm... I'm already clipping them to [0,1] or [-1,1] based on the sparse documentation found in the original sfxr.js code. At least, I think I do... need to investigate. Maybe they grow out of those intervals somehow, somewhere.

update: Hm, so yes, the individually generated samples are already playing correctly. It's a timing problem, FireFox is running the logic loop a bit too fast for the Audio elements to keep up with the fast changes of volume and playback position.
_________________
0xDB
View user's profile Send private message Visit poster's website
0xDB
Developer

Joined: 26 Dec 2005
Posts: 1655
Location: Your consciousness.
PostPosted: Wed Oct 08, 2014 4:44 am    Post subject: Reply with quote

  • improved tracker timing in hello world demo for FireFox by putting tracker update calls into separate timer thread (Chrome still works much better / in FireFox the playback of audio elements seems to be tied to the framerate somehow leading to unsteady timing which often results in garbled sound)
With the framerate in FireFox somehow magically influencing the playback of audio elements, it does not seem possible to get the timing right that way. Maybe porting it to the Web Audio API (assuming that somehow has a better performance timer and runs independent from the browsers render loop) could remedy the problem.

Another option would be to generate an in-memory wave from the whole tracker data and samples and play that instead of playing the individual samples directly but I think that's something I would look into when writing (or porting) a proper tracker.
_________________
0xDB
View user's profile Send private message Visit poster's website
PoV
Moderator

Joined: 21 Aug 2005
Posts: 10859
Location: Canadia
PostPosted: Wed Oct 08, 2014 5:32 am    Post subject: Reply with quote

Oh, I didn't know it wasn't web audio.
_________________
Mike Kasprzak
'eh whatever. I used to make AAA and Indie games | Ludum Dare | Blog | Tweetar
View user's profile Send private message
0xDB
Developer

Joined: 26 Dec 2005
Posts: 1655
Location: Your consciousness.
PostPosted: Wed Oct 08, 2014 5:50 am    Post subject: Reply with quote

Yeah, it's only some sort of pseudo-webaudio as the wave-data is generated at runtime but playback is done in regular old audio elements.
_________________
0xDB
View user's profile Send private message Visit poster's website
PoV
Moderator

Joined: 21 Aug 2005
Posts: 10859
Location: Canadia
PostPosted: Wed Oct 08, 2014 7:40 am    Post subject: Reply with quote

No wonder there's sync issues. Web Audio you have a callback that is triggered once buffers need filling. That's how audio mixing should work. :)
_________________
Mike Kasprzak
'eh whatever. I used to make AAA and Indie games | Ludum Dare | Blog | Tweetar
View user's profile Send private message
0xDB
Developer

Joined: 26 Dec 2005
Posts: 1655
Location: Your consciousness.
PostPosted: Tue Oct 14, 2014 7:22 am    Post subject: Reply with quote

"whatever I'm currently doing" thread fodder un-related to Refugee Lib (unless I end up adding ISOmetric projection functions to it at some point):

_________________
0xDB
View user's profile Send private message Visit poster's website
0xDB
Developer

Joined: 26 Dec 2005
Posts: 1655
Location: Your consciousness.
PostPosted: Thu Oct 30, 2014 6:18 am    Post subject: Reply with quote

Audio stuff is on the mental backlog for now as I find it more interesting to learn webgl at the moment.

I love the fact that webgl is so low level that there are no convenience matrix math functions builtin and all rendering/transformations must be done/calculated manually by writing custom fragment and vertex shaders. This makes the initial learning curve a bit steep as there is no quick and easy immediate mode to just get that first triangle up for display (also no 3D for free, providing incentive to learn how to calculate projections and do transformations manually) but I am sure it will be totally worth it to learn these things as it will allow a very fine level of control over the rendering process (and this in turn will make it fairly "easy" to emulate the graphics output of old homecomputers/consoles machines and possibly applying all sorts of crazy custom filters, simply by stacking additional shaders).

useful WebGL (learning and reference) links:
http://analyticalgraphicsinc.github.io/webglreport/ (the interesting bit here is that on my Windows7 system, the actual rendering of the WebGL programs is performed using D3D11 via a renderer subsystem called ANGLE)
https://www.khronos.org/webgl/
http://www.webglacademy.com/
http://glmatrix.net/

Refugee Lib update:
  • split rlG into rlG, rlColors and rlCursors / moved color conversion from rlG to rlColors
  • added gl-matrix.js ( source: http://glmatrix.net/ )
  • added WebGLContextAttributes parameter to engine and webgl context initialization methods
  • added getters for GL and G2D contexts to rlEngine
  • added "script/shaders" folder and two basic 2D shaders (vertex: for classic 2D pixel transform in canvas coordinates, fragment: solid color)
  • added documentation for undocumented parameter "overrideResponseType" in rlData.startload
  • added optional overrideResponseType property evaluation on source object literals in rlDataManager.startload (to load textfiles(for shaders!) as text)
  • split rlG again into rlG2D and rlGL
  • added to rlGL: buildShader, buildProgram, loadProgram
  • added to rlUtilsConvert: nToMinLengthString
  • fixed bug in rlDataManager.onItemError which could cause onLoadFinished to never be called in certain cases of an item load failure
  • added rlExample_rlGL (linked from stub tutorial 03 in docs)
  • added/updated documentation for new/changed methods
summary: refactorings/fixes/some basic webgl convenience methods for building/loading shaders/programs from files

basic (my first triangle in webgl!) rlGL example:

_________________
0xDB
View user's profile Send private message Visit poster's website
0xDB
Developer

Joined: 26 Dec 2005
Posts: 1655
Location: Your consciousness.
PostPosted: Sat Jan 17, 2015 2:55 am    Post subject: Reply with quote

Refugee Lib is on ice for an indeterminate amount of time... like everything else. Erase and rewind. Deleted all my tweets, deviantart and pixeljoint galleries, put homepage into hibernation state and informed fb to delete my account (I had only been there for about a year anyway and it turned out I wasted too much time on there and it did not make me happy).

So... goodbye web stuff(I still love you but your quirks are annoying) and hello SDL2.The first SDL2 program looks a little dirty (mixing C++ and C) but was sufficient for testing the build process:
Code:
// main.cpp
#include <iostream>
using namespace std;

#include "SDL.h"
#include "SDL_video.h"

int main(int argc, char** argv)
{
  int exitCode = 0;
 
  if(0 == SDL_Init(SDL_INIT_VIDEO))
  {
    cout << "\nSDL_Init ok."; 

    SDL_Window* winMain = NULL;
   
    winMain = SDL_CreateWindow("Hello World!", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 400, 300, SDL_WINDOW_OPENGL | SDL_WINDOW_RESIZABLE);
   
    if(winMain != NULL)
    {
      // primitive event loop
      bool quit = false;
      SDL_Event e;
      while(!quit)
      {
        SDL_PollEvent(&e);
        quit = (e.type == SDL_QUIT);
        if(!quit)
        {
          cout << "\nevent(" << e.type << ")";
        }
      }
     
      SDL_DestroyWindow(winMain);
    }
    else
    {
      exitCode = -2;
      cout << "\nSDL_CreateWindow failed: " << SDL_GetError();
    }
   
    SDL_Quit();
  }
  else
  {
    exitCode = -1;
    cout << "\nSDL_Init failed: " << SDL_GetError();
  }
   
  return exitCode;
}


Currently I do not have an IDE set up, so I am using leafpad (plain text editor) and two shell scripts.

The test "project" directory structure looks like this:
Code:
+---bin
|   +---test
+---build.sh
+---run.sh
+---src
    +---main.cpp
build.sh
Code:
g++ -o ./bin/test ./src/*.cpp `sdl2-config --cflags --libs`
run.sh
Code:
./build.sh
./bin/test
echo -e "\nexit code: $?"
Whenever I feel motivated to continue I will look into learning how to use Emacs.
_________________
0xDB
View user's profile Send private message Visit poster's website
Sirocco
Moderator

Joined: 19 Aug 2005
Posts: 9441
Location: Not Finland
PostPosted: Sat Jan 17, 2015 7:03 am    Post subject: Reply with quote

Quote:

SDL_CreateWindow


The CamelCase thing, combined with the Hungarian-style all-caps prefix, severely offends my delicate sensibilities. Otherwise I find SDL2 rather comfy. It's largely dogmatic in its execution, aside from a few offshoots that don't conform to the rest of the lib. I'm thinking mostly of the mixer when I say that.

The other nice thing is that there's almost always a way to get states in bulk, rather than relying on the event system. Choices are good.
_________________
NoOP / Reyn Time -- The $ is screwing everyone these days. (0xDB)
View user's profile Send private message Visit poster's website
mikedoty
Developer

Joined: 18 Mar 2006
Posts: 1788

PostPosted: Sat Jan 17, 2015 10:09 am    Post subject: Reply with quote

I've been using sublime text 2 for linux, it's free to use as long as you don't mind a nag popup once in a while (few hours?) after you save a file. It seems like it has a lot of features, i.e. would have too much and cause bloat, slowdown... but it's pretty quick to launch / quit despite. I only downloaded it because gedit would jam up and crash after I upgraded to 14.whatever. I do use LEAFPAD if I want to open a single file and make a small edit. LEAFPAD!
_________________
The end of the game, yes, is pretty much getting the weapon and killing off the population.
mashup games . com | Finally! - A Lode Runner Story
View user's profile Send private message Visit poster's website AIM Address
0xDB
Developer

Joined: 26 Dec 2005
Posts: 1655
Location: Your consciousness.
PostPosted: Sun Jan 18, 2015 6:34 am    Post subject: Reply with quote

Sirocco wrote:
Quote:
SDL_CreateWindow
The CamelCase thing, combined with the Hungarian-style all-caps prefix, severely offends my delicate sensibilities.
Maybe they are trying to unite the churches of the HUNgarians, CamelCasians and the under_scorians in an attempt to restore peace and order throughout the galaxy. I still have not made up my mind which style I prefer, looking at old code it seems I have used all three at some point, even mixed them, especially the hungarian type indicator notation with one of the others. I do not think I ever mixed underscores with camelcase though.

I am thinking of just using alllowercasestyle for my new code since that provides the best typing flow and requires the least amount of finger movement.

mikedoty wrote:
I've been using sublime text 2 for linux, it's free to use as long as you don't mind a nag popup once in a while (few hours?) after you save a file. It seems like it has a lot of features, i.e. would have too much and cause bloat, slowdown... but it's pretty quick to launch / quit despite.
That is why I want to learn Emacs. It is supposed to be quite powerful if one knows how to use it and can save one from having to type too much and I think it has options to extend it with custom tools and running shell scripts or something, so it can be modeled/customized into a full featured IDE (without ever becoming bloated like Visual Studio or Eclipse). I think it is even possible to run an IRC client directly inside emacs so one does not even have to leave the IDE to get distracted. :D

---

Digging up a couple of bits from the past.

I just searched for "*.h,*.hpp,*.c,*.cpp,*.pas,*.inc,*.cs,*.java,*.s,*.asm,*.html,*.js" in my development folder (private projects only).

23,515,757 bytes in 2275 files (probably containing some duplicates/versions of same files and maybe a few files I did not write myself)

oldest file: HANOI.PAS January 17th 1998 (my first pascal program ever)
newest file: main.cpp January 17th 2015 (my first SDL2 test)

Funny coincidence that both files were modified on January 17th, clearly a sign of...

So... that seems like a lot of code. Now comes the daunting task of trying to sort/merge/salvage what I can from all of that:

I keep stumbling over stuff and think to myself "wow, that is brilliant, you used to be a highly prolific genius Dennis and look at you now...".

Other times I am like "wow, that is the messiest, silliest hacky lump of crapcode I have ever seen, what where you thinking Dennis?".

And then there also seems to be a bunch of overengineered "rock solid" code with way too many unnecessary error checks and attempts of the program to self-repair and continue with whatever b0rked data it is being fed when it should really just gracefully crash and tell the user to go f* themselves(only with an insightful error message instead of the f word of course).

Or it is a huge lump of objects oddly entangled who communicate with each other passing around messages, adding too much overhead to something which could be better/easier controlled by some all-knowing god-function which would just access the data directly and then fuck around with it.

So... I am thinking... it is probably best if I adapt a new coding style, object oriented conceptually but sticking to the simplest possible way of doing it... I am thinking of a classless C style, completely separating dumb data from functionality, prefering elegant simplicity over elegant(yet complicated in syntax and semantics) language constructs.

Writing code, modeling complex systems, should be dead simple really if one thinks about it as basically three things:
1. data
2. manipulation of data
3. presentation of data

It should be a core concern to separate these three programmatically and not entangle them in a way that one can not exist without the other for that only makes things awfully hard to modify/expand.
_________________
0xDB
View user's profile Send private message Visit poster's website
PoV
Moderator

Joined: 21 Aug 2005
Posts: 10859
Location: Canadia
PostPosted: Sun Jan 18, 2015 8:33 am    Post subject: Reply with quote

To be fair, given your options:

sdlCreateWindow
sdl_CreateWindow
SDLCreateWindow
SDL_CreateWindow

SDL_ stands out the most, is the most correct given the name is SDL (and not sdl), and is a reasonable way of achieving the idea of namespaces without namespaces. You can look at the resulting code and know exactly what code is SDL and what isn't.

I'm pretty sure I've talked about this before, but when it comes to long names/ideas, I occasionally use them to clarify ideas.

Test_Point_Vs_DualCapsule2D(...)
Nearest_InnerEdgePoint_On_CapsuleChain2D(...)
Nearest_Point_OnEdgeOf_EdgedPolygon2D(...)
Nearest_CornerPointIndex_OnEdgeOf_EdgedPolygon2D(...)

That versus:

TestPointVsDualCapsule2D(...)
NearestInnerEdgePointOnCapsuleChain2D(...)
NearestPointOnEdgeOfEdgedPolygon2D(...)
NearestCornerPointIndexOnEdgeOfEdgedPolygon2D(...)

Each of those is an outrageous mess of words without the underscores. Using the underscores to separate ideas really improves the readability.


Also, the blur test.



IMO a good coding style is one you can infer things from code without even reading. SDL_ works well here, as do the huge functions. If everything had underscores (or didn't have underscores), you couldn't hone in on ideas. If underscores are used to separate ideas, your eyes can jump from idea to idea without reading.
_________________
Mike Kasprzak
'eh whatever. I used to make AAA and Indie games | Ludum Dare | Blog | Tweetar
View user's profile Send private message
Sirocco
Moderator

Joined: 19 Aug 2005
Posts: 9441
Location: Not Finland
PostPosted: Sun Jan 18, 2015 1:58 pm    Post subject: Reply with quote

Quote:

SDL_ stands out the most, is the most correct given the name is SDL (and not sdl), and is a reasonable way of achieving the idea of namespaces without namespaces. You can look at the resulting code and know exactly what code is SDL and what isn't.


I actually don't have a problem with that. I prefix my framework routines with FR_, but everything after that is lower case and separated with underscores. CamelCase offends me worst of all, and I constantly end up with compile errors because missed a cap somewhere. Ohthehorror.jpg. Sadly, when words bump together it destroys my brain's ability to quickly process them. But perhaps that's because I have always been able to read quickly?
_________________
NoOP / Reyn Time -- The $ is screwing everyone these days. (0xDB)
View user's profile Send private message Visit poster's website
PoV
Moderator

Joined: 21 Aug 2005
Posts: 10859
Location: Canadia
PostPosted: Sun Jan 18, 2015 4:34 pm    Post subject: Reply with quote

I need my StudlyCaps/CamelCase. To me, therapist is a person that helps you through your mental problems. ;)
_________________
Mike Kasprzak
'eh whatever. I used to make AAA and Indie games | Ludum Dare | Blog | Tweetar
View user's profile Send private message
0xDB
Developer

Joined: 26 Dec 2005
Posts: 1655
Location: Your consciousness.
PostPosted: Mon Jan 19, 2015 2:06 am    Post subject: Reply with quote

PoV wrote:
I need my StudlyCaps/CamelCase. To me, therapist is a person that helps you through your mental problems. ;)
(Maybe the rapist thinks of itself that way when it performs its cruel act.)


When I think of what style to use in the future my primary concern is to choose what will be most efficient. What will cause the least amount of stress on the hands, the least amount of muscle movement and the least amount of stretching and twisting of fingers across the keyboard. Both camelcase and underscore require pressing the shift key a lot, which puts strain on the pinkies and causes pain after a day of writing code.

With emacs(or perhaps by changing the keyboard layout at the driver level) it might be possible to put the underscore on a key so it would not require the shift key to be held down. Then I could have strong visual separation of words/ideas and painless typing flow at the same time.

I started going through the builtin emacs TUTORIAL yesterday(69% through it) and I already love it because it allows me to navigate/edit a text file efficiently without ever having to move either hand away from the main keyboard area. No need for cursor keys, numberpad or the mouse.
_________________
0xDB
View user's profile Send private message Visit poster's website
0xDB
Developer

Joined: 26 Dec 2005
Posts: 1655
Location: Your consciousness.
PostPosted: Tue Jan 20, 2015 6:27 am    Post subject: Reply with quote

Done reading the built-in Emacs tutorial and the basic online guide and compiled a list of the commands introduced in them:
Code:
EMACS KEYS/Commands from TUTORIAL and GUIDED TOUR (C CTRL, M META(ALT))

C-l     display current line at center/top/bottom of view
        (press repeatedly to cycle center/top/bottom)

C-v     Next Page
M-v     Previous Page

C-f    Move forward a character
C-b    Move backward a character

M-f    Move forward a word
M-b    Move backward a word

C-n    Move to next line
C-p    Move to previous line

C-a    Move to beginning of line
C-e    Move to end of line

M-a    Move back to beginning of sentence
M-e    Move forward to end of sentence

C-<     Move to start of file
C->     Move to end of file
       
M-g-g n jump to line n
       
C-u n   Repeat next command n times
M-n     Repeat next command n times
        e.g. C-u 80 - write 80 dashes in a row
        on some commands (C-l) the n selects a command variant
        e.g. C-u 0 C-l moves the line with the cursor to top

C-g     discard/cancel command
    
C-x 1 maximize and discard other windows
C-h k <key/command> describe command (long documentation)
      (also F1 or M-x help)
C-h c <key/command> get help for command (e.g. C-h c C-p)
C-h f <function> describe a function
C-h v display documentation of variables
C-h a list commands containing a keyword
C-h i read manuals (info) for all installed packages on system     
    
<DEL>        Delete the character just before the cursor
C-d            Delete the next character after the cursor

M-<DEL>      Kill the word immediately before the cursor
M-d         Kill the next word after the cursor

C-k         Kill from the cursor position to end of line
M-k         Kill to the end of the current sentence
    
C-<SPC>      Set Mark (then move cursor to highlight text)
C-x C-x      swap cursor/mark
C-u C-<SPC>  cycle through last (up to 16) marks
C-x h        highlight whole buffer
M-h          highlight current paragraph
    
C-x n n      Narrow(restrict editing) to the current highlighted
                 region (everything is invisible then but still exists)
C-x n w      Widen(unrestrict editing) to the whole buffer
    
C-w          Kill highlighted text
C-y          Yank (bring back at cursor) last killed text
M-y          (after C-y) cycle through previous kills
C-/          UNDO (also C-_ or C-x u)
       
C-x C-f      Find(visit/open/create) a file
                     (C-g to cancel minibuffer input for name)
C-x C-s      Save the file
C-x C-b      List buffers (opened files)
C-x k        Kill a buffer (close)
C-x 1        switch to current buffer, get rid of others
C-x b name   switch to buffer name
C-x s        Save some buffers (ask for each which has changes)
    
C-x C-c      End emacs (will ask to save changes)
C-z          suspend emacs
%emacs or fg (on shell) resume emacs after it was suspended

M-x name     execute extended command with given name
             (e.g. replace-string) has <TAB> completion
                recover-file (loads an autosave for an opened file)
                 
M-x *-mode   switch to another major editing mode
             e.g text-mode, fundamental-mode
M-x *-mode   also toggles minor modes
C-h m        view documentation for current major mode
       
C-x f        set fill-column (margin for minor mode
             auto-fill-mode)
M-q          refill paragraph (in auto-fill-mode)
       
C-s          forward search (incremental (as you type))
             <Return> terminates search
             C-s again to jump forward to next occurence
C-r          reverse search
             C-r again to jump back to previous occurence
<DEL> in search mode: jump to last found occurence or if there
                      is none, remove last character from
                      incremental search string
M-%          Query replace (interactive search/replace)
C-M-s        Regular expression incremental search
C-M-r        Regular expression incremental reverse search
M-x re-builder Open regular expression builder
M-x occur    List matches for regular expression in new buffer
M-x replace-regexp Regular expression search&replace
    placeholder in replacement string -> expands to
    \&           -> the original found text
    \1, \2, etc. -> the 1st, 2nd, etc. parenthesized subgroup in
                    the matched text
    \#           -> the number of replacements done so far
    \?           -> user string entered on prompt per match
    \m(lisp-expression...) -> the result of any function evaluation

C-x 1        current buffer in single view mode
C-x 2        split view in two views horizontal split
C-x 3        split view in two views vertical split
(splitting can be done repeatedly to create sub-splits)
C-x o        move cursor to other view
C-M-v        scroll other view
C-x 4 C-f    find/open/create file in other view
       
M-x make-frame    create new emacs window
M-x delete-frame  remove current emacs window (last one exits)
       
<ESC><ESC><ESC> all-purpose "get out" command to leave
                (e.g. to leave a recursive editing mode
                indicated by [] around the major mode name
                       
F3           Start recording macro
F4           Stop recording macro
F4           Play back macro once
M-n F4       Play back macro n times
M-0 F4       Play back macro until it fails

_________________
0xDB
View user's profile Send private message Visit poster's website
0xDB
Developer

Joined: 26 Dec 2005
Posts: 1655
Location: Your consciousness.
PostPosted: Thu Jan 22, 2015 7:45 am    Post subject: Reply with quote

Gained some more Emacs experience, here is the full (probably a dry read and boring for Emacs experts but might be useful for other newbies) report:

Looking for extensions to turn Emacs into a full featured IDE, I found CEDET and ECB.

http://cedet.sourceforge.net/ ( Collection of Emacs Development Environment Tools )
http://ecb.sourceforge.net/ ( Emacs Code Browser )

However the information on those pages does not seem to be up-to-date and googleing for setup instructions only revealed outdated blog entries and articles but nothing from 2014 or 2015.

CEDET seems to already be built-in with recent versions of Emacs and the ECB page lists the latest release of ECB(2.40) as from around 2009.

Luckily, I also found an Emacs wiki which seems to contain fairly current information and after some reading, I decided I would try to install and configure ECB using the package manager which comes with current Emacs versions.

http://www.emacswiki.org/emacs/ELPA ( Emacs Lisp Packages Archive )

Then inside Emacs via "M-x list-packages" I installed "ecb" (listed as version 20140215.114) from the "melpa" package archive and followed the instructions which popped up in an extra frame after selecting the package.

In those instructions it listed some other packages("Semantic", "Eieio" and "speedbar") as requirements.
"semantic" and "eieio" already came builtin with the version of Emacs (24.4.1) I had installed.
There was no package listed named "speedbar" but "C-h a speedbar" revealed that Emacs already knew a function named "speedbar" and "M-x speedbar" opened an extra buffer showing a folder structure so I just assumed I would not need to install that requirement either.

So I proceeded and just installed that ecb package from the melpa archive (Emacs did not show a progress bar while dloading it, so I just patiently stared at the "contacting..." message in the minibuffer line at the bottom of the screen). After it was done dloading, it blasted a couple of "extracting..." messages over the minibuffer and then opened a "*Compile-Log*" buffer in the top frame.

That was a long log and I did not feel like skimming for errors manually, so I used my previously gained Emacs beginners knowledge to go "C-s error" and then pressing C-s repeatedly and I found a couple of error messages which all together revealed that some files "jn-tree-node , jn-utils, jn-window and jn-tree-view" were missing.

Looking at(and searching) the messages buffer (C-x b *M<TAB>) however I could locate those files in "~/.emacs.d/elpa/ecb-20140215.114/ecb2/" so I copied them into "~/.emacs.d/elpa/ecb-20140215.114/" and inside Emacs re-ran the compilation as described in the ecb package readme, by "M-x ecb-byte-compile".

The resulting *Compile Log* now contained even more errors (about void function definitions and invalid lambda variables) so I assumed that maybe those files are part of an unused/unfinished piece of code and put them back where I originally found them and recompiled again and decided to ignore the missing file errors for now.

At first I had put "(require 'ecb)" into my "~/.emacs" init file but that lead to an error message after restarting Emacs saying it could not find that file. The "ecb-..." functions where still available (as M-x ecb-<TAB> revealed) though, so I assume if the package manager puts anything into "~/.emacs.d/" it is either loaded automatically or the package manager tells Emacs in some other way where to find it and how to load it.

So I restarted Emacs again, typed "M-x ecb-byte-compile" again and this time it did not show any log, just a short message in the minibuffer stating that all requirements to use ECB are met.

"M-x ecb-activate" then started ECB. The initial layout looks plain, containing 5 mostly empty frames, one main frame showing the last edited buffer and four others labeled W-0 to W-3. Emacs shows a new pull-down menu labeled "ECB" at the window tops menu bar now.

Here is a screenshot of how my Emacs looks now, also containing my current init file showcasing the fancy crosshair cursor mode which can be found searching the web :).



And next up I will look into customizing the layout, colors and how to add keyboard re-mapping (for the pain free underscore) and how to save/load the session.
_________________
0xDB
View user's profile Send private message Visit poster's website
Sirocco
Moderator

Joined: 19 Aug 2005
Posts: 9441
Location: Not Finland
PostPosted: Thu Jan 22, 2015 4:51 pm    Post subject: Reply with quote

Quote:

Gained some more Emacs experience


If you keep this up, you'll soon be ready to grow your Unix Beard.
_________________
NoOP / Reyn Time -- The $ is screwing everyone these days. (0xDB)
View user's profile Send private message Visit poster's website
0xDB
Developer

Joined: 26 Dec 2005
Posts: 1655
Location: Your consciousness.
PostPosted: Fri Jan 23, 2015 12:23 am    Post subject: Reply with quote

Sirocco wrote:
If you keep this up, you'll soon be ready to grow your Unix Beard.
I have not shaved in over a year...
I sometimes cut the longer strands above the mouth when they start to interfere with loading food. Well... I would not go as far as calling the sparse(yet individually long) population of hair in my face a beard but it serves me well as a constant reminder to not give a f#@$! about what the other monkeys might think of me. Also facial hair gives a +3 buff on thought processing and if it looks sufficiently repelling, one never lacks a comfortable zone of private space around them in public.

_________________
0xDB
View user's profile Send private message Visit poster's website
0xDB
Developer

Joined: 26 Dec 2005
Posts: 1655
Location: Your consciousness.
PostPosted: Sat Jan 24, 2015 6:07 am    Post subject: Reply with quote

Appearance customization in progress using (what else?!) C64 charset+palette... configuring the 16 colors to work nicely in different editing modes, and in a way that they do not visually break highlights/search matches & marked regions, turned out to be a nice Saturday morning puzzle. I feel like those colors might work well in day to day code editing (not all possible modes are shown in the screenshot):

_________________
0xDB
View user's profile Send private message Visit poster's website
Sirocco
Moderator

Joined: 19 Aug 2005
Posts: 9441
Location: Not Finland
PostPosted: Sat Jan 24, 2015 8:27 am    Post subject: Reply with quote

Very nice. Kinda seems like it needs a little more contrast. But sticking to the c64 palette, as you've noted, makes things tricky.
_________________
NoOP / Reyn Time -- The $ is screwing everyone these days. (0xDB)
View user's profile Send private message Visit poster's website
0xDB
Developer

Joined: 26 Dec 2005
Posts: 1655
Location: Your consciousness.
PostPosted: Sat Jan 24, 2015 4:09 pm    Post subject: Reply with quote

Sirocco wrote:
Very nice. Kinda seems like it needs a little more contrast. But sticking to the c64 palette, as you've noted, makes things tricky.
Yeah, I used the muted Pepto C64 palette and tried some higher saturation and increased brightness configurations as well but in the end I decided to stay with this one because it ties everything together, making it easy to find/distinguish different code elements but at the same time does not cause anything to jump out too much to burn my eyes when I stare at the code for extended periods of time.

I also like how the comments fade into the back so they are there if one wants to read them for clarification but they do not steal any attention away from the code.

But all this needs to be tested and evaluated over a real coding session to see how it works out.

I forgot to describe the details about the customization process (for ECB/CEDET) for those who might be interested in it:

M-x ecb-activate
starts ECB mode

M-x customize-option <RET> ecb-source-path
configures directories where ECB can find source files

M-x ecb-customize-most-important
lists essential options for ECB

M-x ecb-show-help | C-c . h
opens the ECB help file
when I first tried this, it did not work, showing the message "ecb-error: ECB 2.40 - Error: Info file /home/dennis/.emacs.d/elpa/ecb-20140215.114/info-help/ecb.info does not exists!"
however...
M-x customize-option <RET> ecb-help-info-path
...was used to successfully point it to the correct path (same as before except without the info-help subfolder)

Color/font customization was done mainly using the search function in an "M-x customize" buffer, searching for options containing "face" or "font".

Used keyboard remapping as describe here ( http://ergoemacs.org/emacs/emacs_key-translation-map.html ) to get painfree_single_keypress_underscore (by switching underscore with backtick for I rarely need the backtick but the backtick key being right above TAB on my keyboard is in a comfortable location for frequent access).

Following http://alexott.net/en/writings/emacs-devenv/EmacsCedet.html I configured the semantic parsing/highlighting and additional TAGS menu for the menu bar. "global-cedet-m3-minor-mode" for the semantic-default-submodes did not work for me though causing the entire semantic-mode to fail to initialize however it seems that the right-click context menu as described in that mode is already activated by default.

Saving the current Emacs session is as simple as typing "M-x desktop-save" and loading it can be done by "M-x desktop-read" and with "M-x desktop-change-dir" before the first save, it is possible to set the directory where Emacs will save the session file(the change command will also automatically load a session file if it finds one after changing the dir). This is very useful since projects are usually organized in separate folders anyway and it makes sense to save the session along with the project it is being used for.

("M-x desktop-clear" empties the current layout and kills all buffers except internal ones)

Small shot showing the "matching parantheses highlighting" (I moved the other one to the end of the block line to illustrate how this can be used to spot it quickly when it is not where I usually expect it... if it was missing entirely the closing one would be shown with a red background):


The next shot shows more fancy stuff "auto complete tooltip at cursor", "arrows and buffer boundaries in fringe", "current function signature in top bar" and almost unnoticable "a lack of scrollbars" (I removed them to condition myself into the good habit of finding my stuff using the search functions or the code browser and bookmarks instead of scrolling around aimlessly):


Something else I will need to do is customize some keyboard shortcuts to quickly jump around between buffers and sub-windows and at some point I need to learn how to integrate and use the GNU debugger and also how to write proper build scripts (or makefiles) but before all that I must finish following http://alexott.net/en/writings/emacs-devenv/EmacsCedet.html as there is still much more to configure (I am only about 33% done).

Will spend a lot of time using this environment so setting it up "right" so that it makes me feel good just by looking at it is very important. :)
_________________
0xDB
View user's profile Send private message Visit poster's website
Reply to topic GDR Forum Index -> Game Developer's Refuge -> Development Log - This And That (unfocused randomness) Page Previous  1, 2, 3, 4, 5, 6, 7, 8  Next

Use this link to get a Sign-On Bonus when you get started!

All trademarks and copyrights on this page are owned by their respective owners. All comments owned by their respective posters.
phpBB code © 2001, 2005 phpBB Group. Other message board code © Kevin Reems.