Author Topic: Learning C, give me practice projects  (Read 3188 times)

Right now I'm learning C, give me some requests for console programs and I'll work on them for practice. Stuff like doing equations, reading input, and maybe some basic games. It may take a while to finish a one since I also have a few other miscellaneous projects on my to-do list.

you should make a program that simplifies the process of defining weapon/image states for blockland add-ons

To clarify, it would take the values you want and put them in? This stuff below?
Code: [Select]
////////////////
//weapon image//
////////////////
datablock ShapeBaseImageData(gunImage)
{
   // Basic Item properties
   shapeFile = "./pistol.dts";
   emap = true;

   // Specify mount point & offset for 3rd person, and eye offset
   // for first person rendering.
   mountPoint = 0;
   offset = "0 0 0";
   eyeOffset = 0; //"0.7 1.2 -0.5";
   rotation = eulerToMatrix( "0 0 0" );

   // When firing from a point offset from the eye, muzzle correction
   // will adjust the muzzle vector to point to the eye LOS point.
   // Since this weapon doesn't actually fire from the muzzle point,
   // we need to turn this off. 
   correctMuzzleVector = true;

   // Add the WeaponImage namespace as a parent, WeaponImage namespace
   // provides some hooks into the inventory system.
   className = "WeaponImage";

   // Projectile && Ammo.
   item = BowItem;
   ammo = " ";
   projectile = gunProjectile;
   projectileType = Projectile;

casing = gunShellDebris;
shellExitDir        = "1.0 -1.3 1.0";
shellExitOffset     = "0 0 0";
shellExitVariance   = 15.0;
shellVelocity       = 7.0;

   //melee particles shoot from eye node for consistancy
   melee = false;
   //raise your arm up or not
   armReady = true;
   .....

That's honestly a good project since it would help all you guys.

It would be helpful but the most complicated part is the stuff below it, dealing with weapon states, sequences and transitions, It's not necessarily complicated, it's just loving tedious

I would agree from looking at various weapons this does look tedious to work with. Are there any other states I should know about that aren't in the default gun script?

I would agree from looking at various weapons this does look tedious to work with. Are there any other states I should know about that aren't in the default gun script?
stateTransitionOnAmmo and stateTransitionOnNoAmmo are used for weapons have an ammo system

what would be good is something to take in weapon state code and generate a box diagram image showing the state tree

I would agree from looking at various weapons this does look tedious to work with. Are there any other states I should know about that aren't in the default gun script?

stateTransitionOnLoaded
stateTransitionOnNotLoaded
stateTransitionOnAmmo
stateTransitionOnNoAmmo

some ideas:

higher/lower guess the number game
finding the solutions to a given quadratic equation
tic-tac-toe with some basic terminal graphics (2 player or 1 player with ai)
Uno or similar card game with ai

you should make a program that simplifies the process of defining weapon/image states for blockland add-ons
please do this


Thanks for the suggestions guys! I'm going to do the tic-tac-toe game first to build up some more confidence, then I'll promptly start the weapon image program.

you should make a program that simplifies the process of defining weapon/image states for blockland add-ons

plus if you feel like, add a GUI to your program. That'll be a great help.

« Last Edit: July 06, 2017, 01:14:56 PM by FelipeO_O_ »

Yeah a flowchart editor that exports to usable weapon states would be massively useful

if i ever get back into java applets i'll do it