Forums

Sega Master System / Mark III / Game Gear
SG-1000 / SC-3000 / SF-7000 / OMV
Home - Forums - Games - Scans - Maps - Cheats - Credits
Music - Videos - Development - Hacks - Translations - Homebrew

View topic - [Coding competition 2017] Astro Force by eruiz00

Reply to topic Goto page 1, 2, 3  Next

Rate this entry!

1 (Poor) 0% 0%
2 0% 0%
3 0% 0%
4 0% 0%
5 0% 0%
6 4% 4%
7 4% 4%
8 45% 45%
9 (Excellent) 45% 45%
This poll has expired.
Author Message
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 7688
  • Location: Paris, France
Reply with quote
[Coding competition 2017] Astro Force by eruiz00
Post Posted: Mon Mar 27, 2017 7:53 pm
http://www.smspower.org/Homebrew/AstroForce-SMS



Quote
Here are the promised shmup. I wanted to do a classical shooter like those I played 30 years ago.

RSG - Thunder force - Gaiares - Aleste - R-type - MSX nemesis games are my inspiration here. Remember the day I bought japanese import gaiares at a little shop here in Malaga. The feelings the first time I played. Never will forget that day. That's the spirit.

At title screen, one button enter the game, other enter the jukebox and options page. Do yourself a favor and put 6 lifes.

Playability is finely tuned (I think) some memorization and things will be easier. There are continues. Ctrl+F1 in emulicious helps a lot! Actually I finish the game with two continues :)
6 stages, each with its own concepts, music, graphics and enemies + final boss stage
11 bosses
30+ enemy types
Intro, ending
What I like the most? the music. Mod2PSG it the perfect tool for a music snob like me.

