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 2016] 3D City by SteveProXNA

Reply to topic

Rate this entry!

1 (Poor) 0% 0%
2 0% 0%
3 0% 0%
4 20% 20%
5 6% 6%
6 53% 53%
7 20% 20%
8 0% 0%
9 (Excellent) 0% 0%
This poll has expired.
Author Message
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 13347
  • Location: London
Reply with quote
[Coding competition 2016] 3D City by SteveProXNA
Post Posted: Mon Mar 21, 2016 6:58 pm
http://www.smspower.org/Homebrew/3DCity-SMS



SteveProXNA wrote
Classic 8-bit Shoot 'em up built for the Sega Master System

INTRO

3D City is a simple "Shoot 'em up" video game originally programmed by StevePro Studios in New Zealand, January 1988. The game was written using BASIC programming language built on the Sega SC-3000 [source code: http://bit.ly/1n1oEk1].

Inspired from previous posts on Sega Console Programming and z88dk Programming Setup [steveproxna.blogspot.com], 3D City was the impetus to build an 8-bit video game in C / Z80 assembler to target the Sega Master System.

INSTRUCTIONS

Simple! Move target and shoot all enemy ships before they kill you. 4x misses and it is Game Over. Hint: hold controller Button2 down while moving target slows target down for more focused attack.
  View user's profile Send private message Visit poster's website
  • Joined: 23 Mar 2013
  • Posts: 572
  • Location: Copenhagen, Denmark
Reply with quote
Post Posted: Mon Mar 28, 2016 3:46 pm
I very much like this idea of a Space Harrier type game! And, as my Star Wars crazy son said, now with Tie Fighters coming at you :) The 3D/flying into the screen and towards the city-effect does not convince my brain as much as the original Harrier checkerboard effect, though. Nice touch with fine tuning the aim with button 2.

No problems on my emulator. On my PAL SMS1 (through an Everdrive), the graphics glitch - it looks like the VDP recieves data too fast/during active display?
  View user's profile Send private message Visit poster's website
  • Joined: 12 Oct 2015
  • Posts: 113
  • Location: Ireland
Reply with quote
Post Posted: Mon Mar 28, 2016 8:44 pm
Thanks for the awesome feedback!

RE: graphics glitch
I actually received a direct message from Calindro about this earlier today

As you may have guessed, I'm new to SMS Power:
I used Fusion + Meka during development thus didn't see any graphics glitches here

However, I just found out about the "Emulate VDP constraints" option in Emulicious
And now I'm able to see the graphics glitch immediately :(

FYI: I followed code samples written by haroldoop using z88dk to complete 3D City;
Super thankful for these but not sure if these VDP issues can be resolved in C?!?

Any suggestions to fix or assistance here would be greatly appreciated. Thanks!
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 13347
  • Location: London
Reply with quote
Post Posted: Mon Mar 28, 2016 9:46 pm
It's all about timing, control and optimisation. Make sure all your VRAM writing happens immediately after the VBlank (timing). You have a limited amount of time, so make sure you are not writing more than you need to (control and optimisation). If you really have to exceed the time available then you need to drop the write speed down once the display starts being active.
  View user's profile Send private message Visit poster's website
  • Joined: 01 Jan 2014
  • Posts: 329
Reply with quote
Post Posted: Tue Mar 29, 2016 2:58 am
Lots of fun. Had most fun on hard, easy was too well... easy :p

If i had a suggestion it would be to have ships slightly different depending on how aggressive they are, a different colour possibly. Very enjoyable.
  View user's profile Send private message
  • Joined: 05 Sep 2013
  • Posts: 2734
Reply with quote
Post Posted: Tue Mar 29, 2016 10:02 am
SteveProXNA wrote
FYI: I followed code samples written by haroldoop using z88dk to complete 3D City;
Super thankful for these but not sure if these VDP issues can be resolved in C?!?


