Re: Why is programming taking so dang long for me nowadays?
Posted: Tue Dec 26, 2017 10:13 am
So do you mean, objects pointing to another structure that has the metasprite/sprite information?
NES Development Forums
https://forums.nesdev.org/
Code: Select all
/**
* \brief
* VDP sprite info structure for sprite resource definition.
*
* \param y
* Y offset for this VDP sprite relative to global Sprite position plus 0x80 (0x80 = 0 = no offset)
* \param size
* sprite size (see SPRITE_SIZE macro)
* \param numTile
* number of tile for this VDP sprite (should be coherent with the given size field)
* \param x
* X offset for this VDP sprite relative to global Sprite position plus 0x80 (0x80 = 0 = no offset)
*/
typedef struct
{
s16 y; // respect VDP sprite field order
u16 size;
s16 x;
u16 numTile;
} VDPSpriteInf;
/**
* \brief
* Sprite animation frame structure.
*
* \param numSprite
* number of VDP sprite which compose this frame
* \param vdpSpritesInf
* pointer to an array of VDP sprites info composing the frame (followed by H/V/HV flipped versions)
* \param collision
* collision structure
* \param tileset
* tileset containing tiles for this animation frame (ordered for sprite)
* \param w
* frame width in pixel
* \param h
* frame height in pixel
* \param timer
* active time for this frame (in 1/60 of second)
*/
typedef struct
{
u16 numSprite;
VDPSpriteInf **vdpSpritesInf;
Collision *collision;
TileSet *tileset;
s16 w;
s16 h;
u16 timer;
} AnimationFrame;
/**
* \brief
* Sprite animation structure.
*
* \param numFrame
* number of different frame for this animation
* \param frames
* frames composing the animation
* \param length
* animation sequence length
* \param sequence
* frame sequence animation (for instance: 0-1-2-2-1-2-3-4..)
* \param loop
* frame sequence index for loop (last index if no loop)
*/
typedef struct
{
u16 numFrame;
AnimationFrame **frames;
u16 length;
u8 *sequence;
s16 loop;
} Animation;
/**
* \brief
* Sprite definition structure.
*
* \param palette
* Default palette data
* \param numAnimation
* number of animation for this sprite
* \param animations
* animation definitions
* \param maxNumTile
* maximum number of tile used by a single animation frame (used for VRAM tile space allocation)
* \param maxNumSprite
* maximum number of VDP sprite used by a single animation frame (used for VDP sprite allocation)
*
* Contains all animations for a Sprite and internal informations.
*/
typedef struct
{
Palette *palette;
u16 numAnimation;
Animation **animations;
u16 maxNumTile;
u16 maxNumSprite;
} SpriteDefinition;
/**
* \brief
* Sprite structure used by the Sprite Engine to store state for a sprite.<br>
* WARNING: always use the #SPR_addSprite(..) method to allocate Sprite object.<br>
*
* \param status
* Internal state and automatic allocation information (internal)
* \param spriteDef
* Sprite definition pointer
* \param animation
* Animation pointer cache (internal)
* \param frame
* AnimationFrame pointer cache (internal)
* \param animInd
* current animation index (internal)
* \param frameInd
* current frame animation index (internal)
* \param seqInd
* current frame animation sequence index (internal)
* \param timer
* timer for current frame (internal)
* \param x
* current sprite X position on screen
* \param y
* current sprite Y position on screen
* \param depth
* current sprite depth (Z) position used for Z sorting
* \param attribut
* sprite specific attribut and allocated VRAM tile index (see TILE_ATTR_FULL() macro)
* \param visibility
* visibility information of current frame for each VDP sprite (max = 16)
* \param VDPSpriteIndex
* index of first allocated VDP sprite (0 when no yet allocated)<br>
* Number of allocated VDP sprite is defined by definition->maxNumSprite
* \param frameNumSprite
* the number of VDP sprite used by the current frame (internal)
* \param lastVDPSprite
* Pointer to last VDP sprite used by this Sprite (used internally to update link between sprite)
* \param data
* this is a free field for user data, use it for whatever you want (flags, pointer...)
* \param prev
* pointer on previous Sprite in list
* \param next
* pointer on next Sprite in list
*
* Used to manage an active sprite in game condition.
*/
typedef struct _Sprite
{
u16 status;
u16 visibility;
const SpriteDefinition *definition;
Animation *animation;
AnimationFrame *frame;
s16 animInd;
s16 frameInd;
s16 seqInd;
u16 timer;
s16 x;
s16 y;
s16 depth;
u16 attribut;
u16 VDPSpriteIndex;
u16 frameNumSprite;
VDPSprite *lastVDPSprite;
u32 data;
struct _Sprite *prev;
struct _Sprite *next;
} Sprite;
The parents might oppose not the computer specifically as much as the job to afford one.tokumaru wrote:Are your parents also opposed to you getting your own computer?
Man this is quite an understatement... Since a couple of years or so I am so incapable of programming anything even simple that I feel mentally disabled whenever I try, which leads to a vicious circle of not being motivated to program anymore, etc...tokumaru wrote:You're getting old, I guess... It seems that at as time goes by and we become more experienced, our enthusiasm decreases for whatever reason.
Thanks. What jobs would I be able to get?GradualGames wrote:psychopathicteen, you're a brilliant programmer if you can make snes demos like this. I now am aware of at least 3 people in the homebrew scene who have no college degree and who basically showed their homebrew work to prospective employers and landed jobs in the it/software engineering field. Even though its not directly relevant it has that "wow" factor and says: "This guy can LEARN HARD THINGS." in spades. If you want to get a job and start a life outside your parents' home I personally think it is within your grasp.
I can't make any guarantees for anybody, but my expectation is that you may be able to get in to an entry level software engineering job. Given your experience with assembly, you could probably pick up java or C# or php or what not on the job. Entry level positions often don't care that much if you have a lot of depth of experience in the specific field they are hiring for. I didn't know a lick of C# when I got my first job, I did know a tiny bit of C and BASIC though and could show them personal projects I made. They were just happy to see I was eager to learn and that I was able to program, period. Employers vary a lot in their interview style. If you can find one who is interested in seeing your personal projects, it should be impressive to many of them. The type of work available out there is typically something kinda sorta boring maybe? Involving forms and databases and what not, but it can be interesting work if you have the right attitude.psycopathicteen wrote:Thanks. What jobs would I be able to get?GradualGames wrote:psychopathicteen, you're a brilliant programmer if you can make snes demos like this. I now am aware of at least 3 people in the homebrew scene who have no college degree and who basically showed their homebrew work to prospective employers and landed jobs in the it/software engineering field. Even though its not directly relevant it has that "wow" factor and says: "This guy can LEARN HARD THINGS." in spades. If you want to get a job and start a life outside your parents' home I personally think it is within your grasp.
This is the Snr Coders dilemma.Bregalad wrote:Man this is quite an understatement... Since a couple of years or so I am so incapable of programming anything even simple that I feel mentally disabled whenever I try, which leads to a vicious circle of not being motivated to program anymore, etc...tokumaru wrote:You're getting old, I guess... It seems that at as time goes by and we become more experienced, our enthusiasm decreases for whatever reason.
And this is coming from someone who just used to love programming as a hobby a couple of years ago.
It seems to me one can continuously increase the scope and complexity of what one is working on, augmenting the challenge of what one has achieved previously. Programming/game development can be made arbitrarily hard if one is feeling bored. I think about my dad, who has been a math professor since 1970, he still hasn't retired and still has new challenges. I feel programming/game development can be the same way, it's all about attitude.Oziphantom wrote:This is the Snr Coders dilemma.Bregalad wrote:Man this is quite an understatement... Since a couple of years or so I am so incapable of programming anything even simple that I feel mentally disabled whenever I try, which leads to a vicious circle of not being motivated to program anymore, etc...tokumaru wrote:You're getting old, I guess... It seems that at as time goes by and we become more experienced, our enthusiasm decreases for whatever reason.
And this is coming from someone who just used to love programming as a hobby a couple of years ago.
What you love about coding, is working out and solving problems. When you are jr everything is something that needs to be worked out and you spend more time on the problem than you do on the making a .h/.cpp file, writing the docs, pushing pull things of a stack, working out which bank to put it in etc all the "leg work".. as you get more experienced, solving the problem becomes easier and easier till you hit the point where you know how to do it all, and you spend a few minutes on the problem but the legwork doesn't change, so now the fun to leg ratio is 1:100 when before it was 3:2