Source code is included although I not feel him finished (i'm bothering with each time less performance issues). Simply, it's my toy. I dont want to stop now. Have to test some ideas with retracing and interrupts, test if can update scroll and tiles every two frames (instead one as it is now) keeping animation. Optimizing some parts of code.

If someone thinks can help with some custom z80 assembly functions, doing profile at emulicious (I cannot... doesn't understand whats really going there), I'll send the code. It would be great!

Enjoy!
  View user's profile Send private message Visit poster's website
  • Joined: 26 Jan 2014
  • Posts: 409
Reply with quote
Post Posted: Mon Mar 27, 2017 11:07 pm
Impressive work! First position you should have.

PS: You may active the Left Column Blank ;)

PS2: When loosing a life the spaceship should be invincible for few seconds when coming back to life.
  View user's profile Send private message Visit poster's website
  • Joined: 27 Feb 2017
  • Posts: 145
  • Location: Northern Ireland
Reply with quote
Post Posted: Mon Mar 27, 2017 11:58 pm
Had a wee try on Meka and damn this looks really good!
Only tried the cave level , there's parallax on this as promised by the developer.
It has an intro and everything! Only downside for me is that the ship doesnt have an animation flying left or right . Music is good and the effects are fitting.
Overall I want to see more and first impressions are really good , wish I had this for the real master system and play it there instead as I'm always playing on my console (not a big fan of emulators and too bad I dont own a everdrive) .
  View user's profile Send private message
  • Joined: 28 Jan 2017
  • Posts: 233
  • Location: Málaga, Spain
Reply with quote
Post Posted: Tue Mar 28, 2017 5:24 am
Ummmmm.. some appountments:
1. The ship is inmune about the first control second .
2. My favorite stages are vulcan and three latest (5,6,7).
3. All (constructive) suggestions will be pondered and pushed in game if its possible (i am speaking about bytes of space).
  View user's profile Send private message
  • Joined: 01 Feb 2014
  • Posts: 347
Reply with quote
Post Posted: Tue Mar 28, 2017 8:53 pm
Anyone else having trouble running this on real hardware? The intro is all messed up and the game crashes on both the options screen and the stage select.

Playing it in an emulator, I like it very much. There are little details that could be improved, but overall this is very impressive. Great job!
  View user's profile Send private message
  • Joined: 28 Jan 2017
  • Posts: 233
  • Location: Málaga, Spain
Reply with quote
Post Posted: Tue Mar 28, 2017 9:28 pm
Yay! I found a trouble with an android sms emulator (locked on options screen), but i though it was emulator fault as the rest (kega, emulicious) works.

Maybe the risky wait to vblank strategy which the game have to alter things between frames. Also, im doing sprite to sat every two frames.

Please kagesan, test this rom (v1, which does wait to vblank every frames at the cost of some slowdown). Maybe this will func... sorry!
astroforcev1.zip (114.18 KB)

  View user's profile Send private message
  • Joined: 01 May 2011
  • Posts: 371
Reply with quote
Post Posted: Tue Mar 28, 2017 10:25 pm
This is really professional. Great graphics and fantastic music! Maybe the ship could do with being a bit faster, and a scoring system would be nice.

It works fine on Master Everdrive on VA1 and VA3 SMS1 at both 50Hz and 60Hz. What hardware are you having issues with?
  View user's profile Send private message
  • Joined: 27 Feb 2017
  • Posts: 145
  • Location: Northern Ireland
Reply with quote
Post Posted: Tue Mar 28, 2017 10:34 pm
I would totally own this game if one day gets published by the dev in a physical release. The game sure would do more with a few more tweaks but it looks very pro for sure.
My requests would be
- ship animation
- power ups ( if they are not already in the game)

Everything else seems great , the dev already mentioned bosses and stuff and in the cave level seems to have some treadmills that move your ship I found that to be very original. I don't want to play more because I don't want to be spoiled , I really avoid playing this stuff on emulators as I love playing everything on the real system.

All the best to this project looking forward to see more news about this awesome shooter!
  View user's profile Send private message
  • Joined: 14 Apr 2013
  • Posts: 429
Reply with quote
Post Posted: Tue Mar 28, 2017 10:37 pm
eruiz00 wrote
Yay! I found a trouble with an android sms emulator (locked on options screen), but i though it was emulator fault as the rest (kega, emulicious) works.

Maybe the risky wait to vblank strategy which the game have to alter things between frames. Also, im doing sprite to sat every two frames.

Please kagesan, test this rom (v1, which does wait to vblank every frames at the cost of some slowdown). Maybe this will func... sorry!

What android sms emulator did you try it with?
  View user's profile Send private message Visit poster's website
  • Joined: 28 Jan 2017
  • Posts: 233
  • Location: Málaga, Spain
Reply with quote
Post Posted: Wed Mar 29, 2017 5:19 am
With md-emu free you get a lock on options screen. But not on select stage screen (both share code) its strange....
  View user's profile Send private message
  • Joined: 01 Feb 2014
  • Posts: 347
Reply with quote
Post Posted: Wed Mar 29, 2017 6:57 am
BKK wrote
What hardware are you having issues with?

Master Everdrive and SMS 1 (originally PAL, but modded to 60 Hz).

In the intro, the first part doesn't display the text, just the picture of the planet. Second part only shows a black screen. Third part shows the scrolling city scape, but not the ship sprite.

Title screen looks normal, but the game freezes on the next screen, regardless of the button pressed. While the options menu looks otherwise normal, the stage select screen shows varying messed up tiles.

Music plays fine throughout. Both versions of the game behave exactly the same, btw.
  View user's profile Send private message
  • Joined: 01 May 2011
  • Posts: 371
Reply with quote
Post Posted: Wed Mar 29, 2017 8:22 am
It's mysterious as I don't get those issues with a similar set up. I tried with 3 different PAL consoles with different bioses (1.3, 2.4, Alex Kidd). 2.4 is the only one I also tried at 60Hz, so maybe it's a combination of 60Hz and bios or board type.
  View user's profile Send private message
  • Joined: 05 Sep 2013
  • Posts: 1914
Reply with quote
Post Posted: Wed Mar 29, 2017 9:44 am
I still didn't try this on hardware (I promise I will do that ASAP) but I wonder how could it be working on one setup and not on another.

Kagesan's problems seem somehow connected to some palette not correctly initialized BTW, but I can't get how it could be working on a different setup then. I didn't check the code but of course I don't expect to see anything peculiar around palette initialization... it's not the kind of thing one should check if it should be done or not, I wonder...
  View user's profile Send private message Visit poster's website
  • Joined: 12 Oct 2015
  • Posts: 42
  • Location: Ireland
Reply with quote
Post Posted: Wed Mar 29, 2017 9:45 am
Awesome game! When I first saw this game it immediately reminded me of "Alien Syndrome" [classic!] esp. the art style. This SHMUP has a classic 80s retro look and feel again esp. with the art style. Great job!
PS: is there meant to be source code shipped also?

Here are some (constructive) suggestions
Movement: would it be possible to move the player's ship a bit "faster"?
I find it a bit tricky to doget bullets esp. when they are heading for me

I'm playing on emulator, was going to try on the SMS with original joystick
But reading the thread here seems game doesn't run on real hardware??

Fire
Can't shoot file 1+2 at the same time! This would be helpful...!!
I see that Fire1 overrides Fire2 which can sometimes catch you out
Also, an option for "rapid fire" esp. on Fire1 would be awesome :)