I don't know haroldoop's code, but it is something that shouldn't require any attention on your part IMHO. With devkitSMS (shameless promotion...) you just write to VRAM as you wish with no VDP issues and if you need to write data faster (when screen is off or in vblank) you can call an UNSAFE function (but it's explicitly named so, so you know what you're doing...)
  View user's profile Send private message Visit poster's website
  • Joined: 12 Oct 2015
  • Posts: 113
  • Location: Ireland
Reply with quote
Post Posted: Tue Mar 29, 2016 7:12 pm
psidum wrote
Lots of fun. Had most fun on hard, easy was too well... easy :p


@psidum Awesome! Thanks for your feedback
  View user's profile Send private message Visit poster's website
  • Joined: 12 Oct 2015
  • Posts: 113
  • Location: Ireland
Reply with quote
Post Posted: Tue Mar 29, 2016 9:24 pm
sverx wrote
I don't know haroldoop's code, but it is something that shouldn't require any attention on your part IMHO. With devkitSMS (shameless promotion...) you just write to VRAM as you wish with no VDP issues and if you need to write data faster (when screen is off or in vblank) you can call an UNSAFE function (but it's explicitly named so, so you know what you're doing...)


Thanks sverx for the feedback! I actually only heard about devkitSMS recently so was already committed to using z88dk for the competition. As you mention, calling high level functions that just write to VRAM as you wish with no VDP issues sounds perfect!
  View user's profile Send private message Visit poster's website
  • Joined: 25 Feb 2006
  • Posts: 568
  • Location: Belo Horizonte, MG, Brazil
Reply with quote
Post Posted: Tue Mar 29, 2016 10:21 pm
Having just made two games using SDCC + devkitSMS, I must say that they have less limitations, a better library, and the generated code is more efficient than what Z88DK is capable of. ;)
  View user's profile Send private message Visit poster's website
  • Joined: 05 Sep 2013
  • Posts: 2734
Reply with quote
Post Posted: Wed Mar 30, 2016 9:12 am
On emulators it runs just smoothly and I enjoyed it, even if it's not really my genre of game (I found Space Harrier boring, enough said [yes you can now insult me] ;) )
  View user's profile Send private message Visit poster's website
  • Joined: 12 Oct 2015
  • Posts: 113
  • Location: Ireland
Reply with quote
Post Posted: Wed Mar 30, 2016 4:18 pm
Last edited by SteveProXNA on Wed Mar 30, 2016 7:10 pm; edited 2 times in total
haroldoop wrote
Having just made two games using SDCC + devkitSMS, I must say that they have less limitations, a better library, and the generated code is more efficient than what Z88DK is capable of. ;)


Thanks haroldoop! I see how you've re-written DataStorm using SDCC + devkitSMS and runs great on Emulicious with the "Emulate VDP constraints" option enabled. I see your other game written using devkitSMS was "TwinMaze" Thanks for attaching the source code... this is always helpful...!!
  View user's profile Send private message Visit poster's website
  • Joined: 12 Oct 2015
  • Posts: 113
  • Location: Ireland
Reply with quote
Post Posted: Wed Mar 30, 2016 4:19 pm
sverx wrote
On emulators it runs just smoothly and I enjoyed it, even if it's not really my genre of game (I found Space Harrier boring, enough said [yes you can now insult me] ;) )


Awesome! Thanks sverx :)
  View user's profile Send private message Visit poster's website
  • Joined: 25 Feb 2006
  • Posts: 568
  • Location: Belo Horizonte, MG, Brazil
Reply with quote
Post Posted: Wed Mar 30, 2016 10:06 pm
SteveProXNA wrote
haroldoop wrote
Having just made two games using SDCC + devkitSMS, I must say that they have less limitations, a better library, and the generated code is more efficient than what Z88DK is capable of. ;)


Thanks haroldoop! I see how you've re-written DataStorm using SDCC + devkitSMS and runs great on Emulicious with the "Emulate VDP constraints" option enabled. I see your other game written using devkitSMS was "TwinMaze" Thanks for attaching the source code... this is always helpful...!!


You're welcome. I'm glad you enjoy it! ;)
  View user's profile Send private message Visit poster's website
Reply to topic



Back to the top of this page

Back to SMS Power!