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
Gil
Developer

Joined: 14 Nov 2005
Posts: 2341
Location: Belgium
PostPosted: Sat Jan 24, 2015 11:03 pm    Post subject: Reply with quote

I like low contrast too. It's a thing. High contrast text makes my eyes hurt, but too low of a contrast and the code becomes harder to read, again stressing the eyes. There's a sweet spot there somewhere :)
_________________
PoV: I had to wear pants today. Fo shame!
View user's profile Send private message Visit poster's website
0xDB
Developer

Joined: 26 Dec 2005
Posts: 1655
Location: Your consciousness.
PostPosted: Sun Jan 25, 2015 9:36 am    Post subject: Reply with quote

Finding the sweet spot... that seems to be a re-curring task in being and in every activity. If one just starts and keeps changing things which do not feel right though it is bound to come automatically.

Completion hints in a tool-tip as previously shown did not feel all that useful because the tooltip would vanish after 10 seconds and also, in a mode where it would display the full function signatures(or TAG info) of the known completions, it could happen to be cut off at the screen boundaries.

So, I configured auto-complete hints to display in the *Completions* buffer now and so that they show the full function signature (which will save a trip or two to documentation files):


Also, "function signature(or TAG info) in minibuffer at the bottom" when cursor rests over TAG looks nice as well:


The semantic parsing and auto-complete thing already helped me discover that I was including the wrong SDL header(in the SDL instead of the SDL2 path) all along for some functions never showed up in the suggestions.

Added the *TAG DOCUMENTATION* buffer to the list of buffers for ECB to display in the bottom window/frame and added "C-c d" as a shortcut to call "semantic-ia-show-doc" which parses comments above the definition of the tag under the cursor and writes them into that *TAG DOCUMENTATION* buffer. This will be extremely useful when the short summary in the form of the TAG definition (function signature in case of this screenshot) is insufficient and more details are needed (this will save even more trips to external documentation files):

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

Joined: 18 Mar 2006
Posts: 1788

PostPosted: Sun Jan 25, 2015 5:20 pm    Post subject: Reply with quote

You'll regret those hard-coded cout << statements one day! I regretted all of mine! :)
_________________
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
PoV
Moderator

Joined: 21 Aug 2005
Posts: 10859
Location: Canadia
PostPosted: Sun Jan 25, 2015 6:06 pm    Post subject: Reply with quote

Hello my name is PoV and I am a cout-a-holic. I've been cout-free for 8 years.
_________________
Mike Kasprzak
'eh whatever. I used to make AAA and Indie games | Ludum Dare | Blog | Tweetar
View user's profile Send private message
AdmiralTofu
Contributor

Joined: 02 Nov 2009
Posts: 191
Location: Millville, NJ
PostPosted: Sun Jan 25, 2015 8:07 pm    Post subject: Reply with quote

You can take my std::cout when you pry it from my cold, dead fingers.
_________________
Dev log - Adventure in Rulon
Dev log - Acronia

---
Twitter - @HadroSoft
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger
0xDB
Developer

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

The code in the screenshots is throw-away quick and dirty test code I used to get started with SDL2. I do not plan to re-use/maintain it beyond that initial test.
_________________
0xDB
View user's profile Send private message Visit poster's website
PoV
Moderator

Joined: 21 Aug 2005
Posts: 10859
Location: Canadia
PostPosted: Mon Jan 26, 2015 8:05 am    Post subject: Reply with quote

COUT! DERE IT IS! COUT! DERE IT IS!
_________________
Mike Kasprzak
'eh whatever. I used to make AAA and Indie games | Ludum Dare | Blog | Tweetar
View user's profile Send private message
sonrisu
Moderator

Joined: 31 Aug 2005
Posts: 4988
Location: Silicon Valley!
PostPosted: Mon Jan 26, 2015 10:31 am    Post subject: Reply with quote

Code:
cout << "I don't always cout, but when I do, I";


:]
_________________
loomsoft :]
View user's profile Send private message Visit poster's website
Sirocco
Moderator

Joined: 19 Aug 2005
Posts: 9441
Location: Not Finland
PostPosted: Mon Jan 26, 2015 5:01 pm    Post subject: Reply with quote