Pause button
Not many homebrew games implement the Pause button but would be helpful here.

Continue
I think continue just repeats the stage from the start not where you left off?
  View user's profile Send private message Visit poster's website
  • Joined: 28 Jan 2017
  • Posts: 233
  • Location: Málaga, Spain
Reply with quote
Post Posted: Wed Mar 29, 2017 12:13 pm
Thanks! Lets see....

Pause: dont know howto with smsdevkit. Please some info and ill put.

Ship speed: i were testing with speed set to 2 (actual) and 3 (too fast for me). Maybe next weekend version which will have score and power up system will have speed power. It is not finished for now (im in search of free space...)

Also other suggestions such player sprites for left and right movement will be included.

If someone can explain why the fail i will fix it. Source code is included. Also the psgmod files are available. In psg2mod those files sounds much better.

About the game, when it puts reealy interesting (for my taste) is at stage 5 part 2 to the end. Stage 6 bosses and final escape boss were the last things to do and i had more control on what i had doing.
  View user's profile Send private message
  • Joined: 28 Jan 2017
  • Posts: 233
  • Location: Málaga, Spain
Reply with quote
Post Posted: Wed Mar 29, 2017 12:31 pm
Ill check the palette initialization this night.... at first, palette was in code section. Last weeks moved it to bank 13 (the sprite palette which is the same along all the game. That was 16 bytes free!!)
  View user's profile Send private message
  • Joined: 05 Sep 2013
  • Posts: 1914
Reply with quote
Post Posted: Wed Mar 29, 2017 12:40 pm
for pause key management with devkitSMS: see devkitSMS wiki 'advanced' page (it's almost at the end of the page, there's also an example linked later)

as for ship speed, you might consider using fixed point math so that you can move at 2.5 if 2 is too slow and 3 is too fast...

finally, I again suggest you switch to using assets2banks (thus to automatic resource placement into banks!) and you'll no longer have to search for an empty place to put your 16 bytes palette. If something isn't clear enough with it let me know :)
  View user's profile Send private message Visit poster's website
  • Joined: 28 Jan 2017
  • Posts: 233
  • Location: Málaga, Spain
Reply with quote
Post Posted: Wed Mar 29, 2017 1:16 pm
Thanks sverx... ill cjeck the pause tonight. When i speak about space i refer to code space. The fact is the 78 different enemy objects are hard coded. The call to its functions init update and destroy is done with function pointers table on bank 13 (was a big improvement) but as there are common patterns on enemies, my strategy is to pack these patterns on common functions. About half kilobyte and will be properly finished (and will can start one new project i have been thinking last days)
  View user's profile Send private message
  • Joined: 27 Feb 2017
  • Posts: 145
  • Location: Northern Ireland
Reply with quote
Post Posted: Wed Mar 29, 2017 1:17 pm
eruiz00 wrote


Ship speed: i were testing with speed set to 2 (actual) and 3 (too fast for me). Maybe next weekend version which will have score and power up system will have speed power. It is not finished for now (im in search of free space...)

Also other suggestions such player sprites for left and right movement will be included.



Awesome! :)))

Power up system would be cool both for shots ,even adding different types of shots and speed up system :)
Hopefully there will be plenty of enemies and a nice variety of them to shoot at! Don't know about the bosses I hope they are hard and pretty good! :)))

