Dark Bit Factory & Gravity

PROGRAMMING => Other languages => Console homebrew => Topic started by: relsoft on April 27, 2010

Title: Space Impakto DS
Post by: relsoft on April 27, 2010
Space Impakto DS

Download:
http://rel.phatcode.net/junk.php?id=101 (http://"http://rel.phatcode.net/junk.php?id=101")


GameType:
Bullet-Hell SHMUP (Space shooter/Shoot 'em up) for your DS


Features:
* 2d gameplay
* 3d background
* All fixed-point engine (no real-time single float/double variable is ever used)
* Optimized texture use via texture packing
* Oldskool 8-bit/4bit sprites
* Newskool bullet hell gameplay
* Source included(Will be released on the final release)
* Replay mode
* Button config

Video(courtesy of Jurassicplayer)
http://www.youtube.com/watch?v=FoIRv-FBCaw

Another Video by Modariffic
http://www.youtube.com/watch?v=j4UhvvCxtIY


Screenshots:
(http://www.rel.phatcode.net/nds_temp/space_impakto_01.png)
(http://www.rel.phatcode.net/nds_temp/space_impakto_02.png)


Development:
Official Site: http://rel.phatcode.net (http://"http://rel.phatcode.net")

This is just a test level and really just uninspired almost random enemy sequence. 
I like entering this type contest so I would be forced to finish this game. :*)

I'm welcome to suggestions.

Enjoy.

BTW, is the level too hard or too easy for let's say level 2 in a 5 level game?

Changes:
Code: [Select]
v 0.8.4b  (04/09/11)
Finalized Boss sequence
Added a lot of enemies
Enemy sequence test
boss timer to remove "boss milking"
Bugfixes

v 0.8.3b  (04/04/11)
Boss Sequence Test
Bugfix


v 0.8.2b  (03/30/11)
HighScore Table
Name Entry

v 0.8.1b  (03/29/11)
Replay System (Just 32 KB. Yay!)
Key Config (Cearn's Idea)
Plasma BGs (I went for the symmetry this time)
Sub BG renderer

v 0.8.0b  (03/23/11)
Sexy Menu and GUI
Plasma Fonts
Sub BG rederer
Warp FX
Fonts

v 0.7.2b  (02/25/11)
Updated the source for libnds 1.5.0 (took me hours!)
Ditched stencil effects(glAssignTexture() is kinda slow)
Fx3D() singleton
Added some memory handler/feedback (2mb+ free memory still to use. yay!)



v 0.7.1b  (01/19/11)
Centipede enemy
Bombs
"Engine-ized" the game



v 0.7b  (01/16/11)
Added a second player (the R9)

Missiles
More enemies



v 0.6b  (01/11/11)
Decided
 that the current engine sucks and needs an overhaul
Recoded everything using the system I used in Bubble Fight EX
Title: Re: Space Impakto DS
Post by: rdc on April 27, 2010
I wish I had a DS!
Title: Re: Space Impakto DS
Post by: ninogenio on April 27, 2010
going to try this out in a little while ill have to dig my ds out the cupboard.

looking throught the source i can see you really know what your doing mate nice fixed point code and every thing looks as it should so big thumbs up for getting ontop of this stuff so quickly i had a bit of trouble figuaring it all out when i first started but well wow lol.

have you tryed the tile modes for big maps and stuff i made a massive scroller that shifts the tiles through 2 screens but i remeber it being a real nightmare to do.
Title: Re: Space Impakto DS
Post by: Clyde on April 27, 2010
tried the nds out on the no donation / free version of no$gba as I don't have a Nintendo DS or if it needs a special programmable DS like the yab stuff, and dude welldone.

What I can tell is that there's a lib to make DS code in C.
Title: Re: Space Impakto DS
Post by: relsoft on April 28, 2010
Thanks for trying it out guys.

Rick : You could try no$gba which is a windows  emulator for the DS.

Nino: I still have a lot to learn regarding the hardware (it has just been 2 weeks since I started coding for the DS).  It also seems that I could combine the 3d rendering system along with the 2d core on the "main engine".  I tried putting a quad below those sprites and it worked. So I might be able to use some sort of tunnel for some BGs.

Clyde: Yeah, C/C++. It's called DevkitPro.  It's a GCC port on the ARM. You can use it to code for the PPC and the PSP also.
Title: Re: Space Impakto DS
Post by: combatking0 on April 28, 2010
I wish I had a DS!

I sometimes re-furbish damaged, classic DSes.

Now, please don't be offended, but I've got an R4 card. There's scope for piracy, but I use it only for homebrews. With a 1.8GB (it says 2GB, but it isn't) card in there, there's loads of room for home brews. Maybe one day I'll get time to make some of my own to put on there.

I'll download this and have a look tonight.

(edit)
Wow! That's impressive! How long did it take you to learn how to do that?

I know it's not finished yet, but there's the start of a great game there.
Title: Re: Space Impakto DS
Post by: relsoft on April 29, 2010

Wow! That's impressive! How long did it take you to learn how to do that?

I know it's not finished yet, but there's the start of a great game there.

I downloaded DevkitPro April 10. Started coding about 4 days later because I didn't know how to set it up(turned out that it's actually just a snap) as I was unzipping every zip,7zip and rar on their own when I could have just installed offline via the inataller itself to automate the install process.

However, I've been reading DS coding stuff a week prior to April 10. So all in all, it's like 3 weeks at 2 hours a day(notwidthstanding brownouts).

Things that really make this harder than it is:

1. DS has no FPU (That engine does not use a single float or double) so you have to use Fixed-point math to accomplish stuff.
2. Sprite engine could only handle 128 sprites.
3. Very limited VRAM and RAM.
4. ARM7/9 being RISC cpus, makes MOD, /, etc very slow.
5. Very slow processor (66 mhz I think)

However, these are the things that make DS coding great.
1. Built-in 2d engine (though kind of hard to manage if you looked at the Cobject and Csprite code)
2. Built-in 3d engine.
3. My daughter loves to try my programs on her DS.
Title: Re: Space Impakto DS
Post by: ninogenio on April 29, 2010
well rel i am astounded at how far youve come in this short time!

and absoulutly you can use the 2d engine and the 3d one at the same time although only on one screen at a time.

you can however do 3d on both screens at the same time at 30fps using the screencapture hardware (draw to the back buffer in 3d take a screen grab flip the 3d engine at the other screen blit the 3d meant for that screen, and yous the 2d core to blit the 3d image grab on the top screen) thats how its done in some of the ninty games but like i say it half your frame rate although its not so much of a big deal at 30fps it still plays nice.

or

double up the the max vertex limit on a single screen but you have to keep track of every thing your self if you use the screen capture for this.

do some bloom glow shader effects.
Title: Re: Space Impakto DS
Post by: relsoft on April 30, 2010
I've tried to read up on the 3d engine and it seems not too hard to do since they made an opengl wrapper and that the DS registers are much like OpenGL's state machine.

(http://rel.betterwebber.com/images/screenies/nds_ascaris.png)

http://rel.betterwebber.com/junk.php?id=102
Title: Re: Space Impakto DS
Post by: ninogenio on May 01, 2010
yeah the ds is perfectly suited for opengl and like i said you can do some really nifty feed back effects using the screen capture hardware.

lol im going to start experimenting again you have givin me the bug rel.
Title: Re: Space Impakto DS
Post by: relsoft on May 07, 2010
Nino: Nice to see you getting back to DS coding.

Update:

Download:

http://rel.betterwebber.com/junk.php?id=101

* 2d/3d combo
* optimized the fixed-point spline funk
* I'm coding half-blind most of the time since I don't know the hardware that much.

screens:

(http://rel.betterwebber.com/images/screenies/nds_si_1.png)
(http://rel.betterwebber.com/images/screenies/nds_si_2.png)
(http://rel.betterwebber.com/images/screenies/nds_si_3.png)

Todo: Use the 3d engine to render some 2d sprites...
Title: Re: Space Impakto DS
Post by: relsoft on May 11, 2010
3d to 2d engine almost done:

http://rel.betterwebber.com/junk.php?id=104

Bye-bye 128 sprite limit..

(http://rel.betterwebber.com/images/screenies/nds_screen_02.png)
Title: Re: Space Impakto DS
Post by: Hotshot on May 19, 2010
Impressive Stuffs relsoft   :clap: :)
Title: Re: Space Impakto DS
Post by: relsoft on May 26, 2010
Thanks!

Update:

* Migrated the rendering engine to use the 3d core.
* Optimized the rendering a bit using GFX_VERTEX_XY instead of GFX_VERTEX_16. (depth is managed manually)
* Sprite rotation and clean stretch implemented
* Coded and BASIC(Freebasic) UV coord auto generator for my sprite images for ease of loading.

Screen:
(http://rel.betterwebber.com/images/screenies/nds_si_3d.png)

Download:
http://rel.betterwebber.com/junk.php?id=101

As usual, source is included.
Title: Re: Space Impakto DS
Post by: relsoft on May 30, 2010
Tool update:

Texture atlas generator(makes memory usage lower):
Based on this: http://www.blackpawn.com/texts/lightmaps/default.html

DL
http://rel.betterwebber.com/junk.php?id=106

Screen:
(http://rel.betterwebber.com/images/screenies/texture_packer.png)

Title: Re: Space Impakto DS
Post by: rdc on May 30, 2010
I can really use this. Thanks rel!
Title: Re: Space Impakto DS
Post by: relsoft on May 30, 2010
I can really use this. Thanks rel!

Because you need it...

Texture packer update:

http://rel.betterwebber.com/junk.php?id=106

Changes:

Multiple images support
Instructions on how to use (readme.txt)
Title: Re: Space Impakto DS
Post by: relsoft on June 16, 2010


Watch:
[youtube]http://www.youtube.com/watch?v=xuPRiI41BBs[/youtube]

Title: Re: Space Impakto DS
Post by: ninogenio on June 29, 2010
hey rel,

i must admit i feel bad i was following your work closly then things in life have been a bit tough over the last couple of months.

but i feel that what you have acheived there with the ds needs a comment, that is awsome i cant belive you got the ds to throw that much around, and in such little time its really really very impressive and too any one else reading belive me what rel has done is no easy feet.
Title: Re: Space Impakto DS
Post by: Clyde on June 29, 2010
totally agree!
game style is a bit to intense for me, but it's absolutely awesome Relsoft Dude
Title: Re: Space Impakto DS
Post by: relsoft on July 10, 2010
Thanks guys. I was a little busy with life for the past month since my dad "went under the knife".

But I coded like crazy for the past 3 days (ave. of 4 hours a day) and I recoded my bullet hell engine from scratch.

Bullet Rel Download (with source)...

http://rel.betterwebber.com/junk.php?id=107

Screen:


(http://rel.betterwebber.com/images/screenies/bullet_rel.png)

features:

1. All Fixed-point engine
2. Data driven interface
3. Less memory usage
4. Easier to use than the PC version
Title: Re: Space Impakto DS
Post by: relsoft on July 19, 2010
Ver 0.04beta up...

What's new?

       
Code: [Select]
v 0.4b  (07/18/10)
Integrated bullet Rel
Added sound effects and BG music (via MaxMod)
Bucket based memory model
Data driven engine
Ditched the options
More enemies

Download:
http://rel.betterwebber.com/junk.php?id=101


screens:
(http://rel.betterwebber.com/images/screenies/nds_si_v4b_a.png)
(http://rel.betterwebber.com/images/screenies/nds_si_v4b_b.png)


Bugs:
1. I needed to lower the BGM volume in order to hear SFX's. Anyone knows why?


I need help finding bugs.  Thanks!!!


Todo:
1. Ship to enemy collision via SAT.
Linky: http://rel.betterwebber.com/junk.php?id=109

2. Tool to make patterns easier.
Title: Re: Space Impakto DS
Post by: relsoft on July 23, 2010
Update Ver 0.05b:

What's new?

Code: [Select]
glFonts
oamFonts
Encapsulated maxmod for a better sound module
Return to homebrew menu
Decreased all the enemy's HP
Better BGM and SFX
Pause and return to menu

Download:
http://rel.betterwebber.com/junk.php?id=101


screens:
(http://rel.betterwebber.com/images/screenies/nds_si_v5b_1.png)
(http://rel.betterwebber.com/images/screenies/nds_si_v5b_2.png)
Title: Re: Space Impakto DS
Post by: relsoft on August 02, 2010
Yay!!! Bullet Pattern making is easy and fun now!


If anyone's interested in making bullet patterns...

Tool update:

Bullet Rel Designer

Download:

http://rel.betterwebber.com/junk.php?id=113

App type: A visual bullet pattern designer I made for my DS game Space Impakto DS


Features:

   * Very Fun since you could design patterns even while drinking coffee.
   * Saves patterns in C/c++ code directly useable by my SHMUP engine.
   Saves are *.cpp files where the nds file resides
   * Can do almost any pattern I have seen (except for tohou "square"
   patterns)
   * Can listen to different moozic while making a pattern.
   * Source included

Limitations:
   * Cannot load patterns (yet)
   * cumbersome controls (Limited DS buttons)


(http://rel.betterwebber.com/images/screenies/nds_bullet_rel_designer.png)



Enjoy!


PS. I hope someone submits patterns to me. ;*)

Try thse patterns"

Code: [Select]
void barrage_SMART_ROBOT_ARMS_5X(Cturret &turret, int active_time, int delay, s32 angle, const Cglsprite *sprites)
{

Tturret_params tp; 

tp.active_time         = 10600;
tp.active              = 1;
tp.smart               = 1;
tp.x_radius            = 0;
tp.y_radius            = 0;
tp.angle               = 16384;
tp.min_angle           = 0;
tp.max_angle           = 32767;
tp.angle_speed         = 0;
tp.angle_dir           = 1;
tp.spread_angle        = 3584;
tp.bullets_per_shot    = 5;
tp.rotation_type       = 2;
tp.spawn_delay         = 0;
tp.max_spawn_delay     = 49;
tp.wavemode            = (E_WAVE_MODE) 2;
tp.wave_counter        = 0;
tp.max_wave            = 4;
tp.max_wave_delay      = 4;
tp.bp.speed            = 1784;
tp.bp.speed_delta      = 5600;
tp.bp.offset           = 4096;
tp.bp.gx               = 0;
tp.bp.gy               = 0;
tp.bp.delay            = 9;
tp.bp.energy           = 1;
tp.bp.state            = (E_BULLET_TYPE) 2;
tp.bp.smart            = 1;
tp.bp.start_frame      = 73;
tp.bp.num_frames       = 3;
tp.bp.anim_delay       = 3;
tp.bp.death_ID         = 0;

tp.bp.width           = sprites[tp.bp.start_frame].width;
tp.bp.height          = sprites[tp.bp.start_frame].height;

turret.parameters.push_back(tp);

}


Code: [Select]
void barrage_5WAY_23WAVE_DIRECT(Cturret &turret, int active_time, int delay, s32 angle, const Cglsprite *sprites)
{

Tturret_params tp; 

tp.active_time         = 10600;
tp.active              = 1;
tp.smart               = 0;
tp.x_radius            = 10;
tp.y_radius            = 9;
tp.angle               = 16384;
tp.min_angle           = 0;
tp.max_angle           = 32767;
tp.angle_speed         = 0;
tp.angle_dir           = 1;
tp.spread_angle        = 2304;
tp.bullets_per_shot    = 5;
tp.rotation_type       = 2;
tp.spawn_delay         = 0;
tp.max_spawn_delay     = 24;
tp.wavemode            = (E_WAVE_MODE) 3;
tp.wave_counter        = 0;
tp.max_wave            = 23;
tp.max_wave_delay      = 4;
tp.bp.speed            = 184;
tp.bp.speed_delta      = 120;
tp.bp.offset           = 4096;
tp.bp.gx               = 0;
tp.bp.gy               = 0;
tp.bp.delay            = -1;
tp.bp.energy           = 1;
tp.bp.state            = (E_BULLET_TYPE) 2;
tp.bp.smart            = 0;
tp.bp.start_frame      = 99;
tp.bp.num_frames       = 3;
tp.bp.anim_delay       = 3;
tp.bp.death_ID         = 0;

tp.bp.width           = sprites[tp.bp.start_frame].width;
tp.bp.height          = sprites[tp.bp.start_frame].height;

turret.parameters.push_back(tp);

}


Code: [Select]
void barrage_WAS0AG_6WAY_3SHOT(Cturret &turret, int active_time, int delay, s32 angle, const Cglsprite *sprites)
{

Tturret_params tp; 

tp.active_time         = 10000;
tp.active              = 1;
tp.smart               = 0;
tp.x_radius            = -14;
tp.y_radius            = -13;
tp.angle               = 0;
tp.min_angle           = 0;
tp.max_angle           = 32768;
tp.angle_speed         = 2048;
tp.angle_dir           = 1;
tp.spread_angle        = 5632;
tp.bullets_per_shot    = 18;
tp.rotation_type       = 2;
tp.spawn_delay         = 0;
tp.max_spawn_delay     = 30;
tp.wavemode            = (E_WAVE_MODE) 3;
tp.wave_counter        = 0;
tp.max_wave            = 0;
tp.max_wave_delay      = 3;
tp.bp.speed            = 384;
tp.bp.speed_delta      = 0;
tp.bp.offset           = 4096;
tp.bp.gx               = 0;
tp.bp.gy               = 0;
tp.bp.delay            = -1;
tp.bp.energy           = 1;
tp.bp.state            = (E_BULLET_TYPE) 2;
tp.bp.smart            = 0;
tp.bp.start_frame      = 96;
tp.bp.num_frames       = 3;
tp.bp.anim_delay       = 3;
tp.bp.death_ID         = 0;

tp.bp.width           = sprites[tp.bp.start_frame].width;
tp.bp.height          = sprites[tp.bp.start_frame].height;

turret.parameters.push_back(tp);

}


Title: Re: Space Impakto DS
Post by: relsoft on April 20, 2011
Updated to a really playable game.

BTW, to make "replay" work, finish the level without a continue.

Enjoy!