Join us on Discord!
You can help CodeWalrus stay online by donating here.

CC17: Unicorn

Started by Unicorn, July 10, 2016, 02:38:56 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Unicorn

Following in the ways of the Ivoah, a crosspost.

Quote from: UnicornHey everyone! I've decided to enter this contest with an idea of my own :)

I just came up with a better idea for a game, without complex storylines and complicated mechanics. Without further ado, let me present Switch Operator!
---------------------------
Switch Operator
---------------------------
You take the place of a switch operator at a railroad tunnel. There are four lines, and each one has a gate for the trains to go through. Your job is to control the gates, as there are no sensors installed on the inside of this tunnel, so the gates only open automatically for incoming trains. You have to make sure that the trains don't run into a gate or some other obstacle. Only one gate can be open at a time, so you are constantly opening and closing them. Sometimes a gate will get stuck and you will have to make the train switch to an above or below track, and open the gate there. As the game progresses, the railroad upgrades their gate system so that multiple can be open at once, but they close automatically.
---------------------------
You will need to be fast with your fingers, as the gates are controlled by the numbers
  • , [1], [4], [7] (the western gates) and [(-)], [3], [5], [9] (the eastern gates). The switches are controlled by simultaneously pressing [.], [2], [5], or [8] for the corresponding track, and pressing the arrow key in the direction you want to switch it towards, North or South (or up and down)

    So I'm not sure how this question thing will work, but I can ask any manner of questions having to do with the C libraries and I will not be penalized?
Quote from: UnicornSo I've made progress! I have most of my sprites created and sorta working, so far.
EDIT: Turns out I misunderstood palettes a little :P

Anyways, heres a screenshot of the title screen. I need to fix up my erasing, but other than that, things are working out pretty good.

Quote from: Unicorn
Quote from: mr womp wompWow, very nice sprites and smooth moving, of course, you are going to want to get the cross sections of the track to be redrawn and maybe remove the white outline around  the train sprites, but it's looking good!
Thanks! I already have removed the white outlines, and the redrawing but is a little harder to fix, because the sprite is 7 pixels wide, and the train moves 1 at a time. I could make the train move 7, but I would have to slow it down, and slowing it down may make it look less smooth.
Quote from: UnicornIt is one train sprite, but I start drawing it at about X -190 so it looks as if it appears from the side of the screen. I do not use the clipping routine.

Anyways, I've made progress!

I've added highscores and actual loosing, as you can see in the screenshot. The pace of the game also increases as you progress.

Quote from: Unicorn
Quote from: MateoConLechugaA better option would be to double buffer and simply redraw the whole screen each time, and then swap buffers. This would be a lot easier than what you are trying to do currently :)
I'm not entirely sure how effective that is, it seems to be slow, so I'm sticking with my original method for now.

Besides that, though, I was wondering if anyone could make a short 2-4 page animation of this train switch to tracks above and below it?



The red line would be the path of the train.

  • Calculators owned: I own all of them: PICKACHUP TI 84+ CSE TI 83+ SE TI something something ??? ??? ??? ??? ???
  • Consoles, mobile devices and vintage computers owned: PICKACHUP ??? ??? ??? ??? ???



??? ??? ??? ??? ???

Dream of Omnimaga

I like the sprites you use and this looks smooth. I'm glad you managed to get the clipping fixed so that the train won't appear instantly from the left.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

MateoConLechuga

You say you don't use the clipping routine, but I'm about 99.99% certain you do :) Anywho, keep up the great work :D

Unicorn

I don't use the No_Clip routines....
  • Calculators owned: I own all of them: PICKACHUP TI 84+ CSE TI 83+ SE TI something something ??? ??? ??? ??? ???
  • Consoles, mobile devices and vintage computers owned: PICKACHUP ??? ??? ??? ??? ???



??? ??? ??? ??? ???

Dream of Omnimaga

How do you do the clipping then? Do you just use 8 bits mode and start drawing from outside the screen that way? Because I bet in 16 bits mode that could cause issues.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

MateoConLechuga

Unicorn: By default, if it isnt specified to be _NoClip, it is clipped. This is to make it even easier for people who are just starting out. :) Anywho, keep up the great work :)

Unicorn