Pause feature is also a good idea.
About continues imo I wouldn't even have them but that's me I love my games to be hard and not finish them in a week or so (considering the game has only 6 or 7 levels). Good to see everyone is helping out :). Would be great to see this running on the real master system and finally if possible releasing it on a cartridge! :)))

Keep up the good work eruiz00!

PS - love parallax scrolling on the master system as you already know :)))
  View user's profile Send private message
  • Joined: 29 Mar 2012
  • Posts: 308
  • Location: Spain
Reply with quote
Post Posted: Wed Mar 29, 2017 2:05 pm
eruiz00 wrote

If someone can explain why the fail i will fix it. Source code is included. Also the psgmod files are available. In psg2mod those files sounds much better.



Are you planing to put the code in a Github or something?
  View user's profile Send private message
  • Joined: 28 Jan 2017
  • Posts: 233
  • Location: Málaga, Spain
Reply with quote
Post Posted: Wed Mar 29, 2017 5:09 pm
It is in this own website!!! (The code for v1... what are you playing is v2) next weekend will upload v3 with final src and begin new long project
  View user's profile Send private message
  • Joined: 29 Mar 2012
  • Posts: 308
  • Location: Spain
Reply with quote
Post Posted: Wed Mar 29, 2017 7:21 pm
Yes, I know, but it'll be nice to have it in a repo, just to see the improvements that you'll be doing to the game :-)
  View user's profile Send private message
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 11824
  • Location: London
Reply with quote
Post Posted: Wed Mar 29, 2017 8:35 pm
It seems brutally hard, I feel like there should be immunity on respawn and some warning before enemies approach from below the screen - unless the goal is to be a brutal remember-em-up...

I also feel that the code size is crazy, it could be a good example for how to optimise that. Add in some fixed point scrolling/movement and it'll be perfect :)
  View user's profile Send private message Visit poster's website
  • Joined: 25 Feb 2006
  • Posts: 453
  • Location: Belo Horizonte, MG, Brazil
Reply with quote
Post Posted: Wed Mar 29, 2017 8:42 pm
That's a fantastic looking shoot-em-up. All it really needs is some power ups.
The fact that it comes with C source gives me some ideas for a future project. ;)
  View user's profile Send private message Visit poster's website
  • Joined: 28 Jan 2017
  • Posts: 233
  • Location: Málaga, Spain
Reply with quote
Post Posted: Wed Mar 29, 2017 9:41 pm
Ok. Have the pause, speed and shoot powerup (with a new shoot type), and sprites for lateral movement of player. Thats not free. Now the new version will have more enemy shoots at screen (from 10 to 12). Ill have to remap some enemies (all the sprites are loading at beggining of stage and in most of them i get near of 448 and now there are 12 more sprites) but it is only to remove duplicates on animations (from 0-1-2-3 to 0-1-2-1)
  View user's profile Send private message
  • Joined: 27 Feb 2017
  • Posts: 145
  • Location: Northern Ireland
Reply with quote
Post Posted: Wed Mar 29, 2017 10:22 pm
eruiz00 wrote
Ok. Have the pause, speed and shoot powerup (with a new shoot type), and sprites for lateral movement of player. Thats not free. Now the new version will have more enemy shoots at screen (from 10 to 12).


Awesome!
Make it a real game on cartridge , manual , cover art , box and I think I'll be saving myself some money for this if all ends up well. Up to you of course (long as its not for sale on a ludicrous price).
Some people were saying it wasn't working on a real system so for now I think its better someone tests this out for the final builds.
Being a hard game is rewarding even if it becomes a remember em up haha! I love thunder blade for its difficulty :D ( no continues :p)
Of course you can't miss the temporary invincibility after youre dead and I guess this game for the player to die is one hit I think.
If you don't wanna share the final Rom that's fine with me , all I ask is some video of YouTube at least to have a preview of the game and make sure it works on a real system with no problems at all.
Thanks for including my suggestion eRuiz00 :)
  View user's profile Send private message
  • Joined: 27 Feb 2017
  • Posts: 145
  • Location: Northern Ireland
Reply with quote
Post Posted: Wed Mar 29, 2017 10:48 pm
I was now looking at the main screen and I was thinking :
Do the stars twinkle?
If not that would be a nice detail to have. :)
  View user's profile Send private message
  • Joined: 01 May 2011
  • Posts: 371