I'm a C programmer. I scoff at your streams, and templates... and .... stuff :P
_________________
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: Tue Jan 27, 2015 4:46 pm    Post subject: Reply with quote

I used to be a C++holic... tried to use every language feature I knew of just because I could. That was a few years ago though, before C++11 was around and I think I did that mostly while I was still learning the language. With C++11 I do not have a working knowledge of any of the "new" features and I probably forgot most of the stuff from the old C++ standard as well. The knowledge will come back fast when I get around to salvaging my old code... only that I will probably axe most of it and rewrite it into simpler pieces.

I am about done with the Emacs customization, so I can start doing some coding soon and then find what I am still missing to make my life easier. Added a few more keyboard shortcuts for jumping to the declaration of the tag under the cursor, finding all references to the tag, folding the current function in the source edit buffer, narrowing the buffer to the current function and widening it again.

Also configured the SRecoder package which provides creation/insertion of code templates (not to be confused with C++ templates) and adds some generator stuff which can save me a bit of repetitive typing. For example, the SRecoder can generate a doxygen style comment skeleton for the function under the cursor.

Starting/integrating the GNU debugger is actually simple for it already is integrated in Emacs in the gdb mode.
To start it, I do "C-x 5 2"(which opens a new frame(or window in window manager terms)) and in the new frame, "M-x gdb". The minibuffer then prompts for a commandline which is already filled as "gdb -i=mi main.cpp" and I edit it to point to the executable to debug instead (e.g.: gdb -i=mi ../bin/test).

I have configured "gdb-many-windows" in the GDB customization options, so after that last command-line, the debugger frame shows up with a couple of useful buffers(command line interface for gdb, locals, code, standard output, call stack, breakpoints) already open:


The debug process can be started by typing "run" in the gdb commandline buffer or by using the pulldown menu at the top.

Breakpoints(purple dot) can be set/unset by clicking in the fringe and toggled(grey dot) active/inactive by C-clicking them. While the debugger is running, hovering the mouse over a symbol shows its current value in a tooltip (also in the "Locals" buffer in this case) and from the "Locals" buffer, opening a speedbar with a convenient Watch over a symbol is only a rightclick away:


So except for the fact that I am still doing the build process in a shell script and not by using the proper project management facilities for that (too lazy to look into that right now) my Emacs environment is all set up to get crackin'... although, integrating a source version control package might also be neat... that way, I could stay inside Emacs all the time.

I dub thee GNU developers refuge.
_________________
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 29, 2015 7:26 am    Post subject: Reply with quote

Added more keyboard shortcuts for quickly navigating between windows/frames/buffers (one goal is to minimize use of the mouse, so whenever I do that, I try to find out how to do the same thing using only the keyboard and if it is not preconfigured and frequently needed I add it to my .emacs file).

Also looked into using the project management facilities (EDE) today, so my build process is using proper (generated) Makefile(s) now.The great thing about it is, it is all very well documented right inside the info system which can be invoked via "M-x info" in Emacs.

In an EDE project, different targets (compiler/linker flags and other stuff) can be customized easily (M-x customize-target) and it is even possible to set which compiler and linker to use per target. So, I could for example add two targets "Linux" and "Windows" and configure the Windows target to use a different than the default compiler/linker for a C/C++ project (so now, I am even more excited to look into mingw64 and cross-compilation).

The benefit of using EDE is that I no longer have to manually write shell scripts for (common non-specialized) builds and also, when I invoke GDB "M-x gdb" from within EDE mode, the commandline prompt in the minibuffer already points to the correct binary file to debug (the current target for the project opened in EDE mode).
The Makefiles generated by EDE can of course also be used as usual from the shell, so it is easy to integrate them into more complex build processes where I need to run some custom stuff before (think code generators or resource file updaters) or after (e.g. creating and uploading a release archive) the compilation itself.

Took a brief peek on source version control integration as well and it seems that it is also already well integrated into ECB/CEDET without having to do much to configure/use it.

I really like all of that. The free software community really knows how to make a developer happy. :)
_________________
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 31, 2015 4:47 am    Post subject: Reply with quote

