Pokemon Clone

Show off your games, demos and other (playable) creations.
User avatar
napco
Party member
Posts: 129
Joined: Fri Jun 12, 2009 9:28 pm
Location: Ital... ehm...

Pokemon Clone

Post by napco » Mon Jul 27, 2009 11:56 pm

Hello! I'm working on this project from a couple of days in my spare time(when i'm not genetic engineering my mind or breaking my bones breakdancing). As you can guess it's a pokemon FR/LG clone, a 2D tile based RPG.
Until now i've done the map scrolling, player movement, sprite-sprite collision and messages.

In this little demo i've overcharged the draw function by printing 300 tiles per frame in order to minimize the FPS.
Please, let me know your FPS (shown in the window caption) when running the game... It's important for me to know the minimum speed to improve it... Please!

Uh, hints are also well accepted, so don't be shy :ultrahappy: !

EDIT:Here's another release with:

-Map movement/scrolling
-Messages
-Choices
-Map transitions
-Map teleporting

I've uploaded also a PSP version (with LuaPlayer Euphoria and a LOVE>LPE translation script), but it runs very slow and lacks of a transparency and image stretching system...

Love version: http://cid-d5ad0a89e048c4c7.skydrive.li ... rsion.love

PSP version: http://cid-d5ad0a89e048c4c7.skydrive.li ... ersion.zip
Last edited by napco on Tue Aug 04, 2009 6:35 pm, edited 3 times in total.

User avatar
JSharpe
Prole
Posts: 6
Joined: Mon Jul 27, 2009 4:48 pm
Location: UK
Contact:

Re: Pokemon Clone

Post by JSharpe » Tue Jul 28, 2009 1:13 am

Bit concerned it being a .exe at this stage, didn't want to run it at first.

You should add collision boundries, as I could walk off of the map.

FPS wise i'm getting a constant 30, seems to be capped.

Very nice start, and good that you posted with content to show that you've made progress, even though I had to run the game to see.

Hope it goes well for you.

User avatar
qubodup
Inner party member
Posts: 775
Joined: Sat Jun 21, 2008 9:21 pm
Location: Berlin, Germany
Contact:

Re: Pokemon Clone

Post by qubodup » Tue Jul 28, 2009 2:26 am

It's funny: 'love game.exe' makes the game run under linux :)
lg.newImage("cat.png") -- made possible by lg = love.graphics
-- Don't force fullscreen (it frustrates those who want to try your game real quick) -- Develop for 1280x720 (so people can make HD videos)

User avatar
Jasoco
Inner party member
Posts: 3650
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: Pokemon Clone

Post by Jasoco » Tue Jul 28, 2009 4:12 am

Yeah, it works in OS X as well. I just can't view the code.

Mine runs at 28FPS. Only 300 tiles? My game at 800x500 draws 400 tiles plus more on two other layers plus a bunch of NPC's and enemies and the player and all projectiles at once and still runs 55FPS. How can yours be going so slow with only 300 tiles? Or did you mean 3000?

How fast does it go when you aren't "overloading" it?

Also, what do all those DLL's do? Are they actually being used for the game? Because if so, somehow LÖVE is still using them even on OS X. If not, then that's a lot of overkill.

Edit: Nope. The game does not need all those DLL's or ANY of those other files. Why are they in the ZIP file? You can delete them all. Did Microsoft put all those unnecessary files in the ZIP file when you uploaded them? Delete that crap. All those DLL's are unneeded by your LÖVE game.

Code: Select all

DevIL.dll
ILU.dll
msvcp80.dll
msvcr80.dll
SDL_mixer.dll
SDL.dll
Microsoft.VC80.CRT.manifest
stdout.txt
All gone. Trashed. Deleted and Baleted.

Edit: Well, this is INTERESTING. If I try to run your game.exe in Darwine (An OS X version of WINE, a non-emulator Windows simulator) it complains that the DLL's are missing.

But somehow LÖVE alone is able to run the .love file buried inside the EXE. Something tells me whatever program you used to create your EXE requires all those files. Frankly, I find that excessive, but hey, I don't use Windows so it's nice to know I don't need them.

You learn something new everyday. :ultrahappy:

Edit: Another update, running the game in Darwine with the DLL's in place also gets me about 28FPS. Nice to know Darwine is able to run LÖVE at "full" speed.

Edit: Ah, I see. All those files are required by the LOVE.EXE file on Windows. I see. Glad I don't need all that extraneous stuff on OS X.

User avatar
Pliskin09
Citizen
Posts: 89
Joined: Fri Jul 24, 2009 8:30 am

Re: Pokemon Clone

Post by Pliskin09 » Tue Jul 28, 2009 6:38 am

getting 28 as well. seems capped, and the movement feels "heavy" at that speed. may want to speed up fps or the character huh. otherwise though, its looking good :)

User avatar
napco
Party member
Posts: 129
Joined: Fri Jun 12, 2009 9:28 pm
Location: Ital... ehm...

Re: Pokemon Clone

Post by napco » Tue Jul 28, 2009 3:48 pm

