Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 15 Jun 2006
Offline Last Active Oct 20 2016 02:59 PM

#5314544 Why didn't somebody tell me?

Posted by on 10 October 2016 - 09:43 AM

Also, at least in explorer, in the tree view, pressing left repeatly closes the folder you're in (if it's expanded) or moves to the next parent (if it's closed).
Alt-Numblock-* will open the next level of all sub folders under the selected one.

Whooa, this one is nice! Appears to be standard treeview controls too, works in an app I work on as well, except it appears to do fully recursive expansion. Not recommended on unlimited dynamic nodes..

Left to close trees, right to open trees, up and down to move through the list (as it operates as one long list for up and down, not as a tree).

Regedit became so much nicer with this, especially after adding in the fact that you can start typing to jump to the next occurrence of whatever you type.

#5309587 SFML converting local object coordinates to global coordinates

Posted by on 05 September 2016 - 08:45 PM

Something like this?


The sf::renderWindow has a few helper functions for going from world coordinates to screen coordinates.

#5302430 Create A Gaming Operating System

Posted by on 25 July 2016 - 01:13 AM


but I can't seem to find people who are showing you how to build on or modify OSs like Linux and FreeBSD
I don't understand what this means. Surely these people are easy to find. Linux OS is done by Linus Torvalds et al, BSD has a group of core developers as far as I know.


I very much doubt however that these are the people you need. They typically add or improve hardware drivers, and implement file systems, and virtual memory.

"The OS" in Unix context is however not much more than that.


Maybe you think that OS means more than "the kernel"? Your picture suggests you believe the graphical display is part of it, which is not the case (except for hardware access for displaying pixels). You may want to read about the structure of a Unix system (Unix is the name of the API of a broad variety of systems, which includes Linux and BSDs). For graphical system architecture, the structure of an X11 system looks like a good start to me.



If my assumptions are wrong, maybe you could explain in more detail what parts you think you should modify?


As a follow up to this, making a display manager and a window manager may be what you need to do. These can be applied to existing Linux installs to give you the look and feel you want.

#5299693 Why didn't somebody tell me?

Posted by on 07 July 2016 - 03:40 PM

Stumbled upon a neat trick in windows explorer that is really handy if you have a large directory of folders or files.
If your folder or file is name "StuffAndThings", with out having to click and use the search bar, just start typing "StuffAndThings" (like hitting the key for the first letter of the file to seek to all "s" files)  and explorer will eventually land on and highlight the folder or file for you =). This is useful if their are 50 things that start with "S".

You can also tap the first letter repeatedly to move among them. For instance, if you think your item started with S, just keep tapping S to jump among the files that start with S.

#5296888 Why didn't somebody tell me?

Posted by on 16 June 2016 - 09:00 PM


Isn't dist-upgrade just updating the kernels

apt-get upgrade does this, dist-upgrade upgrades everything... The problem comes when it tries to update glibc which is used by everything, so if it stops you can't log in, can't run anything, because it's a dependency of everything on the system...



I figured out what I was thinking of.
update collects your list of potential upgrades
upgrade updates your system

dist-upgrade updates your system and handles updating the changed dependency files

do-release-upgrade typically requires an option in your settings to be checked (or maybe a config file changed) before it works. This will update to newer versions, not just your kernels (of which mine are always held back under upgrade but update under dist-upgrade).


#5272969 Recommendations for a Text Editor

Posted by on 28 January 2016 - 04:40 AM

You can write plugins and such for Notepad++, and it uses Scintilla for syntax highlighting last I checked.

#5272968 Why didn't somebody tell me?

Posted by on 28 January 2016 - 04:38 AM


Drinking Fountain = Faucet that emits water upwards a few inches that lets you drink directly from the stream (or fill a bottle). Usually includes a basin to catch the water that you don't drink/bottle.

Until you get to Boston and they ironically call that a 'bubblah'. I gather parts of Massachusetts and Rhode Island use the term unironically.



Speaking of Boston:

#5272806 Sprite Sheet Need Help

Posted by on 27 January 2016 - 01:51 AM

Alright, now I have a little time to do this.


Let's assume this is your sprite sheet, a simple 3 frame animation of a jump, animated from left to right:



You set your sprite to use the sprite sheet but only to display a single frame at a time:



And on each frame you are animating it:

if GetSpriteExists(PBullet[a]) = 1
     if Player.fire = 1            


     elseif Player.fire = -1




Which moves your animation in this direction:



This seems to work. Everything goes well when the sprite is on the left. However, when you move to the opposite side, you do the following:

//Flip Player according to X Position

if Player.x > Enemy.x //mean The player on the right side of the screen

if PIsGround = 1 then SetSpriteFlip(Player.spr,1,0) 


if PIsGround = 1 then SetSpriteFlip(Player.spr,0,0)


Which does this to the sprite sheet the sprite uses:



This flipped your image, making your sprite face the proper direction, however, you are still offsetting the sprite in the same direction since your left side/right side conditional doesn't include the movement/animation offset. What this means is your animation still follows the frames as indicated:



To fix this, you have two options.


Option 1 involves a left side/right side conditional check for the offset portion:

if GetSpriteExists(PBullet[a]) = 1
     if Player.fire = 1 
           if Player.x > Enemy.x
               SetSpritePositionByOffset(PBullet[a],GetSpriteXByOffset(PBullet[a])-1.0,GetSpriteYByOffset(PBullet[a])) // Inverted

               SetSpritePositionByOffset(PBullet[a],GetSpriteXByOffset(PBullet[a])+1.0,GetSpriteYByOffset(PBullet[a])) // Original

     elseif Player.fire = -1

           if Player.x > Enemy.x
               SetSpritePositionByOffset(PBullet[a],GetSpriteXByOffset(PBullet[a])+1.0,GetSpriteYByOffset(PBullet[a]))  // Inverted

               SetSpritePositionByOffset(PBullet[a],GetSpriteXByOffset(PBullet[a])-1.0,GetSpriteYByOffset(PBullet[a])) // Original




Or something that takes into account the player's location.


Option 2 involves something a little more flexible and less code:

Add a player direction variable we use to make all adjustments to animations.

//Flip Player according to X Position
int PlayerDirection = 1 // Not sure what language, so however you declare an integer
if Player.x > Enemy.x //mean The player on the right side of the screen
PlayerDirection = -1

if PIsGround = 1 then SetSpriteFlip(Player.spr,1,0) 

PlayerDirection = 1

if PIsGround = 1 then SetSpriteFlip(Player.spr,0,0)


Then use it.

if GetSpriteExists(PBullet[a]) = 1
     if Player.fire = 1            


     elseif Player.fire = -1



With either option, you should have your sheet offsetting in the proper direction for the animation. In the case of the flipped sprite sheet:


#5272761 Sprite Sheet Need Help

Posted by on 26 January 2016 - 03:55 PM

yes, the Player.spr is the whole sprite sheet

and when the player is on the opposite side (the right), move the sprite offset in the negative direction.

No, I used below commands for get current Offset but Player Offset at (right or left) are same.

What I mean is this: since you flipped the whole spritesheet, you must also flip the animation movement code. I will have to do a sprite mockup and source code sample for you when I get home tonight.

#5272667 When the Player and the CPU attacks at the same time

Posted by on 25 January 2016 - 10:17 PM

All of the enemies aren't the same size as the character. Also that is the functionality of blocking. would it be redudant to block by blocking and block by attacking too?

Since enemies vary in size, adjust knock back accordingly. Bigger enemies push the player back further than themselves, and in some cases, do not get pushed back by the player.

#5272501 Sprite Sheet Need Help

Posted by on 24 January 2016 - 01:57 PM

Note: I used several Tools (Sprite sheet generator, Sprite sheet Creator, Texture Packer, ... but all had same result.)


Given this bit of information, emphasis added, I would say Eck is right and it is in your code somewhere. I don't know how it handles the sprite sheet, but if I am right, the Player.spr is the whole sprite sheet. I would suggest taking what you have, and when the player is on the opposite side (the right), move the sprite offset in the negative direction. This would make all your sprites face the proper way (as you already have) and transition (animate) in the order you desire.

#5271818 C++

Posted by on 19 January 2016 - 04:01 AM

Personally, I'd get two books: One heavy one to heavy textbook to read when sitting at the computer, and one more "fun" reference book to flip through while relaxing on the couch. I'd then supplement that with online tutorials and articles and by asking specific questions on these forums. As you grow (say, after six months or more), I'd pick up two more abstract books like Code Complete 2nd Edition and Pragmatic Programmer. But I wouldn't get those until after you finish you first two books.


And then I look at the books sitting on my desk: The C++ Programming Language reference book from Stroustrup and Code Complete 2nd Edition. I guess this is sound advice. Haha!

#5271649 C# - glu32 DLL rferece?

Posted by on 17 January 2016 - 10:19 PM

All I've managed to find from Googling is:

[DLLImport "Glu32.dll"]

#5264945 Why didn't somebody tell me?

Posted by on 04 December 2015 - 05:13 PM


Why didn't somebody tell me that upgrading debian Linux via its gui upgrade tool can completely brick the system if you do a dist-upgrade?

Repeat after me: "dist-upgrade is never a safe operation"... That it sometimes succeeds should not be taken as an indication that you won't lose all your data the next time.


I don't know how many times I've bricked Ubuntu during major version upgrades. These days I just clean install instead.



Isn't dist-upgrade just updating the kernels and not Ubuntu itself? I could have sworn there was a separate command for that.

#5264832 Why didn't somebody tell me?

Posted by on 03 December 2015 - 10:41 PM


Did you know you can drag with the right mouse button and it will open a context menu with options when you drop?

This is new to me! I knew about the Shift+Drag and Ctrl+Drag, but I didn't know about right-click dragging.


I'm not sure if someone already mentioned it, but you can Shift+Right-Click empty space in Windows Explorer to open a command console at that location ("Open command window here"). I use that alot.



Shift-Right-Click does a good many things besides in Windows Explorer. For instance, if you are using Windows Vista+ and you miss the Minimize, Maximize, Restore, and Move options in your taskbar, you can find them if you Shift+Right-Click. Shift+Right-Clicking executables gives you the option to run as a different user, handy if you are logged in as a regular user and need to run as an admin account (especially in a domain environment).