Page 1 of 2

4x4x4 Challege - June 2021 - Head-to-Head Fruit Popper

Posted: Sun Jun 06, 2021 5:53 pm
by Gered
Image

This was the set of emojis I got after the fifth or sixth try (there was one before this with an Octopus and Car which I liked, but it had some sort of zodiac sign emoji that I had no clue what to do with, so I bailed on it).

Code: Select all

******** GDR 4x4x4 Design Challenge - June 2021 *****************************

Emojis Selected: Tomato / Thumbtack / Two Users / Grapes

-------- CONCEPT ------------------------------------------------------------
"Head-to-Head Fruit Popper"

Play against a friend (or the computer), squaring-off in a garden with fruit
magically growing quickly and at random. Be the fastest to pop the most fruit
with your magical thumb-tack within the time limit! Your thumb-tack has been
magically attuned to only one of two different types of fruit, while your
opponent will be seeking out the opposite type of fruit.


-------- PRESENTATION -------------------------------------------------------
2D, top-down, single-screen arena. Kind of like Bomberman without the bombs?
Players represented by character sprites that they control directly to move
around the arena. The arena will have different (non-hazardous?) obstacles
(walls), and fruit will be randomly spawning / dropping-in / etc as the game
timer counts down.

16x16 sprites/tiles.
MS-DOS VGA Mode 13h.


-------- CONTROLS -----------------------------------------------------------

Keyboard.

Single-player:
  - Arrow keys for movement, 4 directional, N/S/E/W.
  - Spacebar to use thumb-tack.

Two-player:
  - Player 1:
    - Arrow keys / Num-pad for movement.
    - Num-pad 0 / Num-pad Enter to use thumb-tack.

  - Player 2:
    - ASDW for movement
    - Spacebar to use thumb-tack.

Nice extra: Allow use of game controller (e.g. Gravis Gamepad).


-------- GAMEPLAY -----------------------------------------------------------

Players select their preferred fruit. Cannot be the same selection, so once
one player selects a fruit, the other player is automatically assigned the
other. Tomato or Grape.

Once the match begins, the main objective is to pop the most fruit matching
the player's fruit of choice.

Popping the right fruit does not cause any penalty or other sort of effect
to the other player, it simply increments the players score and the fruit
vanishes.

Popping the wrong fruit does not cause a penalty for the player that popped
it, but the player receives no score for it.

However, popping the wrong fruit causes your magically attuned thumbtack to
trigger the fruit to explode, which does not harm you, but will "splash"
toxic fruit juice over a 3x3 (TBD) tile area which will debuff the other
player if they are within that area, causing them to move at 50% speed until
the debuff wears off (2-3 seconds? TBD). Additionally, any other fruit of the
same type within a 5x5 (TBD) tile area will magically vanish. So players may
want to strategically pop the other players fruit to deny them score and slow
them down.

Players can "prick" each other with their thumbtacks. Players cannot be killed
but they can use their thumbtacks to push the other player out of the way
slightly, possibly also throwing them off a bit in the process. Pricking
another player causes them to get pushed ahead by 1-2 tiles, but causes no
other harm.

Matches are timed. Once the match is over, the score is displayed, and the
winner is the player who popped the most fruit.


-------- EXTRAS -------------------------------------------------------------

If time allows ...

- Sound effects. Use of Qbasic "SoundLab" utility to generate sound effects?
- Gravis Gamepad support
- Network play? Use of mTCP? Almost certainly won't have time for this ...
- Random "enemies" that spawn and snatch fruit before the players can get
  them? Mutant-oversized fruit flys perhaps ... ? Or some kind of Locust
  swarm maybe?
I think that there is plenty there to roll with. I would really like to get the sound effects stuff in which I currently have listed under "extra" but we'll see how it goes.

I will be using my 486 DOS PC for this and will be restricting myself to "period-appropriate" tooling because it is fun to do so. My battlestation is ready.

Image
  • 80486 DX2 @ 66MHz, 16MB RAM, S3 VLB Graphics, SB16 (and also a GUS card, and Roland SC, but will almost certainly not utilize either of those .. maybe next time)
  • MS-DOS 6.22
  • Borland Turbo Pascal v7.0
  • Deluxe Paint II Enhanced v2.3