Reply with quote
Post Posted: Wed Mar 29, 2017 10:48 pm
It has a better solution than temporary invincibility, when you blow up it also destroys the on screen enemies. Maybe the explosion from losing a life could expand across the whole screen, as currently the enemies appear to blow up for no reason.
  View user's profile Send private message
  • Joined: 27 Feb 2017
  • Posts: 145
  • Location: Northern Ireland
Reply with quote
Post Posted: Wed Mar 29, 2017 10:58 pm
BKK wrote
It has a better solution than temporary invincibility, when you blow up it also destroys the on screen enemies. Maybe the explosion from losing a life could expand across the whole screen, as currently the enemies appear to blow up for no reason.


Yeah , either temporary invencibility or all the enemies blow up when a new ship respawns.
I would go with temporary invencibility but whatever works best .
  View user's profile Send private message
  • Joined: 28 Jan 2017
  • Posts: 233
  • Location: Málaga, Spain
Reply with quote
Post Posted: Thu Mar 30, 2017 6:06 am
Temporary invincibility is yet. In your version. About a second so you can accomoodate. Though about continues. I though that the game is hard but with them one can finish the game without cheat (i do). I only wanted people finishing the game because i think its by far a more rewarding experience than just play the first four stages. Ill upload new version rom which will have all improvements i can put. Im doing code improvements so i can do a better end game .boss.
  View user's profile Send private message
  • Joined: 01 Feb 2014
  • Posts: 347
Reply with quote
Post Posted: Thu Mar 30, 2017 8:05 am
I think it's not really apparent that the player is temporally invincible, and you don't know when that period ends. Maybe you could make the player ship flash or flicker while it's invincible.
Additionally, it seems that the player can't shoot while he's invincible. That can be a problem, as the screen fills quite quickly with new enemies and bullets.

Speaking of shooting, is it intentional that the player can't fire front and side cannons at the same time? If so, that's an interesting design choice. I suggest changing the way player shots get triggered, though. I think it would be better if always the shot that got triggered last is the active one, even if the other shot button is still held down. Right now, pressing both buttons at the same time yields unpredictable results: sometimes the front cannon fires, sometimes the side csnnons, sometimes both alternate or even cancel each other out, so there's no fire at all.

Please don't make the game easier. With a bit of practice I can already clear the first two stages, and that's very rewardinh indeed.

Overall I'm enjoying your game a lot. If I had to nitpick, I feel that the visuals are a little inconsistent, artistically: You've got cartoony bits (the tanks), stylized ones and 'realistic' ones that are all fine by themselves, but don't really complement each other and sometimes look like they belong to different games. Additionally, some bits look strangely pixelated (the volcanos, the clouds, some enemies too) as if scaled up from a lower resolution.
  View user's profile Send private message
  • Joined: 05 Sep 2013
  • Posts: 1914
Reply with quote
Post Posted: Thu Mar 30, 2017 8:37 am
I've been testing this ROM on my setup (I'm using a Master EverDrive on my SMS II fitted with a 50/60Hz switch and connected to a CRT) yesterday evening.

The result is very good, the game runs smoothly on hardware as it does on good emulators. I didn't see any VRAM corruption or the sort of problems that typically arise on hardware when the game is developed and tested using emulators only.

Said that, there are a few things you might want to consider to fix to make that 100% perfect.

First, I'd ask an English native speaker to help in fixing the texts. Even I can spot some mistakes - any my English is terrible - so it means there are probably many more I didn't notice.

Then, I noticed that I can continuously fire just holding down the fire key. I suspect it's not expected to have auto-fire mode ON (or is it?). The same applies to the secondary fire button. The bullets also disappear before reaching the top of the screen... but again it might be a choice you made on purpose.

Anyway this game is so good I'm actually envying you too much for making this.

Which means you'll get a terrible vote from me, be warned! ;)

No, seriously. Great work, pal. Keep on flooding this site with quality productions like this one, please.
  View user's profile Send private message Visit poster's website
  • Joined: 01 Feb 2014
  • Posts: 347
