LoginLogin
Nintendo shutting down 3DS + Wii U online services, see our post

Sun Gun Payback [Contest game] development thread

Root / Talk About Programs / [.]

Autz64Created:
While the rhythm of the west life didn't lie on the edge of a gun, it wasn't without it's complications... On the shoulders of the fathers lies a heavy burden: The burden to protect in middle of wilderness... This game is for the 2017 End Contest. Is an first-person on-rails western shooter, done in a similar way as light-gun arcade games! In this arcade game, you fight against mercyless gangs while exploring the old west searching for your beloved ones. Show that you're up to the expectations and draw!
PlotA cowboy who has quit to his outlaw life after imprisionment decides to start again as a calm farmer away from civilization. Later, he and his family got kidnapped by members of the gang he once work with. When they were translated to an unknown location, he manages to escape by falling on a cliff, but his family is still trapped! 4 days later, he prepares himself and start to explore the old west to find the whereabouts of his family.
Why is called "Sun Gun Payback"?
SpoilerTo highlight three (3) things, and also because I'm bad picking names:
  • SUN: Because the game is pre-rendered on the most part. And since the Sun Haze is the tool I use the most to make the panoramic shots, is the first thing i always do. And I like the result.
  • GUN: Because this is a On-Rails Shooter. Andi like shooters
  • PAYBACK: Because of the story structure.
Screenshots:
Spoiler
Tools used:
Spoiler- Compression program (by ActorBug): [74N3F3D4] - 12Me21's Dither program: https://github.com/12Me21/12Me21.github.io/tree/master/dither - Perska's Image to GRP converter: https://github.com/Perska/IMG2GRP/releases - Perska's Wav -> SBW sound converter: https://github.com/Perska/WAV2SBWAV/releases - Blender - Photoshop - Audacity
Development progress:
Spoiler Cutscenes: Intro (Sequence: 100% / Frames: 30%) Cutscene 1 (Sequence: 0% / Frames: 0%) Cutscene 2 (Sequence: 0% / Frames: 0%) Cutscene 3 (Sequence: 0% / Frames: 0%) Cutscene 4 (Sequence: 0% / Frames: 0%) Cutscene 5 (Sequence: 0% / Frames: 0%) Cutscene 6 (Sequence: 0% / Frames: 0%) Cutscene 7 (Sequence: 0% / Frames: 0%) Cutscene 8 (Sequence: 0% / Frames: 0%) Cutscene 9 (Sequence: 0% / Frames: 0%) Levels: Tutorial (Sequence: 100% / Music: 0%) Practice (Sequence: 100% / Music: 100%) Level 1 (Sequence: 100% / Music: 0%) Level 2 (Sequence: 10% / Music: 0%) Level 3 (Sequence: 0% / Music: 0%) Level 4 (Sequence: 0% / Music: 0%) Level 5 (Sequence: 0% / Music: 0%) Level 6 (Sequence: 0% / Music: 0%) Level 7 (Sequence: 0% / Music: 0%) Level 8 (Sequence: 0% / Music: 0%) Level 9 (Sequence: 0% / Music: 0%)

On a tech note: 1) Given the imposibility of using a proper 3D engine (because on-rails shooters works better with 3D), i decided to use a small trick you might found interesting: 2D Skybox. You see, what you see on the screenshots are not proper 3D, but different images distorted by panoramic shots:
Spoiler There are 4 pictures taken there: North, South, East and West.
I setup a scene in Blender, and i render only 4 faces: North, South, East and West, and merge those 4 pictures together. When the whole picture is complete, I send it to SB as a BG (GRP5) and zoom it in. With that, I can archieve the illusion of perspective, on a weird way that's it. The cons is that, given the compression, it will look grainy and objects and enemies can be too obvius to see. Just look at the screenshots i made. This con can be fixed if I sacrifice 360ยบ turns in pro of more resolution. Other one is that it won't look too good with heavy-detailed enviorments, IMO. I haven't made heavy-detailed scenarios, but I can easily imagine what the result would be. 2) Following this guide, i managed to import several sounds that comes very handy: Gunshots, ricochets, enviorment sound like Glass Breaking. However, there's an important note you guys might be interested: If the sound is too short, SmileBASIC will play the sound twice or 3 times before stopping. To avoid that behavior, you have to add "junk" to the array you're parsing to WAVSETA, so the system can "detect" that the sound is more larger that it really is, so it won't play the sound more times than needed. Using PUSH <array>,128 should be enough, however, you need to push several times, so you may want to run it on a FOR loop.

