CEMETECH
Leading The Way To The Future
Login [Register]
Username:
Password:
Autologin:

Don't have an account? Register now to chat, post, use our tools, and much more.
Latest Headlines
Online Users
There are 102 users online: 5 members, 73 guests and 24 bots.
Members: lafferjm, proegssilb, Tari, tr1p1ea, zeldaking.
Bots: Alexa (1), Spinn3r (1), Magpie Crawler (3), Googlebot (19).
RSS & Social Media
SAX
You must log in to view the SAX chat widget
Author Message
Eiyeron


Member


Joined: 12 Dec 2011
Posts: 158

Posted: 02 Apr 2012 11:23:34 am    Post subject: [C] A Pokémon?

Hello guys!

Since the overclocking made me come back, I start back my Pokémon battle system project.

I wanted to make a perfect copy (or maybe the closest) of the Fire Red Battle system, so I started doing "some" sprites : I hav the fornt sprites of the 151 1st gen pkms...

BUt with, for example formulaes, I'll need some help, it's a big game, right?

So, who want s to jin me and make a good Pokémon Stadium-like?

What I miss:

-Exact formulaes for almost everything
-Back sprites
-Fx sprites
-TIme and pals
_________________
Back to top
KermMartian


Site Admin


Joined: 14 Mar 2005
Posts: 55882
Location: Earth, Sol, Milky Way

Posted: 02 Apr 2012 11:31:30 am    Post subject:

One of the solutions to the huge amount of data that the sprites take up might be to put the sprites in an external file, keep a pointer open to the file, and just seek around that file to pull out sprites as necessary. It would slow the drawing down very very slightly if you did that for every sprite, but you could even cache out the two Pokemon for battles if you wanted. I'd strongly recommend this approach.
_________________


Back to top
Eiyeron


Member


Joined: 12 Dec 2011
Posts: 158

Posted: 02 Apr 2012 11:33:02 am    Post subject:

I already thought about that. I could do this with the source and some lua :-°
_________________
Back to top
KermMartian


Site Admin


Joined: 14 Mar 2005
Posts: 55882
Location: Earth, Sol, Milky Way

Posted: 02 Apr 2012 11:35:03 am    Post subject:

Eiyeron wrote:
I already thought about that. I could do this with the source and some lua :-°
You could trivially do it with C as well, or Python, or PHP, if you're talking about computer-side. Wink If you mean Prizm-side, it is some very very simple BFile manipulation in C.
_________________


Back to top
Ashbad


I am governor Jerry Brown


Joined: 01 Dec 2010
Posts: 2423
Location: There lived a certain man in Russia long ago

Posted: 02 Apr 2012 11:35:58 am    Post subject:

KermMartian wrote:
One of the solutions to the huge amount of data that the sprites take up might be to put the sprites in an external file, keep a pointer open to the file, and just seek around that file to pull out sprites as necessary. It would slow the drawing down very very slightly if you did that for every sprite, but you could even cache out the two Pokemon for battles if you wanted. I'd strongly recommend this approach.


I would actually think it would be really slow to do this without caching, so if he did do it would would have to be that latter method (which, after loading the sprites in, would be then the same as if they were not cached). Perhaps you could keep all your resource in a single resources file, or even better, create a folder on the Prizm's storage memory for saves, resources, etc.
_________________
-Ashbad
Back to top
Eiyeron


Member


Joined: 12 Dec 2011
Posts: 158

Posted: 02 Apr 2012 11:37:59 am    Post subject:

KermMartian wrote:
Eiyeron wrote:
I already thought about that. I could do this with the source and some lua :-°
You could trivially do it with C as well, or Python, or PHP, if you're talking about computer-side. Wink If you mean Prizm-side, it is some very very simple BFile manipulation in C.


FOr files projects on computer, I usually use Lua, because LuaFX :-°
_________________
Back to top
merthsoft


File Archiver


Joined: 09 May 2010
Posts: 2735

Posted: 02 Apr 2012 11:38:30 am    Post subject:

KermMartian wrote:
One of the solutions to the huge amount of data that the sprites take up might be to put the sprites in an external file, keep a pointer open to the file, and just seek around that file to pull out sprites as necessary. It would slow the drawing down very very slightly if you did that for every sprite, but you could even cache out the two Pokemon for battles if you wanted. I'd strongly recommend this approach.
That's just moving the data around though, right? This doesn't fix that there's a huge amount of data.
_________________
Shaun
Back to top
KermMartian


Site Admin


Joined: 14 Mar 2005
Posts: 55882
Location: Earth, Sol, Milky Way

Posted: 02 Apr 2012 11:39:27 am    Post subject:

merthsoft wrote:
KermMartian wrote:
One of the solutions to the huge amount of data that the sprites take up might be to put the sprites in an external file, keep a pointer open to the file, and just seek around that file to pull out sprites as necessary. It would slow the drawing down very very slightly if you did that for every sprite, but you could even cache out the two Pokemon for battles if you wanted. I'd strongly recommend this approach.
That's just moving the data around though, right? This doesn't fix that there's a huge amount of data.
The thing that it fixes is putting 1.5MB of sprite data in an add-in when add-ins are already severely restricted in maximum size.
_________________


Back to top
Ashbad


I am governor Jerry Brown


Joined: 01 Dec 2010
Posts: 2423
Location: There lived a certain man in Russia long ago

Posted: 02 Apr 2012 11:39:40 am    Post subject:

merthsoft wrote:
KermMartian wrote:
One of the solutions to the huge amount of data that the sprites take up might be to put the sprites in an external file, keep a pointer open to the file, and just seek around that file to pull out sprites as necessary. It would slow the drawing down very very slightly if you did that for every sprite, but you could even cache out the two Pokemon for battles if you wanted. I'd strongly recommend this approach.
That's just moving the data around though, right? This doesn't fix that there's a huge amount of data.


Well, one problem is that add-ins can't be larger than ~1MB, but files in general can be much larger. Keeping data in another file (or files) should fix the data issue, if even the compresses data can't seem to fit in.
_________________
-Ashbad
Back to top
Eiyeron


Member


Joined: 12 Dec 2011
Posts: 158

Posted: 02 Apr 2012 11:39:54 am    Post subject:

RIght, but, with compression, I just use ~50 KB with my sprites...
16 colors compression is just what i needed, I did it :-°
_________________
Back to top
merthsoft


File Archiver


Joined: 09 May 2010
Posts: 2735

Posted: 02 Apr 2012 11:40:28 am    Post subject:

KermMartian wrote:
merthsoft wrote:
KermMartian wrote:
One of the solutions to the huge amount of data that the sprites take up might be to put the sprites in an external file, keep a pointer open to the file, and just seek around that file to pull out sprites as necessary. It would slow the drawing down very very slightly if you did that for every sprite, but you could even cache out the two Pokemon for battles if you wanted. I'd strongly recommend this approach.
That's just moving the data around though, right? This doesn't fix that there's a huge amount of data.
The thing that it fixes is putting 1.5MB of sprite data in an add-in when add-ins are already severely restricted in maximum size.
Mm, ok. I didn't realize addins had a size restriction. Casio doesn't seem to care so much. Look at their GIGANTIC periodic table.
_________________
Shaun
Back to top
KermMartian


Site Admin


Joined: 14 Mar 2005
Posts: 55882
Location: Earth, Sol, Milky Way

Posted: 02 Apr 2012 11:40:45 am    Post subject:

Eiyeron wrote:
RIght, but, with compression, I just use ~50 KB with my sprites...
16 colors compression is just what i needed, I did it :-°
Oh, I didn't realize that you had done that. Smile For what it's worth, SourceCoder now generates 1-bit, 2-bit, 8-bit, and 16-bit Prizm images and sprites, but sadly not 4-bit. Smile
_________________


Back to top
Eiyeron


Member


Joined: 12 Dec 2011
Posts: 158

Posted: 02 Apr 2012 11:42:41 am    Post subject:

A "bit" is lossed because of useless pictures

Edit: Here is my first Pokemon structure version

Code:
#ifndef STRUCT_MOTEUR
#define STRUCT_MOTEUR

typedef enum{NONE, NORMAL, FIRE, WATER, GRASS, FLY, ROCK, BUG, POISON, PSYCHIC, DRAGON, STEEL, GHOST, DARK, GROUND, ELECTRIC, FIGHT, ICE }Type;

typedef enum{KO = -1, SAFE = 0, POISONNED, BADLY_POISON, BURN, PARALYSIS, FREEZE, COUNFUSE, SLEEP, ATTRACTION, CURSE}Status;


typedef struct{
   unsigned short num;
   short SpEffect;
   unsigned char Type;
   
   unsigned char PP;
   unsigned char PPMax;
   unsigned char Deg;
   unsigned char Prec;
}Attack;

