-(SideSkroller)- GameKit (v0.2)

Bookmark the official site for updates: http://www.freewebs.com/sideskroller

Comment in the official site, and in this thread.

Welcome fellow humans! Welcome to the -(SideSkroller)- game kit! I hope you all find something usefull in the fully featured game kit I’m creating. First off I would like to say I’m still avidly busy on tCoL so not much time will be spend each day developing the kit. Which is why I’m going to make in an open project AFTER I get 1.0 released.

Right now I only have the basic controls of Kreate-a-Map done.

I hope you all enjoy! Don’t forget the read the ReadMe file prior to running the demo.

0.2 released! Now it has a GUI (sorta) and you can place 3 types of terrain objects. Up next terrain recoloring and enemies!

I STILL HAVE THIS PYTHON PROBLEM BELOW VVVVV
EDIT:: I need some python gurus to answer a quick question. I tried using BlendEnzo’s save script to save the location of the tiles, but here’s the problem. If I hit P and click spawn 1 square, save, delete square, and then load it works. Now if I make 2 squares, save, delete them, and then load it only loads the first one. Is there a way to save all objects locations in scene?

Download 0.2:: http://www.freewebs.com/sideskroller/KaM%200.2.blend
Download 0.1(BETA):: http://www.savefile.com/files/1761244

(Skreenshot below)

Attachments


Version 0.2 released!!!

Did anyone find this useful? I need suggestions for future updates.

that’s pretty cool!!

Glad you like it!

How can I use slopes instead of cubes?

That looks pretty spiffy, remindes me of the mario world editor I used to have on my calculator.

Are you sure you want to do it all in logic though? That logic is going to get messy sometime soon.

I made this file (attached) about a week back experimenting with mouse control in python.
It is actually a lot like what you made, placing blocks, although it is all in python. Have a look at it and I recommend you try converting your file over to python.

For the file attached:
LMB - Spawn box
RMB - Click and hold to drag box
MMB - remove box
UP key - increase life of box
DOWN key - decrease life of box (0 = infinite)

Attachments

boxes.blend (145 KB)

I’ll check it out. I’m not very good at python, if you want you can join my dev team and donate scripts and such for sideskroller. I hope when it’s done to have a huge engine. BTW can you answer my python problem I stated?

F5 = Tile
F6 = Left Slope
F7 = Right Slope

I can answer you question,
Its because Cube is instanced so when you use
cube = GameLogic.getCurrentScene().getObjectList()[“OBCube”]
Its probably just taking the first OBCube it can see (or the last).

I can convert you file to python if you want.

This looks great, I would love to download it and fiddle with it, but I’ve been super busy. Keep up the progress, I’ll find some time for it this weekend, or once you come out with those features you listed in the screenshot. This looks exciting! I want to see how you do the “Kreate a Map”. I’ll have to look later. Adios!

-Rozzy

The problem with the save is that you only have one cube being saved at a time.

What I would do is make a list, and every time a cube is added, add it to the list, then save the position of every object in the list, not just ‘OBcube’ because that is only one object.

would I have to manually add in each cube. Or could I save all objects in scene?

@Rozzy: This is Kreate a Map… It’s working… The features aren’t all done yet. But I’m not done yet…

I’m getting ready to release 1.0!!! I now have a working full GUI. And a bunch more sprites. Now you can spawn enemies and change their AI. You can make them hostile, mild, or normal.

nice
blendenzo allraedy made one :slight_smile:
http://blenderartists.org/forum/showthread.php?t=86314

Made what? This is a level editor, and a kit to making a complete sidescroller. This is going to have a demo game and files with tutorials how to put the files into your game.

Back to the save issue. I have a tip for you.

Every time a cube gets added from the edit object actuator it is added to the end of this list: GameLogic.getCurrentScene.getObjectList().

How can you make use of this tip?

Make a variable to store this for easy access.

objects = GameLogic.getCurrentScene.getObjectList()

Now heres something nifty. When you add a cube you can easily define it and store it in a list like this:

cubes = []
if cube is being added:
    GameLogic.addActiveActuator(spawn_cube, 1)
    objects = GameLogic.getCurrentScene.getObjectList()
    objects.reverse()
    cubes.append(objects[0])

(Note how I define objects after I added the cube, that is an important thing right there)

So when you save use a for loop like this:

for i in range(0, len(cubes)):
    saveing_function(cubes<i>.getPosition())

I know that python isn’t a strong point for you so I’ve written out some explanations of what the code does. If you come across something you don’t understand head here and hit ctrl+F and search for it (You might want to bookmark that page because it is great for python syntax reference).

cubes = [ ]
if cube is being added:
    GameLogic.addActiveActuator(spawn_cube, 1)
    objects = GameLogic.getCurrentScene.getObjectList()
    objects.reverse()
    cubes.append(objects[0])
cubes = [ ]

This is defining a new variable ‘cubes’ as a list.

objects.reverse()

This takes our ‘objects’ variable which is a list and reverses it, so the item that was last on the list is now the first one.

cubes.append(objects[0])

This adds a new item onto the end of our ‘cubes’ list, that item being the first item in the ‘objects’ list which just happens to be the cube that was just added to your scene.

Now for the ‘for loop’.

for i in range(0, len(cubes)):

This is what defines the for loop, the ‘i’ will become our variable that is defined each time the loop is run. The loop is being run through a range of numbers those numbers being 0 to the amount of items in the list ‘cubes’.

saveing_function(cubes[i].getPosition())

Do what you usually do when you save using ‘cubes[i].getPosition()’ the [i] refers to an item in the list. If i was 2 it would call the [I]third item in the list (remember python counts from 0).

I hope this can resolve your saving issue.

Edit:
Back on that script I defined a variable ‘cubes’ well that wont work too well because it will be re written every time the logic tic’s, so use this instead:

if not hasattr(GameLogic, 'cubes'):
    GameLogic.cubes = [ ]

And everytime I referred to cubes, use GameLogic.cubes. This is also a good thing because now you can access that list from any scene and any script.

Thanks a million!

I am the master of all block-land! Stupid blocks will do as I say! :mad:


damnit, stop smiling.

Lol, hahhaha

Having fun?

:confused: Cool, I guess. It would be nice if you could add animated sprites for characters.

peace,
-nick