Yes, I will be doing ALL development work directly on this machine. I won't be doing any cross-compilation stuff from a modern PC. This is possibly masochistic, but it is also fun, so there. I will try to code this so it should be playable on a 386 as well, but no promises. I might get lazy and slip up. 32-bit assembly opcodes will be present in places (in my GDlib stuff), so 286 support will not happen.

I will however be periodically testing builds on a modern PC against DOSBox, since this is obviously what the majority of people would need to use to play (except if they are weirdos like me who keep retro computer stuff around at home). DOSBox compatibility is a must-have of course.

While I do not consider myself an artist, I will be challenging myself to draw all the artwork I need myself. So no free assets from OpenGameArt or wherever else. I did used to draw a bunch way back in elementary school, so I guess I do have some artistic ability, but it has not been exercised in decades. So I am expecting "programmer art" will result here. I'll be using Deluxe Paint II for all my artwork.

I am going to declare up front that I will be utilizing my own "GDlib" library that I've been very slowly developing over the past two-ish years here and there. It is not complete yet at all (totally missing sound support, still missing gamepad support, some more graphics stuff I wanted to get done, no EMS/XMS support yet ...) but the majority of the basics that I will need are present. And lets be honest ... what better way to learn what your library is missing than to try it out yourself by building something with it? :)

GDlib sources available here (because I am apparently too lazy to put it on Github or something).

I know it's not really required, but because it's fun (to me), as I make progress during the month and post updates here, each time I will be sharing a complete copy of all my working files (code, assets, etc) here. This is what my source tree is comprised of currently.

Re: 4x4x4 Challege - June 2021 - Head-to-Head Fruit Popper

Posted: Mon Jun 14, 2021 8:52 pm
by Gered
Alright! My update for the past week! Finally!

I've been working on pixeling. Probably the thing that I've been most worried about with this challenge has been artwork. Specifically because I willingly decided to make things harder by forcing myself to draw everything I need myself and also because the last time I tried to do pixel art around 2000/2001-ish ... well ... let's just say that I was pretty embarrassed with the result. :lol:

So, I decided to start with pencil and paper to get a general idea of exactly what I wanted to turn into pixels.

Image
(click for full size)

It may seem silly to some, but even forcing myself to sit down to draw this was actually intimidating to me. :D But I think it turned out better than I expected! And it gave me much needed guidance on what I wanted to draw digitally ...

For the next several days, I spent a bunch of time in Deluxe Paint II. I decided to just stick with the default Deluxe Paint palette. I didn't think it wise to overwhelm myself with trying to choose colours, 'nor do I think I'm experienced enough for that anyway right now. The default palette has a bunch of useful colours anyway so I don't think it's that bad of a palette for me to use here. The one thing I did have to adjust with the palette was adding a more "Tomato"-like red. I don't think I've nailed it quite yet but it's close ... will try tweaking it more later.

Image
(click for 3x zoom)

Most of the grass tiles are based on my reading someone's tutorial that I randomly google'd up. The fences are based on my rough recollection of how fence tiles looked in Zelda: A Link to the Past (it was for some reason the first thing that popped into my head when I thought "fence tiles"). The tree was also drawn from scratch after I glanced at a screenshot of Dragon Quest I & II (SNES) for a minute or so to get inspiration ... I guess it's maybe a little too close, but it will suffice.

All of the object and character sprites however were (for better or worse) from "scratch" without any inspiration/reference (other than googling real-life photos of tomato's and grapes to get me started, heh).

Anyway, sorry! I am spending a bunch of time in this post blabbing about pixeling mainly because I am using this challenge project as a sort of excuse to get myself more comfortable with doing my own pixel art. :)

But yeah!

This tile/sprite sheet I think should definitely be more than enough to get started with coding stuff now. It's not perfect or anything, and I do fully expect tweaking (probably the first one will be joining the separate orientation sprites for the thumb-tacks with the related character sprite attack poses so I can layer them together exactly how I want). Also I still need to do UI graphics. And I'm sure some of the animations will need tweaking. Finally, I noticed a bit late that some of the dirt/grass tile stuff doesn't tile perfectly well with a few specific combinations. Oopsie. But it will be fine for now.

