RPG game + LED pixel game system hardware
Moderators: Chuckt, Garth, bitfogav
- Saimaster13
- I practically live here!
- Posts: 176
- Joined: Mon Aug 13, 2012 4:23 am
- Location: Sarasota, Florida [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
Re: RPG game + LED pixel game system hardware
The more programming I add the more hardware I need. eeprom for more memory, SD card to save data, pins to control the displays, and I only have 2 extra I/O pins. Aside from this, I am running out of both RAM and Flash memory (though the added eeprom and such should help.)
Would PICs be a better choice for bigger and bigger programs? Would more pins allow the simultaneous use of multiple shift registers and such to speed up the matrix displays? And they seem to have half the clock speed of Arduinos, so would they be twice as slow for normal operations?
Anyone have an opinion on whether it would be worth switching this program over to a PIC or not?
Would PICs be a better choice for bigger and bigger programs? Would more pins allow the simultaneous use of multiple shift registers and such to speed up the matrix displays? And they seem to have half the clock speed of Arduinos, so would they be twice as slow for normal operations?
Anyone have an opinion on whether it would be worth switching this program over to a PIC or not?
Joshua
- brad
- Site Admin
- Posts: 2578
- Joined: Fri Mar 26, 2010 10:30 pm [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
Re: RPG game + LED pixel game system hardware
Sorry I forgot that you were using 8x8 matrix's (even though I had mentioned it previously...) The info that I just gave was explaining these matrix displays that I bought a few months back:Saimaster13 wrote:I don't understand how I would split an 8x8 matrix into 4 rows. Wouldn't the cathode data be doubled on a single matrix if two rows were active at the same time? Also, to provide the extra mA needed to power larger matrices, won't I need to add some transistors to source and sink power?
Also, you plan on building this project once completed?
http://www.aliexpress.com/item/P10-full ... 80749.html
In your case, instead of breaking it up into four rows - you would break it up into eight rows. So if you had two 8x8 displays high (16 pixels high) and it doesn't matter how many of them you have side by side - you would send out data to all of the top row of led's of both the top 8x8 matrix displays and the top row of Led's of the bottom 8x8 matrix display. Therefor when you turn the LED's on you are actually drawing two rows at once - this means you only need to do this eight times if you have 16 pixels high.
Hopfully this is making sense to you. I guess what I am trying to say is that instead of focusing on drawing one complete 8x8 matrix and then moving on to the next, and then the next etc... you are actually sending them the data all at once and drawing them all at once which practically works out to take the same amount of time as just a single matrix.
- brad
- Site Admin
- Posts: 2578
- Joined: Fri Mar 26, 2010 10:30 pm [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
Re: RPG game + LED pixel game system hardware
If you are looking for more power and more I/O pins then you could just upgrade your arduino. You have done a great job so far coding this all in Arduino software - however it shouldn't be too much of a leap to using a PIC and programming in Basic. As for speed of PIC's, the one I used for RetroBall cost me $2 and can run upto 64MhzSaimaster13 wrote:The more programming I add the more hardware I need. eeprom for more memory, SD card to save data, pins to control the displays, and I only have 2 extra I/O pins. Aside from this, I am running out of both RAM and Flash memory (though the added eeprom and such should help.)
Would PICs be a better choice for bigger and bigger programs? Would more pins allow the simultaneous use of multiple shift registers and such to speed up the matrix displays? And they seem to have half the clock speed of Arduinos, so would they be twice as slow for normal operations?
Anyone have an opinion on whether it would be worth switching this program over to a PIC or not?
How many I/O pins are on your current arduino? can you configure the analog pins to be digital?
- Saimaster13
- I practically live here!
- Posts: 176
- Joined: Mon Aug 13, 2012 4:23 am
- Location: Sarasota, Florida [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
Re: RPG game + LED pixel game system hardware
The only Arduino upgrade I see is the Arduino Mega. It is around $65, twice as much as the UNO. It isn't that bad considering it has 54 digital pins, 16 analog, and 256k flash, but the reason why I don't like it is that the microcontroller isn't a DIP package, and therefore I would NOT be able to take it off the board. With the UNO (what I have right now) I can take the microcontroller off and embed it in a project or another board. Then I could buy some more microcontrollers and do the same with those. That means it is around $4 per microcontroller, whereas the MEGA is $65 per microcontoller since it cannot be "breadboarded".If you are looking for more power and more I/O pins then you could just upgrade your Arduino.
64MHZ and $2, I think I might be switching after this program, although I did decide to stick with the Arduino on this game.As for speed of PIC's, the one I used for RetroBall cost me $2 and can run up to 64Mhz
My Arduino uno has 14 digital pins and 6 analog which CAN be configured into digital. So, I have a max of 20 O/I pins.How many I/O pins are on your current Arduino? can you configure the analog pins to be digital?
What I will probably do, since my controllers take up 7 pins for all of them, is get some shiftIn registers (parallel to serial shift register 4021) which will bring them down to 3 pins. This will allow me 6 extra pins which I will use for eeprom and hopefully Arduino to Arduino communications. The Arduino to Arduino communications should allow for a bigger matrix, more fps on the main matrix, and possibly extra I/O pins, hopefully allowing for an SD card for saving.
Joshua
- brad
- Site Admin
- Posts: 2578
- Joined: Fri Mar 26, 2010 10:30 pm [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
Re: RPG game + LED pixel game system hardware
Here's an arduinomega2560 for around $17 with free postage.
http://www.ebay.com.au/itm/New-Nice-1PC ... 447wt_1414
The only problem again is that you can't plug it directly into a breadboard but it would have to be sitting next to your breadboard and then use jumper wires.
I have programmed in a number of languages and have found swordfish basic to be the most fun and easiest to use. The only problem is that with the free version you are limited to 256bytes of RAM (but unlimited to program memory) You then need to buy the full version which is around $100 to use all the pics ram. Or - you could use the arduino alternative which is amicus18 which has free software without limitations. The software is made by the same guy who made swordfish basic so it is very similar to code in. in fact I am working on a little development board which is compatible with amicus18.
The SD card is a great idea since it only uses a couple of pins. Also, using the 4021 (just like the nintendo controllers) will save you precious I/O pins.
I found that link to buy the SNES controllers (which would save you a lot of work...) They have two 4021 inside I am pretty sure, the first controller will take up three I/O pins and each additional controller will take up just one extra I/O pin
http://imall.iteadstudio.com/im120820002.html
http://www.ebay.com.au/itm/New-Nice-1PC ... 447wt_1414
The only problem again is that you can't plug it directly into a breadboard but it would have to be sitting next to your breadboard and then use jumper wires.
I have programmed in a number of languages and have found swordfish basic to be the most fun and easiest to use. The only problem is that with the free version you are limited to 256bytes of RAM (but unlimited to program memory) You then need to buy the full version which is around $100 to use all the pics ram. Or - you could use the arduino alternative which is amicus18 which has free software without limitations. The software is made by the same guy who made swordfish basic so it is very similar to code in. in fact I am working on a little development board which is compatible with amicus18.
The SD card is a great idea since it only uses a couple of pins. Also, using the 4021 (just like the nintendo controllers) will save you precious I/O pins.
I found that link to buy the SNES controllers (which would save you a lot of work...) They have two 4021 inside I am pretty sure, the first controller will take up three I/O pins and each additional controller will take up just one extra I/O pin
http://imall.iteadstudio.com/im120820002.html
Re: RPG game + LED pixel game system hardware
Correct me if im wrong but I think the amicus18 is limited to only two PIC's, 18F25K20 & 18F25K22?. Ive just got several amicus18 pcb's and some smd parts, going to try out my new reflow ovenbrad wrote:Or - you could use the arduino alternative which is amicus18 which has free software without limitations. The software is made by the same guy who made swordfish basic so it is very similar to code in. in fact I am working on a little development board which is compatible with amicus18.
If you don't know what Voltage your country is using, you shouldn't be doing electronics
- Saimaster13
- I practically live here!
- Posts: 176
- Joined: Mon Aug 13, 2012 4:23 am
- Location: Sarasota, Florida [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
Re: RPG game + LED pixel game system hardware
Well, what i mean by "breadboarding" is the ability to take the chip off the Arduino and embed it in a project. This pretty much means to me that after buying the first Arduino, getting a second or third is only the cost of an atmega328 microchip (plus capacitors, crystal, and 5v regulator.) You cannot do that with the MEGA's package since it isn't in DIP format, so each additional MEGA is the price of the first. That being said, the UNO's memory along with everything else is running out, so I went ahead and ordered the ~$20 MEGA clone. Thanks for the link Brad!
p.s. So many pins... Is this heaven? 54 pins = 49 connected LCDs, 56 of my homemade controllers, 52 NES or SNES controllers, 54 N64 controllers, or a directly connected 18x18 bicolor 1/18 duty cycle matrix.
p.s. So many pins... Is this heaven? 54 pins = 49 connected LCDs, 56 of my homemade controllers, 52 NES or SNES controllers, 54 N64 controllers, or a directly connected 18x18 bicolor 1/18 duty cycle matrix.
Joshua
- brad
- Site Admin
- Posts: 2578
- Joined: Fri Mar 26, 2010 10:30 pm [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
Re: RPG game + LED pixel game system hardware
I am quite sure that you can use the 18f45k20 aswell which is the 40 pin version. Heaps of io and memory to work with!bitfogav wrote:Correct me if im wrong but I think the amicus18 is limited to only two PIC's, 18F25K20 & 18F25K22?. Ive just got several amicus18 pcb's and some smd parts, going to try out my new reflow ovenbrad wrote:Or - you could use the arduino alternative which is amicus18 which has free software without limitations. The software is made by the same guy who made swordfish basic so it is very similar to code in. in fact I am working on a little development board which is compatible with amicus18.
As for reflow ovens i should be getting the latest batch of boards tomorrow!
- brad
- Site Admin
- Posts: 2578
- Joined: Fri Mar 26, 2010 10:30 pm [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
Re: RPG game + LED pixel game system hardware
You could buy a smd to dip circuit board. That way you can plug the atmega into a breadboard. The only trouble is that you need to solder it to the pcb first.Saimaster13 wrote:Well, what i mean by "breadboarding" is the ability to take the chip off the Arduino and embed it in a project. This pretty much means to me that after buying the first Arduino, getting a second or third is only the cost of an atmega328 microchip (plus capacitors, crystal, and 5v regulator.) You cannot do that with the MEGA's package since it isn't in DIP format, so each additional MEGA is the price of the first. That being said, the UNO's memory along with everything else is running out, so I went ahead and ordered the ~$20 MEGA clone. Thanks for the link Brad!
p.s. So many pins... Is this heaven? 54 pins = 49 connected LCDs, 56 of my homemade controllers, 52 NES or SNES controllers, 54 N64 controllers, or a directly connected 18x18 bicolor 1/18 duty cycle matrix.
Any progress on the game? Sorry but i still havent got around to modifying your level converter just yet...
- Saimaster13
- I practically live here!
- Posts: 176
- Joined: Mon Aug 13, 2012 4:23 am
- Location: Sarasota, Florida [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
Re: RPG game + LED pixel game system hardware
No worries, I have not been making much progress at all. I started to build a 16x16 matrix for an upgraded screen, then realized that I didn't even have the resistors to do so, so I just ordered some and am waiting on them. I am also running out of RAM, and since I ordered a MEGA, I might as well wait until that comes too to resume working.
I've been thinking of the A.I., and it might prove to be pretty tough. I might make a simple sidescrolling game, since I think its A.I. should be easier.
I've been thinking of the A.I., and it might prove to be pretty tough. I might make a simple sidescrolling game, since I think its A.I. should be easier.
Joshua
- brad
- Site Admin
- Posts: 2578
- Joined: Fri Mar 26, 2010 10:30 pm [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
Re: RPG game + LED pixel game system hardware
How about Super Pixel Bros!Saimaster13 wrote:No worries, I have not been making much progress at all. I started to build a 16x16 matrix for an upgraded screen, then realized that I didn't even have the resistors to do so, so I just ordered some and am waiting on them. I am also running out of RAM, and since I ordered a MEGA, I might as well wait until that comes too to resume working.
I've been thinking of the A.I., and it might prove to be pretty tough. I might make a simple sidescrolling game, since I think its A.I. should be easier.
- Saimaster13
- I practically live here!
- Posts: 176
- Joined: Mon Aug 13, 2012 4:23 am
- Location: Sarasota, Florida [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
Re: RPG game + LED pixel game system hardware
Yup, what I made is VERY similar to Super Pixel Bros., only I'm going to be emphasizing the shooting part over the jumping part if I actually work on the game.
Joshua
- Saimaster13
- I practically live here!
- Posts: 176
- Joined: Mon Aug 13, 2012 4:23 am
- Location: Sarasota, Florida [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
Re: RPG game + LED pixel game system hardware
I actually want to make a standardized (for my projects) game system, 16x16 RGB color. Probably won't be a portable system, but it will be portable enough. If I do make it, then it will have at least 4 players max and will include a one screen version of this RPG game and, if I make it, the side scrolling game I worked on for ~1 hour.
Joshua
- brad
- Site Admin
- Posts: 2578
- Joined: Fri Mar 26, 2010 10:30 pm [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
Re: RPG game + LED pixel game system hardware
Sounds great!
If you are after 16x16 RGB LED matrix displays then check out aliexpress.com, they tend to be quite a bit cheaper than ebay. The good thing is that they come pre-installed with driver circuitry so all you need to do is send it some serial data and the displays take care of converting it to parallel.
Much easier (and most probably cheaper) than building your own display out of 8x8 RGB matrix' displays.
An RGB display would be perfect for your adventure game - you would have loads more colors to play with for other players etc...
If you are after 16x16 RGB LED matrix displays then check out aliexpress.com, they tend to be quite a bit cheaper than ebay. The good thing is that they come pre-installed with driver circuitry so all you need to do is send it some serial data and the displays take care of converting it to parallel.
Much easier (and most probably cheaper) than building your own display out of 8x8 RGB matrix' displays.
An RGB display would be perfect for your adventure game - you would have loads more colors to play with for other players etc...
- Saimaster13
- I practically live here!
- Posts: 176
- Joined: Mon Aug 13, 2012 4:23 am
- Location: Sarasota, Florida [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
Re: RPG game + LED pixel game system hardware
Couldn't find any on that site, but I bought 4 8x8 matrices on ebay for $6.50 ea, $26 total. Got AI to a half working state. They can go through walls and there is a bug which makes so they cannot re-target someone, BUT they can:
Scan for players and target a specific player in its range
Have a square range with any definable size (the one I made was a 4x4 square, different enemies can have multiple ranges though)
Calculate the distance between itself and the target and move towards the target
Hurt players
Un-target players when they are out of range
Still to do:
Allow them to be hurt
Allow them to be moved by shields
Disallow them to move through walls
Program wall avoidance
Allow them to re-target after losing a target (a simple fixable bug)
Make them "solid" and not allow players to stay in them.
Scan for players and target a specific player in its range
Have a square range with any definable size (the one I made was a 4x4 square, different enemies can have multiple ranges though)
Calculate the distance between itself and the target and move towards the target
Hurt players
Un-target players when they are out of range
Still to do:
Allow them to be hurt
Allow them to be moved by shields
Disallow them to move through walls
Program wall avoidance
Allow them to re-target after losing a target (a simple fixable bug)
Make them "solid" and not allow players to stay in them.
Joshua
Who is online
Users browsing this forum: No registered users and 9 guests