RPG game + LED pixel game system hardware

Post here to let others know of a project you're working on.

Moderators: Chuckt, Garth, bitfogav

Post Reply
User avatar
brad
Site Admin
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

Post by brad » Wed Oct 24, 2012 8:38 pm

Great progress with the game!

Having some bad guys really adds something so cool to a game and the coolest part is that you will eventually get to play a game that you have made all by yourself!

Keep us posted and if you have any pics / vids - they are always great to see :)

by the way - here's a 32x32 RGB matrix with inbuilt driver circuitry for $47 - in know it's four times the pixels - but it's cool!
http://www.aliexpress.com/item/5mm-pixe ... 12519.html

User avatar
Saimaster13
I practically live here!
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

Post by Saimaster13 » Thu Oct 25, 2012 4:44 am

Enemies can now target and re-target anyone (before they could only move towards and attack player one.)

Also, I just learned about tabs, so I split my code into 16 different tabs (and counting) to make it simpler to navigate through.



I'll probably make another video soon, but I want enemies to be able to avoid walls first.



(There seems to be a rare glitch where after an enemy kills a player, then player one is unable to move. This does NOT always happen, and the game does NOT freeze, so why this happens, what causes it, and how to fix it I am currently unsure of.)
Joshua

User avatar
Saimaster13
I practically live here!
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

Post by Saimaster13 » Thu Oct 25, 2012 11:31 am

Got some videos:

Main update:


Enemy sword vulnerability update:


Shields affect enemies update:
Joshua

User avatar
brad
Site Admin
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

Post by brad » Thu Oct 25, 2012 10:02 pm

Nice update!

did the code for the ai for the bad guys take you long? Especially with wall detection and navigating around the walls. Also, hoe long have you been into programming because i am very impressed with what you have done here!

User avatar
Saimaster13
I practically live here!
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

Post by Saimaster13 » Thu Oct 25, 2012 10:20 pm

did the code for the ai for the bad guys take you long?
I was able to make the code in a day, though it did take a few hours. It wasn't too hard; I just took it a step at a time: AI could only move along x axis --> added y-axis --> added targeting --> added wall detection --> added very basic wall maneuvering (the AI can only go 1 space out of the way to get to the player.)
how long have you been into programming
I think I started programming at the beginning of September, so I've been programming for about 2 months now. Its been really helpful having resources to help teach my what I don't know, tell me what I can do better, and show me what can be done with microcontrollers. You guys are the ones that taught me how to use strings and show me that games on matrices are very possible.
Joshua

User avatar
brad
Site Admin
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

Post by brad » Fri Oct 26, 2012 7:06 am

That is very impressive - I was no where near your level when I had only been programming for two months!

Do you have plans to design a circuit board for your game?

User avatar
Saimaster13
I practically live here!
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

Post by Saimaster13 » Fri Oct 26, 2012 7:11 am

Do you have plans to design a circuit board for your game?
First of all, I am not sure what the final hardware will be since I am still upgrading the display, possibly the controllers (I coded it so it is very easy to insert your own controller code and use whatever controllers you want as long as they have enough buttons), and probably the microcontroller for the game.

Second of all, I do not know how to design circuit boards. I've never used any of the circuit board designing software.

However, if it is made into a user friendly-ish state, I'll look into it.
Joshua

User avatar
Saimaster13
I practically live here!
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

Post by Saimaster13 » Sat Oct 27, 2012 3:43 pm

by the way - here's a 32x32 RGB matrix with inbuilt driver circuitry for $47 - I know it's four times the pixels - but it's cool!
http://www.aliexpress.com/item/5mm-pixe ... 12519.html
Now that I think about it, it would be pretty awesome, especially if it would take away a lot of the processing from the Arduino. But... do you have any idea how to run it? I do not see any specifications or instructions.
Joshua

User avatar
brad
Site Admin
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

Post by brad » Sat Oct 27, 2012 8:32 pm

A couple of years ago I bought two of the 16x32 RGB matrix displays. There was no info given of how they operate so it was quite a lot of trial and error for me to get them working.

I have found that all of these displays (that I have bought) from China work in a very similar manner - you send out a whole heap of data serially (for red, green and blue) and then you activate the tri-state buffers contained within the displays to actually show the data on the LED's. Normally you are drawing multiple lines at once instead of one column at a time.

The display I shared in the link would be similar to all the other ones I have bought I would think although I would have to test one out to figure out all the internal workings properly.

User avatar
Saimaster13
I practically live here!
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

Post by Saimaster13 » Sun Oct 28, 2012 6:27 am

I was experimenting with SD cards, and found out that if I put the code for SDs in my game, it would take up at least an extra 16kb of flash memory. Since my code is already 20kb, and 20kb+16kb >32kb, my game will NOT be Arduino UNO compatible. It'll have to be run on a MEGA.
Joshua

User avatar
brad
Site Admin
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

Post by brad » Mon Oct 29, 2012 6:06 am

16KB to import the SD card library? that seems to be quite a bit too much!It must be doing some very fancy error checking and file / directory listing functions. Have you tried a search for how to use an SD card with some modified cose or import file to get the program memory space down?

User avatar
bitfogav
Moderator
Moderator
Posts: 915
Joined: Sun Mar 28, 2010 9:03 pm
Location: United Kingdom
Contact:

Re: RPG game + LED pixel game system hardware

Post by bitfogav » Mon Oct 29, 2012 6:58 am

Im not sure totally if this will be possible as im not sure exactly all of the functions you will need to run a SD card, but If you take all the bits that you only need from the SD card library and make your own library, then you can import it into the Arduino IDE.. You will probably have to rename all the headings/functions so it doesn't conflict with the Original SD Card library.. Just an idea? :)

Ive not fully looked through your code but the other thing you could do is see if you can optimize the code, for example if your using alot of int/Long variables, can you see if you can use "Byte's" instead?. that could reduce your overal code output.
If you don't know what Voltage your country is using, you shouldn't be doing electronics ;-)

User avatar
Saimaster13
I practically live here!
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

Post by Saimaster13 » Mon Oct 29, 2012 7:06 am

I'll look into library editing (I don't really know how to right now.) I have been keeping the variables as small as possible by the way, though I probably could shorten some of the code by doing some for loops.
Joshua

User avatar
brad
Site Admin
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

Post by brad » Tue Oct 30, 2012 8:23 pm

For loops are your friend! (well, certainly my friend anyway...)

I was just doing a read through the SD card library on the arduino site and it allows for alot of fancy options that you just wouldn't need.

It would be great to find that someone out there has already reduced the SD library down to it's most basic form to simply read and write raw data.

User avatar
bitfogav
Moderator
Moderator
Posts: 915
Joined: Sun Mar 28, 2010 9:03 pm
Location: United Kingdom
Contact:

Re: RPG game + LED pixel game system hardware

Post by bitfogav » Tue Oct 30, 2012 8:35 pm

If you don't know what Voltage your country is using, you shouldn't be doing electronics ;-)

Post Reply
[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

Who is online

Users browsing this forum: No registered users and 16 guests