Onwards to the codes!

(Here is a link to a copy of my project's current working files/directory)

Re: 4x4x4 Challege - June 2021 - Head-to-Head Fruit Popper

Posted: Thu Jun 17, 2021 1:09 am
by PoV
Gered wrote: Sun Jun 06, 2021 5:53 pm I will be using my 486 DOS PC for this and will be restricting myself to "period-appropriate" tooling because it is fun to do so. My battlestation is ready.

Image
  • 80486 DX2 @ 66MHz, 16MB RAM, S3 VLB Graphics, SB16 (and also a GUS card, and Roland SC, but will almost certainly not utilize either of those .. maybe next time)
  • MS-DOS 6.22
  • Borland Turbo Pascal v7.0
  • Deluxe Paint II Enhanced v2.3
Nice setup. Case on the right is the spitting image of my 486. I dig the Sound Canvas too. :D

Re: 4x4x4 Challege - June 2021 - Head-to-Head Fruit Popper

Posted: Thu Jun 17, 2021 2:39 pm
by Gered
Hah! Yeah, it's funny. Lotsa people have nostalgia for this particular case it seems. Myself included. My families old 386 PC in the early 90's was in a case like this one too, so when I set out to build this 486 PC here about 3-4 years ago, grabbing one of these cases was a must do for me.

Re: 4x4x4 Challege - June 2021 - Head-to-Head Fruit Popper

Posted: Fri Jun 18, 2021 1:55 am
by Gered
Alrighty, some seemingly basic progress. I got the basic tile engine up and running and can move the main player (what will be the first player, or the "Tomato popper" player) around my single basic test level.

Starting to code a new game project is always weird for me. In theory it should be the most exciting part of a game project I guess? For me it's a tiny bit of a slog. That may sound reeeaaally weird to some, but the reason I always feel a bit like that is that at the very start, I have nothing set up. I have to "figure out" how I want to architect everything, and piece a lot of the fundamental building blocks together. And I start second guessing myself in weird ways, and get into some weird indecisive mode where I sit at my computer, staring at the screen thinking and not really accomplishing anything and probably just in general overthinking everything! :lol:

Once I get past the very beginning and have even the most basic engine working, for me, things start getting very exciting. I then have a basic framework of sorts with which to start fitting more pieces in and it just feels like progress flows a lot more smoothly from there on out. For a while at least, heh. ;)

And so I am happy to report that I have the very initial engine up and working. Still lots to do of course... the "engine" as it is now is incredibly basic ... but I am happy that I am now past my own personal first coding milestone for this project.

Image



And before I forget, here are the latest contents of my project's source tree.

Re: 4x4x4 Challege - June 2021 - Head-to-Head Fruit Popper

Posted: Fri Jun 18, 2021 4:27 pm
by Sirocco
CRT flicker! Greater than 60Hz refresh rate! Curved screen!

There are certainly days when I miss (most of) these things. That's good progress, so far, especially for the low-spec environment you're working with.

Re: 4x4x4 Challege - June 2021 - Head-to-Head Fruit Popper

Posted: Fri Jun 18, 2021 5:28 pm
by Gered
Sirocco wrote: Fri Jun 18, 2021 4:27 pm CRT flicker! Greater than 60Hz refresh rate! Curved screen!
:lol:

You know ... I'm almost to the point where I'm fully convinced that photographing / video-recording a CRT without flicker, etc is a quirky, black-magic, art form. Of course the first step to mastering this (for VGA mode 13h anyway) is undoubtedly to not use your phone that only supports "locking-on" at 50hz or 60hz. ;)

Re: 4x4x4 Challege - June 2021 - Head-to-Head Fruit Popper

Posted: Mon Jun 21, 2021 2:48 am
by Gered
Just a very quick silly update. Because I wanted to share something silly.