Nice, the version control stuff is already integrated into GNU/Emacs/ECB/CEDET so one does not have to do anything at all to configure it. As soon as a buffer is open for a file which is under VC (Emacs knows the common VC-systems like SVN, GIT, etc.) options for handling all the version control operations become available through new menus.

So... all that is left to try is the cross-compilation thing and my development environment will be complete (and then I will have no more excuse for slacking).
_________________
0xDB
View user's profile Send private message Visit poster's website
0xDB
Developer

Joined: 26 Dec 2005
Posts: 1655
Location: Your consciousness.
PostPosted: Sun Feb 08, 2015 7:00 am    Post subject: Reply with quote

Programmatically generated "NESsy" 256 colors palette, containing an index reserved for transparancy, 15 shades of uniform gray from black to white and 16 non-linear chroma variations with 15 linear luma levels each:

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

Joined: 21 Aug 2005
Posts: 10859
Location: Canadia
PostPosted: Sun Feb 08, 2015 10:46 am    Post subject: Reply with quote

That reminds me of something I noticed recently while playing with a NES sprite/tile editor (YY-CHR). And to be fair, it's not like I wasn't familiar with this aspect of color theory, but given the fewer color choices provided by the NES palette, there's a certain elegance I really like about it.

NOTE: THERE IS NO POINT TO THIS. I AM NOT TRYING TO PROVE ANYTHING. Your generated palette just reminded me of something neat I noticed.

Lets start with a look a the palettes. To compare to the image above, the NES has 12x4 colors in the system palette dedicated to hues (48 total). In a way it almost makes me think 240 colors for hues is too much (at least for deciding base colors anyway).



I've highlighted the colors in 3 of the better default palettes. Interestingly, each nice palette is nearly a gradient, always taking one color from each row. IMO the most satisfying combinations are the diagonals, taking a color from a neighbouring tile, instead of one in the same color group.



The brown to green and cyan to green have some really nice tones. The purple is fine, but varying the hue IMO makes nicer combinations.



Above are a couple of my own diagonals. #1 is the original purple scale (seen in #3 above), #2 is walking one step right (IMO already more interesting), and #3 is a similar step-right from a red base.



Above are some more extreme tests.

- #1 is what I call the Zig-zag (i.e. blue lines below). Compared to #3 from the prior image (i.e. black lines below), it gives a similar sort of tonality, even though two of the colors are different. Not necessarily enough to be distinct, but in this case it almost mutes it (from sharp orange to a soft pink, both with still a red-ish tonality).
- #2 is what I call the Three-step (i.e. red lines below). It doesn't necessarily look as good as two-step or one-step, but is still interesting (like C64 gradients). Reminds me of Super Gameboy, as non-art elements (text and symbols) look distinct (i.e. the arrow beside the text).
- #3 is what I call a Two-One-step (i.e. white lines below). It's appears similar to the green (2nd) one in the first image, but that one is a One-Two-Step.
- #4 is a variant of the Two-One-step, that ends in white.

Also marked below with hashed red lines are the Purple and Step-Right variant from the 2nd image.



Anyways, I find these experiments interesting. I wouldn't necessarily say that it's a simple matter of X-steps to finding best color combinations, but it's not a bad start.

What this neglects to consider is the overall brightness of light. For example, Green light is brighter than Blue or Red light. I suspect that's one of the characteristics of #3 above compared to #2 in the 1st image. I also don't necessarily think it's that important, especially when you can test color combinations with only a few clicks. What looks best should be chosen over what works out mathematically.

Another interesting facet of this is that none of the best colors come from the darkest hue. Instead, for clean mixing of darks, all images use black. Everything goes with black, and that almost makes everything easier, not having to be concerned with clashing dark tones. It also means you have 1 extra step of colors between you and black, when you try to do a fade-out effect. All hue colors fade by taking a step upward, until the only option after is black.


Anyway, I don't have a point. Just as I study it, I find the NES palette interesting.


EDIT: I just wanted to play with Zig-zags some more.



I think some work better than others. I quite like the 1st one, Green-Brown-Green, gives a sort-of rust color to it. But ya, just playing.
_________________
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 Feb 09, 2015 2:16 am    Post subject: Reply with quote