I kinda finished a lot of functionalities, with glitch fixes. The most prominent changes:
  • Now spawning targets (enemies, items...) is done and moves along with the background! Defining the coordinates is kinda bothersome, but you get used to it.
  • Now you can "trigger" events when you either defeat all visible targets, or a message has finished. What it really does is that each DATA has a Delay argument, and the next DATA starts when the delay is equal zero(0). I still need to figure out how i can spawn more enemies when a message is being shown.
  • Added another functions: Move the BG to a certain coordinate; Play a certain sound and Finish the level and break the main loop.
  • When you hit a target, a bullet scorch sound will play, indicating that your aim was correct.

These screenshots look great! Really nice work!
SpoilerLove the plot!

I made a more "detailed" test scene to test a new idea: Instead of comprising all the images into a 512x240 image (that solves a lot of issues at the cost of quality), I decided to use the whole GRP5 page dividing it into: 2 images for the top, and 2 images for the bottom: Top: North and East; Bottom: South and West This gives me more space to compress the image, and therefore, more quality. Still looks grainy, but is way better than the previous method. However, i had to rearrange the BG tiles so i can have the illusion of 360ยบ turns, and modify the animation coordinates, since the result is too big. If i zoom out the BG, you will see this: What is happening is that i draw the whole GRP5 on BG layers, then i copy the bottom and place it alongside the Top picture, then i copy the BG result and paste it more futher. You never tend to do a real 360ยบ turns, because that would require to warp the BG layer in middle of an animation, and that would be bothersome. However, since this is an on-rails shooter, you will only see what i want you to see. Also, i added new statements for the DATA: Now you can load a different BG in mid-game. But this is going to change on the future, since i want to use GLOAD instead of LOAD. (I load a chuncks of BG, save them on an array, and paste them on GRP5 in mid-game). And last one, that i forgot to mention: I have a test level ready! Includes enemies (more like idle targets), dialogue and animation, just like a on-rails shooter!!!
These screenshots look great! Really nice work!
SpoilerLove the plot!
Many thanks!

Quick comment about what i was working on. Since tomorrow i'm going to be busy:
  • Thanks to @12Me21 for introducing me to dithering, the backgrounds now looks more detailed and clean!
  • Now the BG load instruction works this way:
    • Now is "C" and not "L" to call it.
    • It uses GLOAD instead of LOAD: First i declare 2 arrays, one for each BG i want to change. Then, before start the main game loop, i use LOAD to prepare the BG, and then I use GCOPY to copy the BG into the array. And last, everytime i reach the DATA instruction, what it does is to switch between arrays and load the proper BG. The main advantage is that is more faster than normal LOAD and i can use it in middle of everything. However, given memory constraints, i can only use 2 BG arrays since each array takes 2MB when loaded.
  • Bi-languaje support! You can select both Spanish and English. The M command (for dialogue display) will take two strings, one in english and one in spanish. Depending on the player settings, it will decide which string to use.
  • This one is old: When you select what hand you use for the pencil, the HUD will swap places so it can be more comfortable with what you see. Keep in mind that watching over your health and armor is more important than watching the dialogue, so, is possible that your hand can obstruct your view on the dialogue.
  • I started with the Player life, and is going to work like this: Player will have Armor and Normal Life. Each armor icon can handle two shots, up to 3 armor icons you can have. Armor can be recovered via items and such, but Normal Life isn't. If your Normal Life reaches zero, it will prompt you to "Continue?" depending on how much credits you have available. This is the theory, is not implemented yet since i need the icons! I only have the icons for the credits and Armor.

I haven't done that much to the game in terms of mechanics, but i did certain things you might found interesting!
  • Most of the main menu is ready. You can start the game, change the options, and draw things with your gun! Pew Pew, cowboy, old west. However, certain things regarding the access to the menu, like the conditions when you end up on the main menu, could change in the future in pro of a proper introduction to the game's story and mechanics, and to avoid certain breaks when a level is finished. Also, there are things that will be added to the menu for the sake of completeness, like proper icons, level select and such. NOTE: Spanish text is still untouched. This will change obviously.
  • Added more sounds, specifically for the menu when you select (break) things up.
  • Added certain variables that will come handy on the future.
  • Added a little warning at the beginning of the program: Basically tells you that the upper screen won't be used for anything, so don't expect something on it after that point. The message is on both English and Spanish.