Reply with quote
Post Posted: Thu Mar 30, 2017 10:02 am
So the game is running on everyone's hardware setup, but not on mine? I don't get it. There's nothing exotic about my Master System, and I never experienced problems like these with any other ROM.

The last thing I can think of is some conflict with viletim's FM board, which I have installed. That doesn't really make sense either, though.
  View user's profile Send private message
  • Joined: 05 Sep 2013
  • Posts: 1914
Reply with quote
Post Posted: Thu Mar 30, 2017 11:14 am
Where can I read some details about viletim's FM board? I'd like to see how it interfaces with the rest of the hardware, to see if there's something which collides with devkitSMS in some way, even if I think it's really unlikely...
  View user's profile Send private message Visit poster's website
  • Joined: 27 Feb 2017
  • Posts: 145
  • Location: Northern Ireland
Reply with quote
Post Posted: Thu Mar 30, 2017 11:26 am
Kagesan wrote
I think it's not really apparent that the player is temporally invincible, and you don't know when that period ends. Maybe you could make the player ship flash or flicker while it's invincible.
Additionally, it seems that the player can't shoot while he's invincible. That can be a problem, as the screen fills quite quickly with new enemies and bullets.

Speaking of shooting, is it intentional that the player can't fire front and side cannons at the same time? If so, that's an interesting design choice. I suggest changing the way player shots get triggered, though. I think it would be better if always the shot that got triggered last is the active one, even if the other shot button is still held down. Right now, pressing both buttons at the same time yields unpredictable results: sometimes the front cannon fires, sometimes the side csnnons, sometimes both alternate or even cancel each other out, so there's no fire at all.

Please don't make the game easier. With a bit of practice I can already clear the first two stages, and that's very rewardinh indeed.

Overall I'm enjoying your game a lot. If I had to nitpick, I feel that the visuals are a little inconsistent, artistically: You've got cartoony bits (the tanks), stylized ones and 'realistic' ones that are all fine by themselves, but don't really complement each other and sometimes look like they belong to different games. Additionally, some bits look strangely pixelated (the volcanos, the clouds, some enemies too) as if scaled up from a lower resolution.


I agree , flickering and shooting while having temporary invencibility would fix that problem and get this out of the road.
Next button 1 shoots forward while 2 shoots sideways I think . It's an interesting idea. Dont think eruiz00 didn't program anything if you press both buttons hence the reason why sometimes the ship shoots forward or sideways when you press both buttons.
I don't know what to say about this , it's a original idea , maybe you press both buttons the ship could charge a super shot or just have both buttons to shoot one type of shot and having powerups (speed,different types of shots and upgrades) would get this sorted and out of the road aswel.
I agree with not making the game easier. Hard is good as long as the player has still a chance to beat the game.
About the consistency of the game design/visuals maybe eruiz00 can work on that with more time (since all these new suggestions are revamping the game big time).
  View user's profile Send private message
  • Joined: 27 Feb 2017
  • Posts: 145
  • Location: Northern Ireland
Reply with quote
Post Posted: Thu Mar 30, 2017 11:32 am
sverx wrote
I've been testing this ROM on my setup (I'm using a Master EverDrive on my SMS II fitted with a 50/60Hz switch and connected to a CRT) yesterday evening.

The result is very good, the game runs smoothly on hardware as it does on good emulators. I didn't see any VRAM corruption or the sort of problems that typically arise on hardware when the game is developed and tested using emulators only.

Said that, there are a few things you might want to consider to fix to make that 100% perfect.

First, I'd ask an English native speaker to help in fixing the texts. Even I can spot some mistakes - any my English is terrible - so it means there are probably many more I didn't notice.

Then, I noticed that I can continuously fire just holding down the fire key. I suspect it's not expected to have auto-fire mode ON (or is it?). The same applies to the secondary fire button. The bullets also disappear before reaching the top of the screen... but again it might be a choice you made on purpose.


Glad to hear its running on a master system 2 ! :)

English native speaker to proof read the text maybe Maxim can help! :)
Auto fire ? That's nice ! :)
Bullets disappearing before they reach the top of the screen? Maybe that's intentional...
  View user's profile Send private message
  • Joined: 28 Jan 2017
  • Posts: 233
  • Location: Málaga, Spain
