[FENIX] more colors

Started by MisterN, June 15, 2011, 12:31:09 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

MisterN

#45
OK, now to work on that and i think were done here. I still have to go through and debug though and learn how to play .avi files and reformat my pc (sony vegas no longer works :( ). If you have anything please share it :) Thanks

*cough*specifically placing objects*cough*

EDIT:
It seems like I can put in more lines of code but they have to be for an image or for a sound. And when I do that, I can add more lines but for example. Level will also load the mask image and levelmask will also load the levels image, thats a waste of video ram and it messes up the mask. so at the time being i have individual .map (thats what i called them) files for both of the things. I thought I could just make a .map file with this
Player(50,100);
EnemyX(260,100);
pellet(100,200);
pellet(116,200);
pellet(132,200);
pellet(148,200);

and put in the code load them but i dont know what code to use to load them and place them. Also, how can I change the .map file from within a .map file? That way once the engine is fully done I only need to worry about the .map files. Thanks. I also am going to ask if I can have some of the players actions done in the .map file itself because I have an object that I will make called "next_level" and "prev_level" and I guess I can put in the level.map code that when the player runs into it it changes its x (or y) coordinates and then it unloads everything off of the map (excluding the player) and changes the level and places everything where it should be. Any help?
werg

MisterN

So ive been looking at the wiki at these things
http://wiki.bennugd.org/index.php?title=Fgets
http://wiki.bennugd.org/index.php?title=Fputs
http://wiki.bennugd.org/index.php?title=FileHandle
http://wiki.bennugd.org/index.php?title=String
http://wiki.bennugd.org/index.php?title=Standards:function

But theres 3 main problems:
1. it doesnt show me how i have code that reads a specific line
2. it doesnt show me code on where to place things
3. it doesnt show that i can have code inside the .map file to load another .map file (for example, when the player hits an object changing the level)

remember, im trying to make the engine moddable and I know this can be done I just cant find that 1 easy answer. lol
werg

handsource-dyko

In this case, you really need to consider creating an editor and use a binary format.
You may look at the sourcecode of my malvado project, wich has an editor.

http://code.google.com/p/malvado-bennuremake/downloads/list
download the developer version, before unpacking, download all 4 of them, then start by unpacking part 1.

The developer version contains both the executable version as well as all the sources.
In order for the editor to work properly, you have to install the included "zenity" package.

One word of caution: the sources are licensed under the Gnu GPL, so if you copy-paste something literally you'll have to
copyleft your program too. There's also a manual included that describes how the file formats work.

MisterN

#48
Thanks, will there be code inside the game showing where to place stuff?
EDIT:
And what do you mean copyleft? If that means my game is 100% going to be open source then eh. I was going to make it moddable like the original doom was, people just slowly found out they could alter its contents, lol.
werg

handsource-dyko

Yes, there is code that places stuff in a level. It is a "render"routine (nothing more then a for loop that iterates over the data structure, and that creates the process instances, both the game and the editor do this).

The file "level_init_render_objects.prg" is one of them. When a level is loaded, the routines in the file "clear_levelstruct.prg" are executed first. Please refer to the development-manual in the dev-docs folder for specific details.

With copylieft I mean, that a derived work that uses routines from a gpl licensed program should also be licensed under the gpl. This is very difficult stuff, refer to the free software foundation or wikipedia about the details about opensource/free software licenses. (Basically A closed source program cannot link to a gpl library, but with lgpl/mit/bsd/zlib licenses that is possible. (Just look at the source for inspiration/ideas, and then re-implement it your own way if you keep the source of your project closed).

MisterN

#50
This game is also going to be commercial since its going to burned to disc and ready to play on the sega dreamcast.

EDIT: looked at it, eh not really what im looking for
werg

MisterN

All I need is a code that makes it so it reads that line and that line only and a code that reads the location of the objects and places them in the level, and a code for unloading everything and then loading it again for the next level, and a code that loads a .map file from within the .map file (for example, ill have the engine read it when you collide with something as next_map and in the .map file next_map would be the next file that loads) understand?
werg

handsource-dyko

It is not so diffucult to do. Before you write any code, think about the logic design and the string and file functions you can find on the wiki.
It's temptious to start coding immidiately and design while coding, but trust me, be patient and think throughly about the design. Part of this process is experimentation, you'll learn a lot more this way then by asking us for quick fixes with example code. It took me years of trying, but once I figured out the mest methode I was able to achieve my goal with improving malvado. I must admit, I've been programming with the DIV language for over 10 years. Part of that was actually learning programming in general (I also learned a few things from Pascal and C books and relating that Bennu).

MisterN

Ok ill think about the code a little more :) im sure the finishing touches wont take that long
werg