The Daily Click ::. Forums ::. Klik Coding Help ::. I need some massive help with making a level editor.
 

Post Reply  Post Oekaki 
 

Posted By Message

aphant



Registered
  18/05/2008
Points
  1242
18th September, 2008 at 12:34:37 -

I've got the basic "snap-to-grid" function down, but anything else is just difficult to design and implement. I'm going to need a lot of help in making a functioning level editor. Any code or examples would be greatly appreciated, but advice and/or pointers would be good too.

How could saving levels work? I know the best way is to use an array, but when the command to save is given how can all of the placed objects be recorded? Loaded?

I know that when changing frames (pseudoframes?) that I want it to scroll between old and new. I figure the best way to achieve this will be to add the first screen of the next frame to the "end" of the previous frame and have a hidden "next frame" trigger object. This also means that the next frame will have the last screen of the previous frame. What I'd really like to do is load the next frame's data on-demand (or real-time), so that during the scrolling when you change frames the game engine redraws the screen. Is loading in real-time feasible? If so, how can I do it?

Each level (multiple frames per level) can have only a single solid colour for the background. But, every level is connected to the other. Can the solid colour be changed in real-time? Also, music won't restart everytime the frame changes, right?

 

Don Luciano

Heavy combat pancake

Registered
  25/10/2006
Points
  380

VIP Member
18th September, 2008 at 17:17:14 -

Array is your best choice. U can use ini file to connect different arrays for different frames. Or just hold the information within one array for every lvl.

When in editor u place an object, save it's location in the array, simply use your gridrow for (x array) and grid columny (y array),(or current position divided by the size of one block). use z to add an unique number for the object. When loading make a loop, go trought each x and y of the array, if z = 0 nothing, if z = unique number then create the object and place it converting the current position of the array to the grid. Loading from the array takes some time, depending on the array size.

Having the same frame from the last frame, is not hard to do, depending on what kind of game is it, but loading takes time. U just make the next level beginning look alike the previous level ending. U can also load from the last lvl let's say 50x in the array, before jumping to next xses or new array. But u should have only one array for all the levels, since it is easier to load one array than more of them.

U can change the background color anytime during the frame. Under Storyboard controls.

 
Code me a sausage!

NeoMonkey

Finnish Army Fire Commander

Registered
  01/12/2006
Points
  243

VIP Member360 OwnerI am an April FoolPS3 Owner
18th September, 2008 at 20:40:52 -

http://www.create-games.com/download.asp?id=7108 Here's open source example of one.

 
I have proven new mathematic formula to be true...

2D > 3D

Image


aphant



Registered
  18/05/2008
Points
  1242
18th September, 2008 at 21:00:00 -

Open source? I love open source!

Downloaded, will check out later. This shall hopefully give me many insights on what to do. A great thanks!

 
   

Post Reply



 



Advertisement

Worth A Click