In reality, I do not plan on ever having that many fruit visible on screen at once, but I was just toying around with things here this evening and thought it would look silly to have a bunch of fruit "grow" in like this. :D

Tomorrow - fruit popping will be added!

Re: 4x4x4 Challege - June 2021 - Head-to-Head Fruit Popper

Posted: Wed Jun 23, 2021 8:11 pm
by Gered
Tomorrow - fruit popping will be added!
:lol: I should know better than to write things such as this.

Anyway, after some procrastination, fruit popping is now in!



This is now aaaallllmost at the basic game loop that I guess I was aiming for. And it does feel overly simple to me. But that is good ... I guess ... ? I mean, in my mind, my original idea was just some quick arcade-style action type of game. And obviously there are still details to be implemented yet, so I am almost certainly judging my own creation too soon anyway.

As I've been working on this, some details about the game-play I want implemented here have tweaked from what I wrote previously and/or "finalized" in my head:
  • Players each have their own preferred / attuned fruit (indicated by their character and thumb-tack's colour). That is nothing new.
  • When a player pops a fruit matching their preferred fruit type, they get +1 score for it. Nothing new there either.
  • When a player pops a fruit that is NOT of their preferred fruit type, they get splashed by the fruit juice and it affects them negatively. I'm thinking right now, this debuff will just make them move slowly for some period of time. Probably 5 seconds or so. So, why would a player want to pop fruit of the other type ... ? They'll always want to avoid it right?
  • Fruit will obstruct the player's movement. So player's may want/need to pop some unwanted fruit to get to large clusters of their preferred fruit.
  • If a player pops their preferred fruit type nearby their opponent, then the other player could (if they are close enough) get splashed by the fruit juice and get slowed down by the same debuff mentioned above. So, it could be a good idea for players to try to aggressively pop their fruit nearby their opponent ... but could also backfire on them.
  • Fruit spawns in as a little plant randomly, and only on dirt tiles. Some maps (like my current test map) is almost all dirt tiles. But some others, will feature much less. After a random-ish period of time, the plant will grow into either a tomato or grape.
  • I am thinking that different maps will probably also feature an internal cap on the maximum number of fruit entities allowed to be present.
  • There is a low chance for a "super" fruit type to grow from a plant. I am thinking right now I will indicate this "super" variant of fruit by just a simple colour swap to gold/yellow. When a super fruit is popped, all other fruit on screen matching that same fruit type will also pop and the player will be awarded the appropriate score for all the popped fruit. This also could be a nice way to get a debuff on the other player from a distance if timed right of course ...
  • Players can "prick" each other with their thumb-tack. I am thinking that this will just push the other player backwards a bit. So just kind of a silly thing without much benefit at all. Perhaps it should have some other debuff associated with it, but I don't want players to focus on poking each other with their thumb tacks too much ...
  • Not sure on this one yet, but also am thinking that hitting a plant with your thumb tack will destroy the plant and no fruit will spawn from it. It's kind of "weird" in that I think it would be quite difficult to cut down a plant of any sort with a thumb tack. ;) But I like the idea that a player should not just mindlessly spam stab with their thumb tack everywhere.
Now, I still am thinking a bunch about the possible need for some sort of "hazard" that each player will need to watch out for (other than each other). The main idea circling around my head here is that some sort of mutant/oversized fruit fly will occasionally fly in from off-screen and snatch up fruit until someone pokes it with their thumb tack. I am not sure I can draw a fruit fly, but maybe it would be fun to try. :?

Anyway, that's all for now!

And finally, the current contents of my project's source tree.

Re: 4x4x4 Challege - June 2021 - Head-to-Head Fruit Popper

Posted: Wed Jun 23, 2021 9:59 pm
by Sirocco
This is now aaaallllmost at the basic game loop that I guess I was aiming for. And it does feel overly simple to me. But that is good ... I guess ..
The idea being to make ourselves explore strange, new game ideas, and have fun while doing it. So I'd say "mission accomplished." The overall level of challenge is up to each entrant. And if you finish with plenty of time left, you can always polish the entry, or take it further than just a mini-game.

I've been slacking, so if I finish my entry it'll be by the skin of my teeth :]