Yeah, hue shifting is a thing in art. As a rule of thumb I feel it works best when shifting towards a colder hue for shadows and a warmer one for lights but that also depends on the color of the light source, atmospheric effects and environment of course.

The NES palette is laid out in a way that makes it easy to pick different lightness and different hues very quickly. That's also why I generated the 256 colors version (it is in fact generated by a modified version of the NES palette generator that I wrote for Refugee Lib based on the NTSC color wheel and YPBPR color space conversion) as it allows to quickly play with different ramps and hue shifts without having to create all the colors from scratch each time I start a new piece of pixel art.

PoV wrote:
Another interesting facet of this is that none of the best colors come from the darkest hue. Instead, for clean mixing of darks, all images use black. Everything goes with black, and that almost makes everything easier, not having to be concerned with clashing dark tones. It also means you have 1 extra step of colors between you and black, when you try to do a fade-out effect. All hue colors fade by taking a step upward, until the only option after is black.
The original NES palette lacks a good gray scale. On the C64 it was a common thing to soften ramps by putting in a uniform gray between otherwise clashing hues and the gray also served to extend ramps, creating the illusion of having more than 16 colors and softer gradients (on blurry CRT screens anyway).
_________________
0xDB
View user's profile Send private message Visit poster's website
Gil
Developer

Joined: 14 Nov 2005
Posts: 2341
Location: Belgium
PostPosted: Mon Feb 09, 2015 3:13 am    Post subject: Reply with quote

Dennis, doesn't your palette lack, for example, a good saturated yellow? The way you are correcting the luma, you remove a bunch of useful basic colors I think.
_________________
PoV: I had to wear pants today. Fo shame!
View user's profile Send private message Visit poster's website
0xDB
Developer

Joined: 26 Dec 2005
Posts: 1655
Location: Your consciousness.
PostPosted: Wed Feb 11, 2015 11:54 am    Post subject: Reply with quote

Yeah, the palette is meant as a quick starting point to pick colors without having to define them from scratch. I think it is not possible to have an all-purpose 256 colors palette.

On an average piece of pixel art, I will probably pick only around 8 to 32 different colors from that palette and modify them as needed.
_________________
0xDB
View user's profile Send private message Visit poster's website
0xDB
Developer

Joined: 26 Dec 2005
Posts: 1655
Location: Your consciousness.
PostPosted: Mon Mar 02, 2015 10:31 am    Post subject: Reply with quote

