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 2018] Wah Munchers by JoppyFurr

Reply to topic

Rate this entry!

1 (Poor) 0% 0%
2 0% 0%
3 0% 0%
4 15% 15%
5 23% 23%
6 30% 30%
7 23% 23%
8 7% 7%
9 (Excellent) 0% 0%
This poll has expired.
Author Message
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 12358
  • Location: London
Reply with quote
[Coding competition 2018] Wah Munchers by JoppyFurr
Post Posted: Tue Mar 27, 2018 1:38 pm
Quote
You arrive at your red-panda farm, only to find that a pack of snow
leopards have broken into your paddock and are going after your flock.

You must build fences to protect your livestock before they get gobbled up:

-> 10 points for the first wah in a fenced-off area

-> 20 points for additional wah, as a breeding-bonus

To build a fence simply press button number one while attempting to move
into a paddock.

Once you've separated the species, you'll move on to the next field,
with even more leopards. You'll need to save at least one red panda per
round to progress.


Some technical details:

-> This game generates a bitmap using a two-bit palette. The tiles are
repeated for the top and bottom halves of the screen, one half using the
background palette, and the other half using the sprite palette. This
allows arbitrary pixels to be drawn to, at the cost of limiting the
number of on-screen colours.

-> Three of the possible four colours are selected for the bitmap, which
leaves seven spaces in the sprite-palette for unique colours in sprites.

-> The game is developed in C with devkitSMS and sdcc (such a buggy
compiler!)


Known bugs and incomplete features:

-> Animals hitting an incomplete fence should cause some kind of
penalty, but this is not yet implemented.

-> Connecting your incomplete fence to itself should cause some kind of
penalty, but this is not yet implemented. This can currently trigger
buggy area-filling behaviour.

-> When shading a solved area, sometimes a line may be missed

-> As more animals and fences are added to the screen, things can slow
down quite a bit

-> When an area is filled, the fill will cover up part of the fence at
the bottom

-> No sound yet


http://www.smspower.org/Homebrew/WahMunchers-SMS

  View user's profile Send private message Visit poster's website
  • Joined: 25 Feb 2006
  • Posts: 496
  • Location: Belo Horizonte, MG, Brazil
Reply with quote
Post Posted: Tue Mar 27, 2018 10:36 pm
Well, what can I say besides the fact that this game 'Qix' ass? XD
  View user's profile Send private message Visit poster's website
  • Joined: 28 Jan 2017
  • Posts: 356
  • Location: Málaga, Spain
Reply with quote
Post Posted: Wed Mar 28, 2018 1:06 pm
Is this Game made in Standard 256x192 Mode? It looks as if where made in some higher resolución!

Is interesting the algorithm of the Game. What is the percentaje in which both sides of the line get filled?

Although the farm theme is original' i suggest put some seminude farmers and Will be perfect! :)
  View user's profile Send private message
  • Joined: 01 Feb 2014
  • Posts: 388
Reply with quote
Post Posted: Wed Mar 28, 2018 3:58 pm
A delightfully charming take on the Qix formula.
  View user's profile Send private message
  • Joined: 11 Mar 2018
  • Posts: 8
  • Location: New Zealand
Reply with quote
Post Posted: Wed Mar 28, 2018 8:55 pm
eruiz00 wrote
Is this Game made in Standard 256x192 Mode? It looks as if where made in some higher resolución!

Is interesting the algorithm of the Game. What is the percentaje in which both sides of the line get filled?

Although the farm theme is original' i suggest put some seminude farmers and Will be perfect! :)


Yep, the game still uses the standard 256x192 resolution. By limiting the colours, individual pixel can be set instead of working with 8x8 tiles.

The algorithm for if to fill a side of a new fence is: If there are a mixture of snow leopards and red pandas, do not fill. If there is only one type of animal, then fill. (there is a bug where for filling, dead red pandas are still counted as red pandas).

We have a four-day weekend starting tonight here in NZ, so hopefully I'll fix up some of the bugs and have a new ROM to upload at some point :3
  View user's profile Send private message Visit poster's website
  • Joined: 23 Mar 2013
  • Posts: 559
  • Location: Copenhagen, Denmark
Reply with quote
Post Posted: Fri Mar 30, 2018 5:56 am
The non-tile, individual pixel approach really gives this game a unique, non-console feel. It is almost a meditative experience sitting here in silence and saving those red pandas. I like it!
  View user's profile Send private message Visit poster's website
Eruiz000
  • Guest
Reply with quote
Post Posted: Fri Mar 30, 2018 6:20 am
And how Many colors you have for sprites? And for tiles?

The reason is i would like to put the boxes art into the ROMs (like a spectrum game loading screen, by example).

Would someone send me info or Code about this subject?
 
  • Joined: 11 Mar 2018
  • Posts: 8
  • Location: New Zealand
Reply with quote
Post Posted: Fri Mar 30, 2018 10:29 am
Eruiz000 wrote
And how Many colors you have for sprites? And for tiles?

The reason is i would like to put the boxes art into the ROMs (like a spectrum game loading screen, by example).

Would someone send me info or Code about this subject?


If you want to have a play around with it, the code is on the download page. I'll probably also stick it up on GitHub at some point.

With three colours for the pixel background, there are seven additional colours available for sprites.
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 12358
  • Location: London