Reply with quote
Post Posted: Thu Mar 30, 2017 12:12 pm
Maybe the trouble with kagesan console is a bios which eats some additional bytes? Think that the rom gets to 0x7a50... trying to make it slimmer...

About the shoot style (lateral vs front fire) yes. It was a design. The idea is that you have to alternate and be careful as enemies are put to force you to change. Specially on stage 6 and vulcan. Even with powerup system this concept will not be lost.

Ill check all those questions and ill finish the rom for sure. The saturday will be the finishing day.

Sverx: this game is your child also (and of everyone who have made a compiler a tool a lib or helped me when i did those questions or now doing suggestions) so be nice.... (lol)
  View user's profile Send private message
  • Joined: 05 Sep 2013
  • Posts: 1914
Reply with quote
Post Posted: Thu Mar 30, 2017 12:27 pm
eruiz00 wrote
Sverx: this game is your child also [...] so be nice.... (lol)


LOL! I'm being the nicest I can! :)

eruiz00 wrote
Maybe the trouble with kagesan console is a bios which eats some additional bytes? Think that the rom gets to 0x7a50... trying to make it slimmer...


SMS BIOS gets mapped out when the cartridge starts so that's surely not the problem.
  View user's profile Send private message Visit poster's website
  • Joined: 28 Jan 2017
  • Posts: 233
  • Location: Málaga, Spain
Reply with quote
Post Posted: Thu Mar 30, 2017 12:49 pm
About graphics: yeah it is my weak point. Ill check the most obvious problems.

There are some subtle questions which nobody has spoken about. All the music is original except stage 5 music (called tokai forever in jukebox) this is a reference to vic tokai. Bought and played trouble shooters 1&2 25 years ago and i always loved both games.

The sms header serial jumber is 57300. Guess why.

The weapon system (and lack of powerups) is inspired by rsg (mother of all shmups for me) my concept was like a a miniRSG system at beggining (there were 3 weapons) lack of space made me to simplify it.
  View user's profile Send private message
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 11824
  • Location: London
Reply with quote
Post Posted: Thu Mar 30, 2017 1:28 pm
Bad English just helps with the late 80s "Engrish" feel :) All Your Astro Force Are Belong To Us? A Winner Is You?
  View user's profile Send private message Visit poster's website
  • Joined: 28 Jan 2017
  • Posts: 233
  • Location: Málaga, Spain
Reply with quote
Post Posted: Thu Mar 30, 2017 4:39 pm
Jajajja lol may the astro force be with you.
  View user's profile Send private message
  • Joined: 01 May 2011
  • Posts: 371
Reply with quote
Post Posted: Thu Mar 30, 2017 4:56 pm
Kagesan wrote
So the game is running on everyone's hardware setup, but not on mine? I don't get it. There's nothing exotic about my Master System, and I never experienced problems like these with any other ROM.

The last thing I can think of is some conflict with viletim's FM board, which I have installed. That doesn't really make sense either, though.


It might be the language switch, if so the same issue probably affects Japanese systems too.
  View user's profile Send private message
  • Joined: 27 Feb 2017
  • Posts: 145
  • Location: Northern Ireland
Reply with quote
Post Posted: Thu Mar 30, 2017 6:18 pm
Maxim wrote
Bad English just helps with the late 80s "Engrish" feel :) All Your Astro Force Are Belong To Us? A Winner Is You?


Lollolollolol!

May the astro force be with you haha!
  View user's profile Send private message
  • Joined: 01 Jan 2014
  • Posts: 291
Reply with quote
Post Posted: Fri Mar 31, 2017 3:23 am
I have some time off in 2/3 weeks so holding off playing games / hacks. I did have a squiz though and the intro for this game is wonderfully polished, graphics in general are very nice. Can't wait to play it some more.
  View user's profile Send private message
  • Joined: 28 Jan 2017
  • Posts: 233
  • Location: Málaga, Spain
Reply with quote
Technical question
Post Posted: Sat Apr 01, 2017 12:01 am
Ummm... searching for space and optimization, found an strange way to cut space: Change switches for function pointers. Example:

switch(en->enemyparama)
{
case 1:
DoCommonBossAppearingFunction(en);
break;
case 2:
UpdateStage3EndBoss1(en);
break;
case 3:
UpdateStage3EndBoss2(en);
break;
case 4:
UpdateStage3EndBoss3(en);
break;
case 5:
UpdateStage3EndBoss4(en);
break;
}

to:

// Call custom function
changeBank(FIXEDBANKSLOT);
(*(updatestage3endbossfunctions[en->enemyparama]))(en);

This change saves about 25 bytes. Don't know about performance. Some insight? Seems interesting to me. If maintain the switch and inline the functions, size grows, so no alternative.
  View user's profile Send private message
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 11824
  • Location: London
Reply with quote
Post Posted: Sat Apr 01, 2017 8:52 am
25 bytes doesn't seem like a significant amount... the switch is probably just a bunch of cp opcodes underneath.
  View user's profile Send private message Visit poster's website
  • Joined: 28 Jan 2017
  • Posts: 233
  • Location: Málaga, Spain
Reply with quote
Post Posted: Sat Apr 01, 2017 9:34 am
Maxim wrote
25 bytes doesn't seem like a significant amount... the switch is probably just a bunch of cp opcodes underneath.


The fact is I have many switchs ingame, began to replace them (or optimice to use numbers to 1-? without holes). Only replacing half of them to the function table pointer code size reduced from 0x7a00 to 0x7600. Also, replaced a switch in player update function (a time consuming function which is called every frame) and it seems the game is more smooth.

In other hand, It seems better to fragment the code in functions than a large function with a switch, at least in size.

Doing all sort of optimizations in functions which didn't see from a month ago. The space is used to improve some effects in some stages. Next project will be a technical challenge for me (don't like to repeat, this is just for fun) and this is important, as I will need massive ram (32x24x2) array to save scene changes and maintain interaction.

Sorry for my ZW engSish, I am trying my best!
  View user's profile Send private message
  • Joined: 05 Sep 2013
  • Posts: 1914
Reply with quote
Post Posted: Sat Apr 01, 2017 5:08 pm
if the ONLY reason for your switch construct is to call a different function with the same interface (same parameters, same return value) then it's faster and smaller to use function pointers.

anyway whenever possible, SDCC turns switch constructs into jump tables so that no comparison is needed. to make this more likely to happen, use enums or contiguous values from zero onward.
  View user's profile Send private message Visit poster's website
  • Joined: 28 Jan 2017
  • Posts: 233
  • Location: Málaga, Spain
Reply with quote
Post Posted: Sat Apr 01, 2017 6:51 pm
Ummm... yeah it seems faster. Anyway, with function pointers I have the pointer tables in bank, not in code. 0x0300 bytes saved :).

SDCC documentation says switchs should have contiguous values, but cannot start at 0. I tested before with a big switch (from 0->n) change to (from 1->n+1) and code was thinner.

In other hand, remember the day you (or philip or maxim) told me about avoid ints. Have stripped them all in enemies (had to recode few of them) and other stuff about three hours ago and now everything goes better, quicker, softer ("softer?") and recovered 0x0600 of space. It seems I'll have space to do another stage, even now that pause, some additional effect to decorate some scene, powerup system, the blitting at player beginning, and a more accurate bullets direction calculator, has been done.

char=8bit, obvious. It should have been done before!
  View user's profile Send private message
  • Joined: 05 Sep 2013
  • Posts: 1914
Reply with quote
Post Posted: Sat Apr 01, 2017 9:59 pm
eruiz00 wrote
SDCC documentation says switchs should have contiguous values, but cannot start at 0. I tested before with a big switch (from 0->n) change to (from 1->n+1) and code was thinner.


mmm... no. Read carefully:

Quote
8.1.7 ’switch’ Statements
SDCC can optimize switch statements to jump tables. It makes the decision based on an estimate of the generated code size. SDCC is quite liberal in the requirements for jump table generation:
- The labels need not be in order, and the starting number need not be one or zero, the case labels are in numerical sequence or not too many case labels are missing.


which means you can start from 0 or 1 or whatever. Also if you start from 0 and you're using an unsigned char, there won't be any lower bound check (as it would be useless)
  View user's profile Send private message Visit poster's website
Reply to topic Goto page 1, 2, 3  Next



Back to the top of this page

Back to SMS Power!