typedef struct{
   //Identity
   unsigned short Num;
   unsigned char Sex;
   unsigned short ID_First_Owner;
   unsigned char Happiness;
   unsigned char Pseudo[16];
   unsigned char Pseudo_First_Owner[7];
   unsigned int Algorithm_key;

   //Stats
   unsigned char LVL;   
   unsigned char PKMN_Status;
   unsigned char Status_turns;
   unsigned char Confused_turns;
   unsigned char Is_Attracted;
   unsigned char Is_Cursed;

   char Att_Buff;
   char Def_Buff;
   char AttSpe_Buff;
   char DefSpe_Buff;
   char Vit_Buff;
   char Precision_Buff;
   char Dodge_Buff;
   
   unsigned char Type1;
   unsigned char Type2;
   
   short PV;
   short PVMax;
   unsigned short Att;
   unsigned short Def;
   unsigned short AttSpe;
   unsigned short DefSpe;
   unsigned short Vit;
   
   unsigned short IV_PV;
   unsigned short IV_Att;
   unsigned short IV_Def;
   unsigned short IV_AttSpe;
   unsigned short IV_DefSpe;
   unsigned short IV_Vit;
   
   unsigned short EV_PV;
   unsigned short EV_Vit;
   unsigned short EV_Att;
   unsigned short EV_Def;
   unsigned short EV_AttSpe;
   unsigned short EV_DefSpe;
   Attack Attakcs[4];
   
   //misc
   unsigned short Item;
}PKMN;

#endif


Sorry for double post Edit by Kerm: No problem Smile
_________________


Last edited by Eiyeron on 02 Apr 2012 11:44:06 am; edited 1 time in total
Back to top
JosJuice


Power User


Joined: 17 Oct 2010
Posts: 306
Location: Sweden

Posted: 02 Apr 2012 11:43:24 am    Post subject:

I would be very interested in seeing a Pokémon game! Are you planning to make this battle-only (like Stadium), or is it going to be a full game including the overworld? Most of the sprites from FRLG are available here: http://spriters-resource.com/gameboy_advance/pokefrlg/index.html Details about the game mechanics should be available at Bulbapedia and Smogon, but it might be a bit hard to find them on those sites. If there's something specific about the mechanics that you need to know about, ask! I'll probably be able to find something, and there are probably others who are knowledgeable about Pokémon too.
Ashbad wrote:
Well, one problem is that add-ins can't be larger than ~1MB
Physium would like to object.
Back to top
Ashbad


I am governor Jerry Brown


Joined: 01 Dec 2010
Posts: 2423
Location: There lived a certain man in Russia long ago

Posted: 02 Apr 2012 11:44:20 am    Post subject:

JosJuice wrote:
Ashbad wrote:
Well, one problem is that add-ins can't be larger than ~1MB
Physium would like to object.


Indeed, I just realized that massive beast is larger. Perhaps it was 1.5MB, then; I think fishbot knows an exact number.
_________________
-Ashbad
Back to top
Eiyeron


Member


Joined: 12 Dec 2011
Posts: 158

Posted: 02 Apr 2012 11:45:17 am    Post subject:

Generally, on these sites are only the damage formulaes
_________________
Back to top
JosJuice


Power User


Joined: 17 Oct 2010
Posts: 306
Location: Sweden

Posted: 02 Apr 2012 11:47:27 am    Post subject:

Eiyeron wrote:
Generally, on these sites are only the damage formulaes
There are lots of other things too. What are you looking for?
Back to top
KermMartian


Site Admin


Joined: 14 Mar 2005
Posts: 55882
Location: Earth, Sol, Milky Way

Posted: 02 Apr 2012 11:48:35 am    Post subject:

JosJuice wrote:
Eiyeron wrote:
Generally, on these sites are only the damage formulaes
There are lots of other things too. What are you looking for?
I should also mention that TIFreak8x has done extremely extensive research on the Pokemon formulae for his TI game, Pokemon Purple. I'll get him to take a look at this topic and offer his feedback if you have specific formulae that you're seeking.
_________________


Back to top
Eiyeron


Member


Joined: 12 Dec 2011
Posts: 158

Posted: 02 Apr 2012 11:48:41 am    Post subject:

Almost everything, like Catch rate, confusion rate, etc... But I think that I found some pointers on bulbapedia.

And Stats, I need a lot of stats
_________________
Back to top
JosJuice


Power User


Joined: 17 Oct 2010
Posts: 306
Location: Sweden

Posted: 02 Apr 2012 11:53:03 am    Post subject:

Eiyeron wrote:
Almost everything, like Catch rate, confusion rate, etc... But I think that I found some pointers on bulbapedia.

And Stats, I need a lot of stats
Details about stats for moves and Pokémon are available at the Bulbapedia pages for the specific moves and Pokémon, but you could also find that data on sites like Serebii.net. There are also some other interesting articles, like this one about how Pokémon are stored (there are also similar ones about attacks and items): http://bulbapedia.bulbagarden.net/wiki/Pok%C3%A9mon_data_structure_in_Generation_III
Back to top
Display posts from previous:   
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
    » Goto page 1, 2, 3  Next
» View previous topic :: View next topic  
Page 1 of 3 » All times are GMT - 5 Hours

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© Copyright 2000-2013 Cemetech & Kerm Martian :: Page Execution Time: 0.047580 seconds.