Reply with quote
Post Posted: Fri Mar 30, 2018 1:48 pm
R2 posted.
  View user's profile Send private message Visit poster's website
  • Joined: 12 Oct 2015
  • Posts: 64
  • Location: Ireland
Reply with quote
Reminds me of Qix
Post Posted: Fri Mar 30, 2018 2:45 pm
This game totally reminds me of the classic video game Qix which we played for hours in the arcade [and totally spent too much money on!] High addictive for its time.

Just one question: are the enemies meant to stop when the closed section is being painted? I think it would good to be able to press Fire if you want skip watching large sections being painted - just a thought...
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 12358
  • Location: London
Reply with quote
Post Posted: Sun Apr 01, 2018 10:04 am
R2 seems more glitchy regarding drawing over fences compared to R1, and it's easy to end up with a red panda in a paddock which doesn't fill in until I subdivide it a few times.

If I just let all the snow leopards kill the red pandas, what is the consequence? In later levels, deaths are unavoidable.
  View user's profile Send private message Visit poster's website
  • Joined: 11 Mar 2018
  • Posts: 8
  • Location: New Zealand
Reply with quote
Post Posted: Sun Apr 01, 2018 10:44 am
Maxim wrote
R2 seems more glitchy regarding drawing over fences compared to R1, and it's easy to end up with a red panda in a paddock which doesn't fill in until I subdivide it a few times.

If I just let all the snow leopards kill the red pandas, what is the consequence? In later levels, deaths are unavoidable.


The only requirement to make it to the next field is to save at least one red panda. The consequence for letting them be killed is that you will not receive points for them.

And yes, I have run into a number of glitches myself. I'm quite busy over the next few days, so I'm unsure how much free time I'll have to resolve them.
  View user's profile Send private message Visit poster's website
  • Joined: 05 Sep 2013
  • Posts: 2215
Reply with quote
Post Posted: Wed Apr 04, 2018 10:00 am
This is a very interesting entry - I'm studying your sources.

First, I found your idea of using only 3 out of 4 colors in a 2bpp bitmap and save colors for sprites just *brilliant*. :)
Said that, I was wondering if the idea of a 'Qix' inspired game came from that discussion about 2bpp bitmap mode or if by chance you happened to have the idea by your own (just curiosity - I won't judge your work differently because of that of course!)

Some suggestions about the approach - if you define colors as
empty 0b00
taken 0b01
fence 0b11

then you may paint fence over empty and taken, and taken over empty without having to clear underlying bits, thus saving some ANDing. Also, taken won't paint over fence, solving one of your problems too.

this:
    /* Bytes select the colour */
    pattern[0] = (pattern[0] & ~pixel_mask) | ((value & 0x01) ? pixel_mask : 0x00);
    pattern[1] = (pattern[1] & ~pixel_mask) | ((value & 0x02) ? pixel_mask : 0x00);


into something like this (not tested)

    /* Bytes select the colour */
    if (value & 0x01)
       pattern[0] |= pixel_mask;
    if (value & 0x02)
       pattern[1] |= pixel_mask;


read_halfline() can be faster too, even keeping it in C, just replacing the for loop with a simple

*pattern++ = VDPDataPort;
*pattern = VDPDataPort;


similarly the same applies to write_halfline().

Last, one small note. On a real *hardware* SMS, the first column on the left it's often not visibile on a TV. Games shouldn't place anything important there, and in this game if the left column is not shown, you won't be able to play starting on that side of the fence. I suggest you limit your playfield 8 pixels to the right.

I'm very curious to see how the games evolves. Let me know if you need any help / any more details. Great work so far.
  View user's profile Send private message Visit poster's website
  • Joined: 11 Mar 2018
  • Posts: 8
  • Location: New Zealand
Reply with quote
Post Posted: Wed Apr 04, 2018 11:58 am
Thanks for the tips Sverx, I'll give them a go and see how I get on :3

And yes, this was inspired by Qix (actually, an ad-filled Qix clone named “Fence Out” that I played back in the early 2000's). The main difference with Wah Munchers being that rather than the goal being to fill a certain percentage of the screen, the goal is to separate the two species.
  View user's profile Send private message Visit poster's website
  • Joined: 11 Mar 2018
  • Posts: 8
  • Location: New Zealand
Reply with quote
Post Posted: Wed Apr 04, 2018 1:59 pm
I've just sent in a new build, R3, which includes the change suggested by sverx to fix drawing over the fences.

I've also turned back on some non-functional code that seems to avoid a compiler bug where the number of animals counted were incorrect (the likely cause of areas not being shaded in when they should be).

Will hopefully be up soon :3
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 12358
  • Location: London
Reply with quote
Post Posted: Wed Apr 04, 2018 2:01 pm
Feel free to post it in this thread, the competition elves are not always active.
  View user's profile Send private message Visit poster's website
  • Joined: 11 Mar 2018
  • Posts: 8
  • Location: New Zealand
Reply with quote
Post Posted: Wed Apr 04, 2018 9:00 pm
I've attached R3 to this post
wah_munchers_R3.sms.zip (7.05 KB)
Inside a zip because this site doesn't allow .sms attachments?

  View user's profile Send private message Visit poster's website
  • Joined: 05 Sep 2013
  • Posts: 2215
Reply with quote
Post Posted: Fri Apr 06, 2018 8:45 am
much better! still, I can't see the leftmost part of the screen, I really suggest you deactivate the leftmost column and start from next one. :)
  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!