Slightly related thing I just finished making (pity it does not work in Linux because the Wine developers have not fully implemented the DDE subsystem of the Windows-API which Pro Motion uses as a plugin interface, so I have to do my pixelling in Windows again... at some point I really should just start writing my own pixel pushing software (it's something that has been on my mind ever since I first attempted it back in the Turbo Pascal days)).



(btw, the archaic Windows-API is a royal pain for GUI development... can not do anything with it without having a gazillion docs open simultaneously... it is super un-intuitive to utilize and horribly fragmented in terms of functions and structures needed to do even the most basic things like opening a window or adding a button... but well it is old and probably no one uses it directly anymore except when they have to)
_________________
0xDB
View user's profile Send private message Visit poster's website
0xDB
Developer

Joined: 26 Dec 2005
Posts: 1655
Location: Your consciousness.
PostPosted: Sun Mar 08, 2015 1:32 am    Post subject: Reply with quote

Dennis wrote:
(btw, the archaic Windows-API is a royal pain for GUI development... can not do anything with it without having a gazillion docs open simultaneously... it is super un-intuitive to utilize and horribly fragmented in terms of functions and structures needed to do even the most basic things like opening a window or adding a button... but well it is old and probably no one uses it directly anymore except when they have to)
Thinking about it, the original Windows-API, despite being archaic, still gets the job done and the folks who originally wrote it probably just did not know better back then and did not have all the fancy tools we have today to make development easier...and they probably also had to develop all that under extreme pressure (time running out to be the first to hit the market with their stuff) so they likely implemented everything "on the fly" without giving it much thought or carefully crafting any kind of design and then just never had the time to improve it later on.

----

I spent the last couple of days skimming my codebase(that is really just a fancy name for that dreadful folder full of unfinished, some barely even started, projects from the past 17 years in various languages like Pascal, C, C++, C#, JavaScript and Java) looking for stuff I want to port/adapt into my new, fresh-start-clean-code codebase (I think this is about the fourth or fifth time I am starting a new "codebase"...heh...but this time, instead of rewriting everything from scratch, I will adapt as much stuff as possible from things I already wrote in the past).

My goal is to stick to plain C11 (yeah that is plain C not C++11, not C99 but the latest and hopefully greatest plain C standard C11) for everything in that (and use duktape to embed EcmaScripting capabilities) new codebase.

First thing I will port/adapt is my UTF8 encoder/decoder functions. I deem that necessary as, even though the C11 standard in theory supports Unicode, in practice compiler (and C standard library) implementations do not support it sufficiently on all platforms (I am looking at you Windows! >:( ).

So I made a new folder "FL" (an abbreviation for "Freedom Lib") for my new codebase and wrote down some lose project goals:
plain C11 compliant (no C++)

cross-platform

strict separation of data, functionality and presentation of data

NOTHING BEHIND YOUR BACK: everything that runs must be called explicitly

clean cut interfaces between lib and system (so for example SDL2 could be replaced by a different backend for hardware and operating system access)

selective scripting support(via duktape ecmascript engine)

How much I will stray from those goals remains to be seen... it is probably going to be hard to really make a clean separation between my lib and SDL2 and other libs as that would likely require to wrap all their functions and data structures inside my own which has the potential to needlessly duplicate code that is already there (in those other libs). Also, the "NOTHING BEHIND YOUR BACK" goal might be a silly thing to stick to for some convenience features where it would just be annoying to have to manually manage some repetitive stuff all the time.

In any case, I could go on theorizing about things forever but I should probably just start writing code and shape and change it around as needed.
_________________
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 Mar 11, 2015 2:41 pm    Post subject: Reply with quote

Happy belated birthday Chuck Norris, Osama Bin Laden and me! The best part about it was the leftover cake I had for breakfast today. Fueled by coffee and cake, I went on a documenting spree and added doxygen style comments for all the things I already ported into the Freedom Lib (which is not too much yet but documenting seems to take almost as much time as writing the code itself).
_________________
0xDB
View user's profile Send private message Visit poster's website
Sirocco
Moderator

Joined: 19 Aug 2005
Posts: 9441
Location: Not Finland
PostPosted: Wed Mar 11, 2015 3:07 pm    Post subject: Reply with quote

> birthday
> documenting spree

Yup, you're a programmer!


Quote:

Osama Bin Laden


You could celebrate by breaking out the Ouija board and asking how he feels about Charlie Hebdo ;)
_________________
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: Wed Mar 11, 2015 5:13 pm    Post subject: Reply with quote

Happy birthday!, but also the important question is, when is the robe's birthday?
_________________
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: Sat Mar 14, 2015 7:10 am    Post subject: Reply with quote

I think I will just let Mr. Bin Laden rest in peace.

No idea how old The Robe is. When it found me, it already was in its' finalized physical size.

On a side-note, Refugee Lib, despite not being worked on (Freedom Lib is more interesting now), moved to github as google code has been announced for shutdown in August 2015.
_________________
0xDB
View user's profile Send private message Visit poster's website
0xDB
Developer

Joined: 26 Dec 2005
Posts: 1655
Location: Your consciousness.
PostPosted: Mon Oct 05, 2015 3:28 am    Post subject: Reply with quote

Currently learning Python and Blender.
_________________
0xDB
View user's profile Send private message Visit poster's website
PoV
Moderator

Joined: 21 Aug 2005
Posts: 10859
Location: Canadia
PostPosted: Mon Oct 05, 2015 3:25 pm    Post subject: Reply with quote

I wish Blender didn't use Python, but that was the popular scripting language of the time.
_________________
Mike Kasprzak
'eh whatever. I used to make AAA and Indie games | Ludum Dare | Blog | Tweetar
View user's profile Send private message
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.