[DEVLOG]Pandemic

Just interesting to follow even if I don’t understand everything :wink: just glad that you do a blog

1 Like

I like your devlog. Once again your game will be a hit for my kids.

3 Likes

#DEVLOG 10

Concept art:

6 Likes

#DEVLOG 11

Added a guide or compass so that if you do not find the city, you will have an arrow pointing towards the city during the last 10 seconds.
image

You can now test the preview(!) of the game here: Pandemic.bin (178.3 KB)

I would appreciate any feedback you might have :slight_smile:

6 Likes

First feedback based purely on the screenshot you used here, yellow text on a light background like that is not the best idea.:wink:

2 Likes

Controlls feel great and it looks really good! Just some notes.

  • the steam behind the propeller sometimes seems sideways when I’m heading north.

  • I really liked the arrow pointing at the last second. It definitely helped for the cities I want familiar with!

2 Likes

I’ll say it again, its a lot like ‘Where in the world is Carmen Santiago’ in that you need to know where the capitals are. Its a great idea!

Little things:

  • Would love to be able to fly diagonally.
  • Would love to be able to fly around the world (across the Pacific). an you make it so that if you fly off one edge you reappear on the other?
  • When you are flying (say) left / right and then press the up / down while still holding the original key, the movement stops.
  • I seemed to get Buenos Aires followed by Nairobi each time although I was playing it in PokittoEMU. Have you seeded the random number generator?
2 Likes

Thanks! I have also “bonus courses” in mind, like

  • “Legend hunt” (e.g. Atlantis, Shangri-La, Santa Claus’ residence, Lemminkäisen temppeli, Pokitto HQ :wink: )
  • “Attraction hunt” (e.g. Giza pyramids, Grand Canyon, Stonehenge, Colosseum)

Might implement, though not sure

That sounds useful

Need to fix it

Fixed already.

2 Likes

Need to fix

:slight_smile:

2 Likes

I agree with this as a feature, but I want to point out something quite amusing that might not be apparent to everyone.

Doing map-wrapping on a 2D plane is of course a very old, very well known technique in video games,
but it has one unfortunate consequence that tends to get overlooked…

Essentially, you’re asking for @Hanski to turn the world into a torus:
7QVgJWi

(.gif borrowed from Imgur. The game is Chrono Trigger.)

It certainly makes the oddities of Mercator vs Miller projection seem a bit less crazy.

4 Likes

Also, this has the tendency to connect the north pole to the south pole :stuck_out_tongue:

1 Like

Good point. In that case the world would have to just be a cylinder.
(The world is a soup can label. :P)

Though that has the issue that if you fly down at the bottom of the left half of the map you ought to start flying up from the right side…

I can think of a few ways to achieve it, but they’re all probably probably more effort than it’s worth just to dodge a bit of crazy geometry.

So many things you’d expect to be easy end up being ridiculously complicated when you start pulling them apart.

Maybe a flat earth isn’t so bad after all? :P

Flat earth does simply things! But you’re still having some code running for the border in any case

I think you’re talking about something like this right? I’m not sure if it’s a cylinder, topologically speaking - I prefer to call it a “fully explorable sheet of paper” :stuck_out_tongue:
But it is my favorite “flat” way of representing a planet with a tilemap.

Another easy solution would be to say “Poles are too cold, your automotive device won’t survive for long there”.

The cylinder would be if you had left and right wrapping round and the top and bottom impassable.

109155-004-B9DE1090

As you point out the ‘poles too cold’ trick,
though I think an impassable blizzard would also be plausible.

I’m not even sure what shape that would end up being.
Also you’d either have to invert the controls or invert the map or something like that.

Essentially without using polar coordinates and actually doing pseudo-3D rendering the geometry is ridiculously difficult to get right.

The only other way I can think to do it is with 2 flat discs representing hemispheres.


I think @Hanski must be feeling a bit overwhelmed with all this offshoot map chaos. :P

All I can say I like donuts much more to eat than to code :stuck_out_tongue_winking_eye:

7 Likes

#DEVLOG12
I am “pixelising” the title image. Trying to keep the ROM footprint small and making it as 1-bit tilemap image (like the world map). I am making it on iPad (not the pro-version, hence no pen) with Sprite Something app. Making dithering is very slow!
IMG_2019

6 Likes

I think I won’t tune it more at this time. There is a lot to do in the coding side :wink:
image

8 Likes

Another mini-update: The startup screen animation:
pandemic-titleanim

(Sorry about the quality of the Gif :wink: The gif saving feature in the Emulator made some tearing)

6 Likes

#DEVLOG_13

The deadline is approaching, so I need to stop drawing and do the boring stuff that has been neglected before. I now have added saving the highscore to EEPROM. In Micropython it is easy. Just save or load a bytearray. When the program starts, I read the highscore like this

# Initialize the cookie.
# The cookie data should hold the version (1 byte) and the high score (3 bytes)
myCookieData = bytearray(1 + 3) 
myCookie = umachine.Cookie("PANDEMIC", myCookieData)

# Load the cookie from EEPROM
myCookie.load()
version = myCookieData[0]
highScore = (myCookieData[1]<<16) + (myCookieData[2]<<8) + myCookieData[3] 

If the cookie does not exist in EEPROM already it is automatically created. The maximum lenght of the name is 8 characters. As the cookie data is just an array of bytes, the simpliest way to generate e.g. a 3-byte (i.e 24 bits) value is to use shifted bytes.

I like to add the version info also to the cookie data. It is handy when you e.g. change the score calculation and want to reset the old highscores. Just add the version value by one and set to zero any highscore that has an old version. Otherwise you should create a new cookie with a different name for each cookie version, which consumes EEPROM.

Saving is done as follows.

# Save the cookie to EEPROM
myCookieData[0] = 1 # version
myCookieData[1] = (highScore >> 16) & 0xff
myCookieData[2] = (highScore >> 8) & 0xff
myCookieData[3] = highScore & 0xff
myCookie.save()

Note that you can browse and manage cookies in Pokitto with the excellent Xploritto tool by @bl_ackrain [Tool]Xploritto (WIP) But no cheating, please! :wink:

5 Likes

#DEVLOG_14

Time to take TAS UI into use! That has been designed and made for C++ by @carbonacat, for which I made a Python wrapper. That is a really easy way to build UI for your Python TAS game. It looks like this:
image

Most of the elements are just one or two commands away. TASUI has an own “layer” (actually a tilemap) which is drawn on the top of all. So any sprites and other tilemaps will appear behind it. One of the good features is that in text drawing, each character do not consume a sprite(!) as in the normal TAS layer.

TAS UI uses the first 4 colors (actuall 3 as the first is the transparent color) of the palette. You can use the API like this:

# Draw the gauge.
TAS.drawGauge(1, 13, 5, 25, 100)

image

The syntax is like this:
drawGauge(firstCol, lastCol, row, currentValue, maxValue)

Very simple indeed!

Few things you should take a note before using TAS UI.
As said before, it uses its own layer. It means that for static items you do not need to draw them on each frame, one time is enough! And also that you should clear them when you are done, e.g. using the clear() method.
Another note is that the coordinates are tile coordinates. Each tile is 6x6 pixels.

Here is TAS UI in action in the game.
pandemic_tasui_B (1)

I have documented the TAS UI Python API commands here, with complete example codes.
https://pokitto.github.io/library/upygamereference

Ps. TAS UI is not yet integrated in the PyInSky editor. It has a issue with the HW build and is considered a beta still. However, I hope that @FManga will fix it when he has a chance. I am currently using the Online Python Editor & Embitz side-by-side to be able to make HW builds also :wink:

8 Likes