IKD - Atari Combat remake
Re: IKD - Atari Combat remake
Chickens in Choppers - cool game CF! I'd not checked it out until now. Shame I can't find a link to the source. Have you uploaded the source anywhere?
Uzewars - Uses a mix of asm and C. Bit over my head.
Uzetroids - I presume this is what you meant when you said Asteroids? Its page is missing from the wiki. I'll message Nick.
EDIT: It seems your UB Asteroids clone is called VectorGame. I'll have a look at that now and see if I can make sense of it.
Uzewars - Uses a mix of asm and C. Bit over my head.
Uzetroids - I presume this is what you meant when you said Asteroids? Its page is missing from the wiki. I'll message Nick.
EDIT: It seems your UB Asteroids clone is called VectorGame. I'll have a look at that now and see if I can make sense of it.
Re: IKD - Atari Combat remake
It seems a few of the attributions are wrong on the wiki. Vectorgame is credited to CF on its wiki page but the source says it was Alec who wrote it. For Uzewars it credits 'Stache' but the source code says Alec also wrote that.
My next step is either making the tank shoot (in the direction the sprite is pointing) or making it move. I was initially going to tackle moving next but now I think I might be better working on the shooting first.
My next step is either making the tank shoot (in the direction the sprite is pointing) or making it move. I was initially going to tackle moving next but now I think I might be better working on the shooting first.
-
- Posts: 1488
- Joined: Mon Feb 11, 2013 8:08 am
- Location: Brisbane, Australia
Re: IKD - Atari Combat remake
I'm feeling pretty vague at the moment. The source was posted somewhere before but I can't find it now so here it is again.
Here is a video showing some tanks if you didn't see that.
https://youtu.be/PWnW5ROSPjI?t=695
Its got a LOT of ASM in it for the graphical stuff but the game logic and object management is all C.
When I am feeling better I will try answer any other questions you might have.
Here is a video showing some tanks if you didn't see that.
https://youtu.be/PWnW5ROSPjI?t=695
Its got a LOT of ASM in it for the graphical stuff but the game logic and object management is all C.
When I am feeling better I will try answer any other questions you might have.
- Attachments
-
- chickens.zip
- (84.53 KiB) Downloaded 457 times
Re: IKD - Atari Combat remake
Damn the tanks there are well implemented. That same thing, a little faster and player controlled, would already be a good ways towards a Combat implementation.
Re: IKD - Atari Combat remake
I'm glad you like the little bit I have done!
I've been extra busy in work the last few weeks, working double time pretty much so not had the time for doing any UB stuff but I'm hoping the worst is out of the way and this week will be easier.
I made my first minor contribution to the project tonight by submitting build instructions for Ubuntu and Debian users for the UB repo.
https://github.com/Uzebox/uzebox/pull/100
I re-installed Linux on my laptop tonight and I'm currently looking into getting micro configured as an minimalistic IDE for UB dev before I get back to this.
Re: IKD - Atari Combat remake
I didn't do anything on IKD for a full two months until a few days ago when I finally found the time and motivation to resume work on this. It's still some way off resembling a game but I have now added some temporary code that enables the tank to shoot but currently only upwards. I think I've worked out how to shoot in the direction the tank is facing but I want to solve another issue before I add that.
Initially just for debugging purposes, I want to be able to print the value of specific variables to the UB display which I believe I should be able to do with something like
I have tried inserting this statement into various parts of my code but I only ever get a garbled, unreadable mess of pixels like in the attached screenshot.
The same happens under both uzem and cuzebox.
What could be causing this? How do I get to text to print in a readable way? Can I adjust the colour or size of the font used by PSTR?
I finally got a reply of Uze back in December and he says he will post me a few UB PCBs so I'll have a much better chance of making one that works when they arrive.
Initially just for debugging purposes, I want to be able to print the value of specific variables to the UB display which I believe I should be able to do with something like
Code: Select all
Print(10,10,PSTR("Hello World"));
The same happens under both uzem and cuzebox.
What could be causing this? How do I get to text to print in a readable way? Can I adjust the colour or size of the font used by PSTR?
I finally got a reply of Uze back in December and he says he will post me a few UB PCBs so I'll have a much better chance of making one that works when they arrive.
-
- Posts: 1488
- Joined: Mon Feb 11, 2013 8:08 am
- Location: Brisbane, Australia
Re: IKD - Atari Combat remake
I don't use the generic video modes so I can't answer your question.
I assume it is something going wrong with the font. There are functions in the API
SetFontTable(const char *data)
SetFontTilesIndex(unsigned char index);
That have to be used before tiles can be drawn.
Someone with actual knowledge of how this is done will hopefully pop along soon.
I assume it is something going wrong with the font. There are functions in the API
SetFontTable(const char *data)
SetFontTilesIndex(unsigned char index);
That have to be used before tiles can be drawn.
Someone with actual knowledge of how this is done will hopefully pop along soon.
Re: IKD - Atari Combat remake
The 'tutorial' demo included in the UB repo covers printing text but it uses SetFontTable() which only works with video mode 1. I'm using video mode 3 because I want to use sprites which are apparently missing in video mode 1.
I was looking at one of my old threads on here and I noticed that ghostyghost seems to have the same issue with displaying fonts as I'm having in my project. If anyone knows of a working example of using Print() with mode 3 then let me know.
I was looking at one of my old threads on here and I noticed that ghostyghost seems to have the same issue with displaying fonts as I'm having in my project. If anyone knows of a working example of using Print() with mode 3 then let me know.
Re: IKD - Atari Combat remake
I didn't see any font data within the code you have on GitHub. You need font graphics in addition to the tank stuff.
There are different ways to handle things, but the easiest method for some situations is just to make 1 image with all your background tiles first, and then a full font set pasted after. Then you need to determine how many unique background tiles there are. You will SetFontsTileIndex(NUM_BG_TILES) so it points to the 1st tile after your BG stuff.
Essentially, you are telling the Print functions what tile to use for space(the first ASCII character), and it assumes your font tiles follow ASCII sequence to put the correct tiles for each character offset from space. You can skip lower case to save flash, and the sequence will be right if you only print those characters.
VRAM in Mode 3 is 8 bits, so you can usually deduce rough VRAM values by the garbage that is going on. If you see black tiles, or tiles with parts of sprites moving(if sprites are moving), you know VRAM has a value < RAM_TILES_COUNT. If you have SetTileTable() correctly, and you see garbage like you show there, it is probably a value in VRAM past how many tiles you have. So that could be showing whatever follows your tile data in flash.
Some more advanced stuff is possible too once you grasp this. You can sandwich font data between 2 different tile sets, so you don't need 2 copies of the font if you use 2 tile sets. Look at BlockBoy intro for a simple trick to squeeze a logo in unused characters and still use stock print functiins. Columns uses 1bpp font at cost of ram tiles. You can also keep just the characters you need, and create customer string that will cause the correct string to be displayed.
There are different ways to handle things, but the easiest method for some situations is just to make 1 image with all your background tiles first, and then a full font set pasted after. Then you need to determine how many unique background tiles there are. You will SetFontsTileIndex(NUM_BG_TILES) so it points to the 1st tile after your BG stuff.
Essentially, you are telling the Print functions what tile to use for space(the first ASCII character), and it assumes your font tiles follow ASCII sequence to put the correct tiles for each character offset from space. You can skip lower case to save flash, and the sequence will be right if you only print those characters.
VRAM in Mode 3 is 8 bits, so you can usually deduce rough VRAM values by the garbage that is going on. If you see black tiles, or tiles with parts of sprites moving(if sprites are moving), you know VRAM has a value < RAM_TILES_COUNT. If you have SetTileTable() correctly, and you see garbage like you show there, it is probably a value in VRAM past how many tiles you have. So that could be showing whatever follows your tile data in flash.
Some more advanced stuff is possible too once you grasp this. You can sandwich font data between 2 different tile sets, so you don't need 2 copies of the font if you use 2 tile sets. Look at BlockBoy intro for a simple trick to squeeze a logo in unused characters and still use stock print functiins. Columns uses 1bpp font at cost of ram tiles. You can also keep just the characters you need, and create customer string that will cause the correct string to be displayed.
- Attachments
-
- bdfont.png (2.76 KiB) Viewed 8420 times
Re: IKD - Atari Combat remake
Thanks for explaining that d3thadd3r! Sounds easy enough.
I probably would've been spared asking that question if this page:
http://uzebox.org/wiki/Function_SetFontTable
Had a 'See also' link for http://uzebox.org/wiki/Function_SetFontTilesIndex . I have just registered for the wiki so I'll add that myself if no-one beats me to it.
I probably would've been spared asking that question if this page:
http://uzebox.org/wiki/Function_SetFontTable
Had a 'See also' link for http://uzebox.org/wiki/Function_SetFontTilesIndex . I have just registered for the wiki so I'll add that myself if no-one beats me to it.