Stupid Soccer Game

Hi everybody.

I’m very glad to post something here for the first time :slight_smile:
I’m french, I’ve been following Blender for a long time now, and used it from time to time for some short stuff.

But this time i’d like to start - and rather finish- this project i’ve had for years.
I guess You’ve played years ago this stupid and crazy game : Nintendo World Cup. Here’s a screenshot of the game (NEs and Game Boy). I spent so much time having fun playing it when i was a kid that i wanted to do it again with some special flavour (i.e low tech, still in 3D, give it some more craziness, ).


First i wanted to make it with Processing (java powered), which is an excellent software. I knew i could do it with blender, but python tutorials are quite hard to find, until i found SolarLune’s website (thank you so much!). Even better : he/she loves pixelart, which is what i wanted to achieve.
So i’ve been playing around for a few days, and here’s the veeeery basic stuff : some guy being able to run in the old way (only 2 positions : on the ground or in mid-air, like in Nintend World Cup).

I have to admit it made me laugh to see that with 3d graphics (despite the look of the old game, the guys really had some genius ideas really, only making this guy walk like they did make it feel dumb) that i wanted to share it with you. And eventually use this thread to ask some questions from time to time :slight_smile:


End of “my life” stuff, next step is making a ball and have it follow the player whenever he comes close enough. Then shoot, then other players, then pass, then IA, then gameplay tweak, then effects, then sound, then etc etc etc…

Update

Now Player has a TeamPlayer, and is able either to pass or shoot. Time for some headbutt handling, tackle and IA.


Cool, I’m glad that my tutorials are helping! Also, I like the pixel-art look (obviously. :p) - keep developing it! The net’s frame seems a little thick, and the grass is striped horizontally in the original screenshot (not a big deal - just a difference), but it’s looking pretty good so far. If you don’t mind me asking, with what function are you moving the character in Python? I would recommend obj.setLinearVelocity() - it uses the physics engine, so you won’t have any teleportation or wall-intersection problems, but you also won’t have sliding.

Hi, thanks for the answer SolarLune,

Yes your tutorials were perfect to get how to code it :slight_smile:

About the net, i just made it quickly to make the screenshot, but i have this problem i also have with white stripes on the grass : it feels like blender pre-processes the map, and even if pixels are totally opaque, it will “smooth” it.
Vertical stripes on the ground are here to acentuate the depth effect, i prefer that for the moment :slight_smile:

I also have mimap issue when i export the game : it wont disable it, so everything get smoothed.

Movement are really simple, following a part of what you made. Differences are : left or right change the direcion using AlignToVect function, (up and down just move up or down, direction wont change and the animation will keep being the same, like in the original game) , so i didnt use the whole rotation you made for your maze game.
Gravity is set to 0, and i’ll use AxisCheck to deal with bounds.

Still, i have this weird issue : a regular (every second) mini freeze. I think it has to do with code since it does it at any resolution (plus this simple scene get my core2duo to 90% use…) i guess i have kind of a memory leak.

By the way, what do you mean by sliding?

I’ll have to give a better look at textures, but i’m quite sure that the goal’s net is 128x128.

About motion, I am using a box which is actually invisible, but used to receive movements (and collisions in the future if i give AxisCheck up). The sprite is parented to the box. Since the movement feeling is ok to me for the moment, i guess the best is to use the box for collisions and tweak the overall feeling ingame by reshaping that box.

And yes, i still have the same bug with runtime, with this error :

Error Totblock: 26
Anyway, the code is a bit dirty (i reshaped what you created), so maybe i unfortunately put something wrong in the code that creates this weird freeze…

EDIT :
Thanks for the preloader, i’ll give a look.
I tried to disable mipmap with “blenderplayer -g nomipmap”, but didnt change anything.

If you’re using Multitexture mode, that command won’t work (for whatever reason). It really needs to be fixed - I’m not sure what ever happened to it, or when it could be fixed. Soon, I hope.

Well i used GLSL mode… but it’s ok, anyway, i have maaaaany other things to do before fixing so small issues :stuck_out_tongue:
Thanks again!

OK,

I may not understand it (and given that it has changed from 2.49 to 2.5 madfe it even more complex), i dont get how to set a property from an object to another object.

I’d like to do it manually (through python), i tried to make a variable of another scene object and change its property like that :

otherobject = sce.objects[‘otherobject’]
otherobject[‘property’] = 1

but it was like it didnt pass the property, the value was only available in the range of the first object (no error ion the console though).

Should i use globaldict? wtf is it? any clue?

You should do exactly that!

Are You sure there’s no other problem? Like more than one object named ‘otherobject’ (You get that with the add object (spawn)).

That’s a good idea…

But there’s no object creation, it’s only about relationship between an invisble box which is parent of the sprite, these elements are the oinly ones in the scene…

EDIT

it works now, i just had ther property recursively set to 0 because it wasnt at the right place :confused:

… ok, it works now.
Problem was i put the init of property at the beginning of the definition of the Sprite’s script. I didnt expect it to be evaluated all the time.

It also means that obj, sce and other variables i use are created recursively, i guess i have to move them.

The thread title deceived me, this will be quite a nice game.

That’s what I was thinking. Taking a 2d game and giving it a 3d make over just amusses me. Like to see more screens when you get them.

Sorry guys, maybe my english isn’t neat enough.
Thanks for the support, i’ll keep it updatedas soon as there’s some new stuff to see :slight_smile:

A small update, Player isn’t alone anymore.

Ball code is gonna be messy i guess, because it’s the real node of all interaction. I may lose some hair figuring out how to achieve a clean code though.

Other stuff is : Player has too few pixels, so before redrawing it, i wanted to use a bigger grid for the Ball… and now it feels like its resolution’s too high.
When i have more elements, i’ll try to figure out how to give the whole look wome coherence.

By the way SolarLune, now i can understand how much work you’ve gone through to give your porjet this look! Compared to my 3 objects in the scene… :smiley:

Heh, yeah, it’s not quite the easiest task. It’s still fun to do, though, and animating sprites is usually pretty easy compared to animating armatures and triggering actions. Try to make sure that all of the elements in the game are similarly sized in Blender and on your sprite sheets. For example, your player might be 16x32 (16 pixels wide, 32 high), and the ball 16x16. If so, ensure that the planes for their sprites are 1x2 (Blender Units) for the player and 1x1 for the ball, or similarly sized.

thanks for the tip, iot’s what i thought i should do.
Point is that i need to check pixels size (so pixel grid size) depending on the final camera view and such…

By the way, i needed to find a good way to make a simple pass, i used some sort of movement based on getVectTo() since it get a (normalized) vector to any object :

vecttotarget = obj.getVectTo(balltarget)
vecttotarget[1][0] *=0.2
vecttotarget[1][1] *=0.2
vecttotarget[1][2] *=0

obj.position += vecttotarget[1]

I’ve been trying for a few days to figure out how to get a normalized vector manually, i’m so glad it is actually that simple.

A small update, since i’m beginning to figure out how to manage team players and interactions.

A friend of mine (who worked on this indie project : http://klakos.com/uruk/medias/screenshots/ , a massive MMO) joins me for further and way better development.

So I guess we’ll go much more object oriented python contruction, and since he worked on any aspect of his former project(they were only 3 working on such a huge project… kinda wicked), we’ll make the final game online enabled.

Sounds good. I’d like to see this made - please continue production! It sounds like you’re doing a pretty good job with it.

I also wanted to see this little football players doing the craziest things, don’t forget to keep us updated