Yeah, I got confused :P


So its been a while since an update, abut here I am!

I'm got multiple trains moving at the same time! They start at a score of ten, but for screenshot purposes they started at a score of 1.

(the program isn't that fast on calc, I slowed it down. ;))



So next I'm going to implement something of a story mode, with some images. Is there any way to have those without making huge sprites? Is there something like the xLIBC background command? There will also be a currency so you can "buy" added perks and help.
Also, if you let a train crash you have to pay for lost cargo, but you can bribe workers to say that it wasn't you to blame, causing pay for damages. (or you may be able to keep going, not sure yet)

What do you think?
  • Calculators owned: I own all of them: PICKACHUP TI 84+ CSE TI 83+ SE TI something something ??? ??? ??? ??? ???
  • Consoles, mobile devices and vintage computers owned: PICKACHUP ??? ??? ??? ??? ???



??? ??? ??? ??? ???

Dream of Omnimaga

Hm  a story mode would be interesting if you can find a way to make the images small. Maybe switch to 4 bits mode when in story mode and display the images scaled up to 200?

Also this screenshot looks very nice :)
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

Unicorn

Maybe... I could also just have a huge program that takes up half the archive
  • Calculators owned: I own all of them: PICKACHUP TI 84+ CSE TI 83+ SE TI something something ??? ??? ??? ??? ???
  • Consoles, mobile devices and vintage computers owned: PICKACHUP ??? ??? ??? ??? ???



??? ??? ??? ??? ???

Dream of Omnimaga

Erm, isn't the limit per file 64 KB? You will have to split the images into multiple appvars. If 95% of your game file size is just images for a cinematic then there should probably be an option to play without the big images, though, so people can play without installing the big files on their calc.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

c4ooo

Quote from: Unicorn on August 04, 2016, 11:18:10 PM
So next I'm going to implement something of a story mode, with some images. Is there any way to have those without making huge sprites?
There is a text drawing command in the C libraries.
Also in this gif, since the grass and rails are just the same thing over and over, you don't have to store the whole image. If you aren't already, just use two for() loops to render all the grass and then two more for() loops to render the rails. :) I am talking about this:

Unicorn

So the libraries do have a compression routine, I will use that, and I already am using loops to draw the grass and rails ;)

I'm trying to figure out how to use the buffers, so the raiils will actually end up looking much nicer.
  • Calculators owned: I own all of them: PICKACHUP TI 84+ CSE TI 83+ SE TI something something ??? ??? ??? ??? ???
  • Consoles, mobile devices and vintage computers owned: PICKACHUP ??? ??? ??? ??? ???



??? ??? ??? ??? ???

Dream of Omnimaga

Yeah you definitively don,t want to use one massive image to draw the entire screen. That is not size-efficient if you're doing that. If you use 8 bpp, the grass and rails should not be more than 32 bytes of sprite data, from what I see on your screenshot. Even the train, where the left end is repeated twice, can be made so that the repeated part re-uses sprites from the other half.

That said, I think what Unicorn was talking about was the cutscene/cinematic images for story mode. For example, if you want to draw a 128x60 picture that looks like an anime, then it sucks if you have to convert it into 8x8 sprite chunks, a tilemap then display each sprite one by one or via a tilemap. Being able to display the entire picture in one single command is much less tedious.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

Unicorn

So it turns out that there is a compression routine, so I'll be using that, and only having a few pictures, the rest being drawn using rectangles and circles and lines.

The whole program takes up like 12 kb so far.
  • Calculators owned: I own all of them: PICKACHUP TI 84+ CSE TI 83+ SE TI something something ??? ??? ??? ??? ???
  • Consoles, mobile devices and vintage computers owned: PICKACHUP ??? ??? ??? ??? ???



??? ??? ??? ??? ???

DarkestEx

Your game looks really nice :)
Keep it up!
  • Calculators owned: TI-84+, Casio 101-S, RPN-Calc, Hewlett-Packard 100LX, Hewlett-Packard 95LX
  • Consoles, mobile devices and vintage computers owned: Original Commodore 64C, C64 DTV, Nintendo GameBoy Color, Nintendo GameCube, Xbox 360, PlayStation 2

Powered by EzPortal