Hey guys,
here's my first try in C ever...
well, the time feature isn't already finshed and the animation of enemy destroying!
But I want to try if I can make a kind of submarine game where you can fire on enemies and score up in a given time!
However, the graphic is done by me, selfmade painting in only 10 minutes...
The code isn't really nice to read and there are many bugs and features which will finished in future!
Would be nice to get some help and hints!
Previous versions:
SubMarine!
SubMarine!
- Attachments
-
- submarine(wip).uze
- (42.22 KiB) Downloaded 434 times
-
- SubMarine(WIP).hex
- (117.36 KiB) Downloaded 411 times
Last edited by Kilo on Thu Jan 17, 2013 5:08 pm, edited 1 time in total.
The last digit of Pi is 7! I calculated this, as I counted to infinity yesterday!
Re: WIP: SubMarine
Hi KiloKilo wrote:Hey guys,
here's my first try in C ever...
well, the time feature isn't already finshed and the animation of enemy destroying!
But I want to try if I can make a kind of submarine game where you can fire on enemies and score up in a given time!
However, the graphic is done by me, selfmade painting in only 10 minutes...
The code isn't really nice to read and there are many bugs and features which will finished in future!
Would be nice to get some help and hints!
Nice to see another project on the horizon.
Graphics look very nice especially for only 10 minutes work
I'm still only a novice myself, but if I can help in any way I will try to answer.
Look forward to your progress on this project.
Cheers
Roukan / Jim
Re: WIP: SubMarine
Ah, the good ol' submarine! I remember playing for hours to hit the small, fast boats.
Re: WIP: SubMarine
thanks!
Ok... now there are more features:
- time gets up 15 sec. if a ship is hit
- score is count up
- animation if ship is hit
*the attachments are updated!!!!
WHAT I NEED:
- how to randomize a number in order to get different heights for the enemy to appear?? in basic it's: a=rnd(10)+5 (a is between 5 and 15)
Ok... now there are more features:
- time gets up 15 sec. if a ship is hit
- score is count up
- animation if ship is hit
*the attachments are updated!!!!
WHAT I NEED:
- how to randomize a number in order to get different heights for the enemy to appear?? in basic it's: a=rnd(10)+5 (a is between 5 and 15)
Last edited by Kilo on Fri Jan 18, 2013 5:13 pm, edited 1 time in total.
The last digit of Pi is 7! I calculated this, as I counted to infinity yesterday!
Re: WIP: SubMarine
this looks awesome for only 10min ??? work! I'm curious about the finished game...
Life's too short to remove usb safely
Web: www.hwhardsoft.de
http://www.facebook.com/hwhardsoft
YouTube: http://www.youtube.com/user/hwhardsoft
Web: www.hwhardsoft.de
http://www.facebook.com/hwhardsoft
YouTube: http://www.youtube.com/user/hwhardsoft
Re: WIP: SubMarine
Hehe the classic submarine game...looks great! I'll give it a spin tonight for sure.
Re: WIP: SubMarine
Hi KiloKilo wrote:thanks!
Ok... now there are more features:
- time gets up 15 sec. if a shit is hit
- score is count up
- animation if ship is hit
*the attachments are updated!!!!
WHAT I NEED:
- how to randomize a number in order to get different heights for the enemy to appear?? in basic it's: a=rnd(10)+5 (a is between 5 and 15)
There is a pseudo random number routine in the Space Invaders source code.
Code: Select all
u8 prng; // Pseudo-random number generator declared as a file level variable
// -----------------------------------------------------
#define MAX(x,y) ((x)>(y) ? (x) : (y))
#define PRNG_NEXT() (prng = ((u8)((prng>>1) | ((prng^(prng>>2)^(prng>>3)^(prng>>4))<<7)))) // Utility macros
//------------------------------------------------------
++prng;
prng = MAX(prng,1); // This piece code should be placed in you title screen loop whilst waiting for a button press.
// -----------------------------------------------------
varname = (PRNG_NEXT()%11) + 5; // returns a value between 0 and 10 so you can add to this to get your range (+5 gives a range of 5 - 15)
Cheers
Roukan / Jim
Re: WIP: SubMarine
Hey Roukan,
thx, this would help!! I have to test it!
Well, the graphics and the code were done in 10-20 min.
So lucky that there's an emulator to test always the code
Because it was more trial and error!!
But I think the result of the game would be worth to publish it
I'm working on it guys!
PLEASE give me feedback when you testedt the game!!!
thx, this would help!! I have to test it!
Well, the graphics and the code were done in 10-20 min.
So lucky that there's an emulator to test always the code
Because it was more trial and error!!
But I think the result of the game would be worth to publish it
I'm working on it guys!
PLEASE give me feedback when you testedt the game!!!
The last digit of Pi is 7! I calculated this, as I counted to infinity yesterday!
Re: WIP: SubMarine
Just gave it a test, all I can say is great start! Here's a couple comments/ideas for when you get more comfortable with the programming side. You probably considered all that already, but here it goes.
- Have the boat and sub graphic flip horizontally to follow the moving direction
- Vary the screen side and height where the sub appears. Vary the moving speed too.
- The sub can throw torpedoes too in straight line. Some of them, randomly, could be homing torpedoes perhaps moving more slowly so the boat can have a chance to counter.
- Have levels where things get harder with more subs at the same time. The sub could vary direction randomly mid-screen. Why not have attacking planes at the same time! They could throw bombs or parachute mines.
- Have bonus things to shoot to increase the timer.
- Use video mode 3 and sprites. This will allow smooth animations. Plus you can use the sprite X-flip feature to save on flash.
Re: WIP: SubMarine
Hi Uze,
thank you!!!
Yes, I will implemant this all!
Well, the graphics.... hm...because I'm new to C, I wrote the code on the video mode based on megatris!
So I don't know how to change the mode and program with sprites... but let me try!
for beginning I will take this version in order to try! Later on I will make a new version!
thank you!!!
Yes, I will implemant this all!
Well, the graphics.... hm...because I'm new to C, I wrote the code on the video mode based on megatris!
So I don't know how to change the mode and program with sprites... but let me try!
for beginning I will take this version in order to try! Later on I will make a new version!
The last digit of Pi is 7! I calculated this, as I counted to infinity yesterday!