Uh oh... By 300 tiles i didn't mean that the map is made with 300 tiles, but that with the 240 X 160 resolution the visible tiles are 150 per layer and i'm drawing 2 layers. I could have made a 1000000 X 1000000 map without speed loss, 'cause the engine only shows visible sprites/tiles. The dll's are included in the zip to let the game run also on computers without love installed... Nice to see that the game runs at full speed! I'll post the .love ASAP, simply replacing from skydrive the .zip(i'm sorry, i didn't want to hide the code). Regarding FPS i've thought that 60 would be better, but the player walks too fast (1 pixel per frame at 60fps is like it's running instead of walking)... Any idea? Thanks anyway for the support! Ah, and sorry for the starting message in italian... I'll fix that later!

User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Pokemon Clone

Post by Robin » Tue Jul 28, 2009 4:10 pm

Jasoco wrote:Edit: Ah, I see. All those files are required by the LOVE.EXE file on Windows. I see. Glad I don't need all that extraneous stuff on OS X.
Actually... you do need them (well, not the .DLLs...), but I think that for OS X the libraries are either statically linked or included in Love.app (is that possible? I have no idea how those things work.).
Help us help you: attach a .love.

User avatar
napco
Party member
Posts: 129
Joined: Fri Jun 12, 2009 9:28 pm
Location: Ital... ehm...

Re: Pokemon Clone

Post by napco » Tue Jul 28, 2009 5:26 pm

I was trying to change the FPS to 60 and to decrement from 1 to 0.8 the movement of the player per frame, but i've encountered a BIG problem. This is a simple example:

This code works:

Code: Select all

a = 0
b = 16
while a < b do
  a = a + 1
end
if a == b then print("OK") end
This one instead isn't working:

Code: Select all

a = 0
b = 16
while a < b do
  a = a + 0.8
end
if a == b then print("OK") end
In the second example the loop ends correctly but the message isn't displayed. Why? I'm pretty sure that 0.8 * 20 == 16, so there is no way that a becomes > b inside the loop...

User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Pokemon Clone

Post by Robin » Tue Jul 28, 2009 5:36 pm

Unfortunately, in the world of binary 0.8 * 20 ~= 16. See Wikipedia. You could change it to be a little less exact:

Code: Select all

a = 0
b = 16
while a < b do
  a = a + 0.8
end
if a > b - .01 and a < b + .01 then print("OK") end
Help us help you: attach a .love.

User avatar
Jasoco
Inner party member
Posts: 3650
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: Pokemon Clone

Post by Jasoco » Tue Jul 28, 2009 7:37 pm

Robin wrote:
Jasoco wrote:Edit: Ah, I see. All those files are required by the LOVE.EXE file on Windows. I see. Glad I don't need all that extraneous stuff on OS X.
Actually... you do need them (well, not the .DLLs...), but I think that for OS X the libraries are either statically linked or included in Love.app (is that possible? I have no idea how those things work.).
Yeah, that's what I figure. Whatever utility Windows users use to create an EXE by merging the .love file with the love.exe will still require the DLL's. On OS X the "DLL" equivalents (Frameworks) are all included in the binary. (The Freetype, IL, Lua, SDL frameworks)

napco wrote:Uh oh... By 300 tiles i didn't mean that the map is made with 300 tiles, but that with the 240 X 160 resolution the visible tiles are 150 per layer and i'm drawing 2 layers. I could have made a 1000000 X 1000000 map without speed loss, 'cause the engine only shows visible sprites/tiles. The dll's are included in the zip to let the game run also on computers without love installed... Nice to see that the game runs at full speed! I'll post the .love ASAP, simply replacing from skydrive the .zip(i'm sorry, i didn't want to hide the code). Regarding FPS i've thought that 60 would be better, but the player walks too fast (1 pixel per frame at 60fps is like it's running instead of walking)... Any idea? Thanks anyway for the support! Ah, and sorry for the starting message in italian... I'll fix that later!
I look forward to helping out as much as possible. Eager to take a look at the code.

Are you taking advantage of the dt variable (Delta time) for making objects move the same speed no matter the framerate?

speed * dt would give you how many pixels per second the player or whatever should move. That will help you with your FPS. No game should run less than as close to 60FPS as possible. It will be a bit different though for you because you're trying to replicate the tile per step method Pokémon and old Final Fantasy/Dragon Quest games used. Mine uses a more Zelda: Link to the Past move anywhere you want method. It would be easier if you weren't limiting yourself to that method though, but at the same time would open up another world of difficult calculations.

LÖVE is fast enough for very complex things, a complete Pokémon clone is probably nothing to LÖVE. I'm making a Zelda style clone and have been around 55FPS for weeks no matter how many more calculations I put in. The only time it ever goes lower is if I generate a hundred droppables (Items enemies drop) on the screen. (I created a debug function that creates 50 rupees every time I hit A. So yesterday I did a test. I got it down to 8FPS after generating about 10000 rupees.) I've recreated this same engine twice on two different languages now. And each language did it differently.

Post Reply

Who is online

Users browsing this forum: Baidu [Spider] and 3 guests