* WalrusIRC

You need to have 5 posts and not be part of restricted usergroups in order to use the WalrusIRC embedded shoutbox. However, you can also access our IRC channel called #CodeWalrus via EFnet.

Author Topic: CC17: Unicorn  (Read 3024 times)

0 Members and 1 Guest are viewing this topic.

Offline Unicorn

  • ??? ??? ??? ??? ???
  • Super User
  • CW Contest II - 2nd place
  • *
  • Join Date: Jan 2015
  • Location: ??? ??? ??? ??? ???
  • Posts: 2812
  • Post Rating Ratio: +5/-2
  • make :PICKACHUP: a thing!
    • Unicorn808
    • 114/11432
    • ??? ??? ??? ??? ???
  • Gender: Male
CC17: Unicorn
« on: July 10, 2016, 02:38:56 pm »
Following in the ways of the Ivoah, a crosspost.

Quote from: Unicorn
Hey 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: Unicorn
So 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 womp
Wow, 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: Unicorn
It 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: MateoConLechuga
A 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 ??? ??? ??? ??? ???



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

Online xlibman

  • Omni founder & CW co-founder
  • CodeWalrus Staff
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18522
  • Post Rating Ratio: +95/-4
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
Re: CC17: Unicorn
« Reply #1 on: July 11, 2016, 05:53:57 am »
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-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

Offline MateoConLechuga

  • Full User
  • Join Date: Jan 2015
  • Location:
  • Posts: 219
  • Post Rating Ratio: +19/-1
Re: CC17: Unicorn
« Reply #2 on: July 13, 2016, 04:55:43 am »
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

Offline Unicorn

  • ??? ??? ??? ??? ???
  • Super User
  • CW Contest II - 2nd place
  • *
  • Join Date: Jan 2015
  • Location: ??? ??? ??? ??? ???
  • Posts: 2812
  • Post Rating Ratio: +5/-2
  • make :PICKACHUP: a thing!
    • Unicorn808
    • 114/11432
    • ??? ??? ??? ??? ???
  • Gender: Male
Re: CC17: Unicorn
« Reply #3 on: July 13, 2016, 03:46:35 pm »
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 ??? ??? ??? ??? ???



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

Online xlibman

  • Omni founder & CW co-founder
  • CodeWalrus Staff
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18522
  • Post Rating Ratio: +95/-4
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
Re: CC17: Unicorn
« Reply #4 on: July 14, 2016, 01:12:09 am »
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-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

Offline MateoConLechuga

  • Full User
  • Join Date: Jan 2015
  • Location:
  • Posts: 219
  • Post Rating Ratio: +19/-1
Re: CC17: Unicorn
« Reply #5 on: July 14, 2016, 03:04:08 am »
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 :)

Offline Unicorn

  • ??? ??? ??? ??? ???
  • Super User
  • CW Contest II - 2nd place
  • *
  • Join Date: Jan 2015
  • Location: ??? ??? ??? ??? ???
  • Posts: 2812
  • Post Rating Ratio: +5/-2
  • make :PICKACHUP: a thing!
    • Unicorn808
    • 114/11432
    • ??? ??? ??? ??? ???
  • Gender: Male
Re: CC17: Unicorn
« Reply #6 on: August 04, 2016, 11:18:10 pm »
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 ??? ??? ??? ??? ???



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

Online xlibman

  • Omni founder & CW co-founder
  • CodeWalrus Staff
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18522
  • Post Rating Ratio: +95/-4
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
Re: CC17: Unicorn
« Reply #7 on: August 05, 2016, 01:09:26 am »
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-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

Offline Unicorn

  • ??? ??? ??? ??? ???
  • Super User
  • CW Contest II - 2nd place
  • *
  • Join Date: Jan 2015
  • Location: ??? ??? ??? ??? ???
  • Posts: 2812
  • Post Rating Ratio: +5/-2
  • make :PICKACHUP: a thing!
    • Unicorn808
    • 114/11432
    • ??? ??? ??? ??? ???
  • Gender: Male
Re: CC17: Unicorn
« Reply #8 on: August 05, 2016, 03:47:04 am »
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 ??? ??? ??? ??? ???



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

Online xlibman

  • Omni founder & CW co-founder
  • CodeWalrus Staff
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18522
  • Post Rating Ratio: +95/-4
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
Re: CC17: Unicorn
« Reply #9 on: August 05, 2016, 03:57:22 am »
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-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

Offline c4ooo

  • Super User
  • CW Contest II Winner
  • *
  • Join Date: Aug 2015
  • Location: 127.0.0.1
  • Posts: 968
  • Post Rating Ratio: +12/-4
  • Advanced forumer
  • Gender: Male
Re: CC17: Unicorn
« Reply #10 on: August 06, 2016, 12:10:18 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:

Offline Unicorn

  • ??? ??? ??? ??? ???
  • Super User
  • CW Contest II - 2nd place
  • *
  • Join Date: Jan 2015
  • Location: ??? ??? ??? ??? ???
  • Posts: 2812
  • Post Rating Ratio: +5/-2
  • make :PICKACHUP: a thing!
    • Unicorn808
    • 114/11432
    • ??? ??? ??? ??? ???
  • Gender: Male
Re: CC17: Unicorn
« Reply #11 on: August 06, 2016, 07:17:41 pm »
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 ??? ??? ??? ??? ???



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

Online xlibman

  • Omni founder & CW co-founder
  • CodeWalrus Staff
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18522
  • Post Rating Ratio: +95/-4
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
Re: CC17: Unicorn
« Reply #12 on: August 07, 2016, 07:11:26 am »
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-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

Offline Unicorn

  • ??? ??? ??? ??? ???
  • Super User
  • CW Contest II - 2nd place
  • *
  • Join Date: Jan 2015
  • Location: ??? ??? ??? ??? ???
  • Posts: 2812
  • Post Rating Ratio: +5/-2
  • make :PICKACHUP: a thing!
    • Unicorn808
    • 114/11432
    • ??? ??? ??? ??? ???
  • Gender: Male
Re: CC17: Unicorn
« Reply #13 on: August 07, 2016, 07:15:09 am »
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 ??? ??? ??? ??? ???



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

Offline DarkestEx

  • Super User
  • Join Date: Jan 2015
  • Location: Germany
  • Posts: 1323
  • Post Rating Ratio: +10/-2
    • @0xbmuessig
    • @muessigb
    • My homepage
  • Gender: Male
Re: CC17: Unicorn
« Reply #14 on: August 07, 2016, 09:18:16 am »
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: Hewlett-Packard 100LX, Hewlett-Packard 95LX, Original Commodore 64C, Tektronix AWG2021, IBM X60s, IBM X60t, Nintendo DS Lite, Nintendo GameBoy Color, Nintendo GameCube, Xbox 360, Palm m5


Avatar drewn for me by Tabbes.

 


You can also use the following HTML or bulletin board code to share it on your page or forum signature!


Also do not forget to check our affiliates below.
Planet Casio TI-Planet Calc.news BroniesQC BosaikNet Velocity Games