I think i can proudly say that i'm on Alpha stage of development. And it took me 1 week!

  • Scores and Time now works. Time will record only seconds and minutes, i will not include hours. On the future, the less time you took to finish a level, the higher the score you will get. When a dialogue is being shown, the Time will display above the box.
  • Now the enemies (the placeholder ones) will attack based on this: Each enemy has a random chance to have you "on sight". When that happends, they will adopt a red coloration, indicating that they are a inmediate menace. When they have you on sight, they will have a random chance to shoot you (this is going to change to adopt sprite animation-based checks). If you kill an enemy when he has you on sight, you will get 500 points, otherwise, 250. An annoying glitch is that they can have you on sight, and then, instantly shoot you without any chance to attack back. Also, sometimes they can have you on sight for a long time until the proper conditions are met. Ugh
  • Now the main cycle has a Pause Menu. It doesn't have a proper HUD, but the main functions are there.
  • Now the health is ready! I already explain the functionality of it, but to give a summary: Player will have 3 armor icons. Each armor icons can handle up to 2 enemy shots: When the armors are gone, the hearts are revealed. Hearts are the main life you have, and all the metrics are based on it. The difference with the Armor is that Armor can be recovered, but not hearts:
  • Now there's a "Continue?" screen when you run out of hearts. It will automatically enter there when you have available Credits, otherwise, it will jump straight to the game over screen (which is not ready. It reboots to the main menu).
Here's a screenshot of the complete HUD when playing:

This looks like it's going to be a really cool game. Will you add support for both old and new systems or will you add control settings?

This looks like it's going to be a really cool game. Will you add support for both old and new systems or will you add control settings?
Thanks for showing interest! The game is being developed on an Old3DS, so don't worry about compatibility or perfomance issues. Also, already has control settings, I'm not going to add more features to the controls because it really doesn't make any sense considering that almost everything will be touch controls. The most prominent thing in that regard is to swap the HUD based on what hand you use for the touch pencil so you can keep an eye for important stuff.

Testing the DATA parser for cutscenes. Is the same as the DATA parser for gameplay, with some changes and limitations. The images are sprites loaded from a GRP4 that has 8 segments of pre-rendered scenes, so i can change them on-the-go without any lag. Text could change in the future.

These weeks I have been VERY busy with work and activities outside SB. I'm still stuck at the development of chapter 2 because 3D resources that really fits with the scene I want to make is quite hard. Also, I always remind that I have to do the character rigs for cutscenes, and that's quite a heavy work since the 3D models I have are 'fragmented' into individual objects. And everytime I think of it, I always say that my approach on the "design" of the level is heavy-handed and wouldn't actually look good. Is like having a cutscene and trying to make it playable for the sake of it. Cough... 'F' to pay respects... Cough.... Now, you may ask: If you made huge advancements on a month, why you slow it down? Because at the time I didn't have too much stuff to do, so I had more time to actually plan and test the game. I make this post just to say a few things:
  • The project is not dead, its just stuck on a development hell. And also, I have other game ideas for SB, but I won't make anything until this project is complete. So, expect that I'm going to be 'inactive' (in the sense of visiting SB) for some time as I have been these weeks.
  • I made a bit of advancements regarding the program. For example: I merged the pause menu (English and Spanish) into one GRP to save space; I made some tweaks to the gameplay section to improve loads. And other minor stuff.
To finish, here are some screenshots of the first part of Chapter 2:

Ooh is that rain I see?

After almost 6 months of inactivity, I have bad news:
  • I have been testing actor_bug's compressor (the one I used on the demo) to see the estimated number of GRPs I would need in order to achieve the 4MB size limit. I made a copy of some existent backgrounds and I made 40 GRPs more, for the remaining levels and cutscenes. Result: Out of Memory (output is bigger than 8MB). I repeated the same, but with less GRPs into account: 6MB. My last test was made with 30 GRPs, 8 for only three levels, and remaining just in case: 4.7MB. What does this mean? Given memory constraints + I don't have golden membership, means that I have to cut the total levels to just 3, with less GRPs, because cutting the program into multiple project folders simply don't work.
  • Given previous point, the plot will also be affected. Luckily, my workaround will not affect too much the plot, only the pace, but still finding a balance between duration and size limit is difficult.
Ooh is that rain I see?
Yes, is rain, on Old3DS it slows down things a bit if you broke bottles. Also, the rain loop sounds a bit weird, but I can live with that.