Jump to content
Banner by ~ Wizard

game OOP Pokemon


MVC NVMXD JVRXD

Recommended Posts

mlp pokemon.zipSo I was trying to get into OOP, and the one thing it reminded me of was Pokemon. So I created this!

This is an easily customizable pokemon game. I'm just gonna post the source right now, but tomorrow (May 12th), expect an update. The basic way to create a new Pokemon is this:

Fluttershy=BasePoke:new(100,"Fluttershy",true,false,1,false,'fly')
It may not look like much, but there really is a lot to it. The function BasePoke:__init sets how pokemon should be made.

function BasePoke:__init(hp,name,user,enemy,level,attacking,attackname1)--Sets how you would name a custom pokemon
self.hp=hp
self.name=name
self.user=user
self.enemy=enemy
self.level=level
self.attacking=attacking
self.attackname1=attackname1
end
You'd write: YourPoke=BasePoke:new(100,'YourPoke',true,false,1,false,'fly')

Now if user is set as true, that just means it will appear on the left. Enemy=right. After you do this, in the main.lua, find love.draw() and love.update(dt). In these, put:

function love.draw()
  YourPoke:draw()
end
function love.update(dt)

  YourPoke:fight()
end
Right now, the fight system is like, awful. Just press space to start, and press f to see what happens. This stage, early stuff, is bad because you need to take a lot of time building the foundation, but in doing this you lack a lot of features.

To run the code, you need love2d.

http://love2d.org

Also, most of the pokemon were not MLP-named, but altered pokemon names to sound like... certain body parts. I think this edit is better for this community ;)

 

Shameless bump!

Poop load of progress, though none of you seem interested :( I got bored, and created a bunch of pony-pokemon classes. So... screenshots!

Posted Image

Posted Image

https://love2d.org/forums/download/file.php?id=4706


I HAD TO FALL TO LOSE IT ALL BUT IN THE END IT DOESN'T EVEN MATTER /WRISTS

On 4/28/2013 at 8:13 PM, gooM said:
Djenty...man you are crazy, but an awesome sort of crazy
Link to comment
Share on other sites

Nice to see more people teaching themselves programming. Or anything really.

 

And I like that you used LÖVE.

But if you trying to learn object orientation Java or C# might be a simpler language. Lua handles classes in a weird way.

 

Keep up the good work. :D


I'd like to thank the MLP Vector Club for the images used in my avatar.

Known as "Princess Mi Amore Cadenza", "Trixie the Great", "Tom" and "Tomzoid the EggDroid".

Link to comment
Share on other sites

Nice to see more people teaching themselves programming. Or anything really.

 

And I like that you used LÖVE.

But if you trying to learn object orientation Java or C# might be a simpler language. Lua handles classes in a weird way.

 

Keep up the good work. :D

 

Well i already know a nice amount of LÖVE, so I thought it'd just be easier to learn lua classes, rather a new language. ;)

I HAD TO FALL TO LOSE IT ALL BUT IN THE END IT DOESN'T EVEN MATTER /WRISTS

On 4/28/2013 at 8:13 PM, gooM said:
Djenty...man you are crazy, but an awesome sort of crazy
Link to comment
Share on other sites

(edited)

Well i already know a nice amount of LÖVE, so I thought it'd just be easier to learn lua classes, rather a new language. ;)

 

C++ and Java are taught as the main languages in college and are arguably the most popular languages. Thus they will both have immense documentation. I prefer Java simply because it is multi-platformed. I can't say I have heard of LOVE. it looks much more simple. Good job anyways Edited by Bohtty

img-1225480-2-29ostj6.jpg


Legit signature made by Shift.


Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Join the herd!

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...