Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - bkumanchik

#16
Thanks so much for the help, I will give this a try ASAP and let you know how it goes.

Brian
#17
I have created a table in Lua for Pico-8 in order to draw a row of invaders every frame (see attached images - code/result)

I'm trying to do the same thing with a dictionary (as it seems to be the closest data type to a table in Lua) in Micro Python and I'm having trouble understanding/figuring out the syntax to do this, I think I've created the dictionary properly but need to create the for loop to iterate through it and display my sprites.

Here's my code so far:


--------------------------------------------------------------------------
inv = {}
# sprite number, x, y
inv = {'s':'invader_a', 'x':40, 'y':28}
inv = {'s':1, 'x':50, 'y':28}
inv = {'s':1, 'x':60, 'y':28}
inv = {'s':1, 'x':70, 'y':28}
inv = {'s':1, 'x':80, 'y':28}

while(1):
   thumby.display.fill(0)
   for ?: 
      thumby.display.blit(sprite number?, x?, y?, 8, 8, 0)
--------------------------------------------------------------------------


As you can see, I need help to fill in the for loop and the sprite number?, x?, y?   I have a pretty good python book and have read many samples online of how this should work but I haven't been able to come up with a solution that works, any help would be appreciated.

Thanks,

Brian

#18
Thumby / Re: Invader Test
October 22, 2021, 11:19:00 AM
Thanks for the comments, I will try to continue working on the game when I have time, I have just started to learn to program myself, I have a full working version in Pico-8 but that is in Lua (language). I need to figure out how to use arrays in Python an iterate through them in order to add more invaders, etc.

Brian
#19
Thumby / Re: Font size
October 21, 2021, 06:36:19 PM
Cool, I'll try this out ASAP!
#20
Thumby / Re: Font size
October 21, 2021, 01:38:41 PM
This would be cool if it worked.
#21
Thumby / Re: Invader Test
October 21, 2021, 01:35:59 PM
Thanks, that helps!
#22
Thumby / Re: Invader Test
October 18, 2021, 01:18:56 PM
Will do, I will try to flesh this out into a real game if I have time, Can I see a screenshot of it running on the real hardware, I'd like to see the relative scale of things if possible.

Thanks,

Brian
#23
Thumby / Re: Font size
October 16, 2021, 12:57:26 PM
Thanks for the answer!
#24
Thumby / Invader Test
October 16, 2021, 12:56:05 PM
Not a game but a test to learn my way around the IDE and library:

I'm a new programmer, Loving this, can't wait for the real device!

B button to start, D-Pad Left/Right to move Left/Right, A to fire, B while in game to pause and show score and remaining lives, B to restart at Game Over screen.

Need to add:
- Info screen when you lose a life (like the pause screen)
- More columns and rows of different types of aliens
- Increasing difficulty
- Sound



#25
Thumby / Font size
October 15, 2021, 05:56:28 PM
Will there eventually be a smaller font? maybe a 4 x 5 (4 = 3 plus space)
#26
Thumby / Re: A quick question
October 14, 2021, 06:39:34 PM
Thanks
#27
Thumby / Re: A quick question
October 14, 2021, 04:42:54 PM
Figured it out, just needed a ", 0" at the end of the [thumby.display.blit] call.

Can't wait for the library documentation  ;)
#28
Thumby / A quick question
October 14, 2021, 04:22:10 PM
A quick question:

Do the sprites have transparency, it seems like they don't but wanted to check, I am using an inverted sprite (white on black)

Thanks,

Brian

SMF spam blocked by CleanTalk