[FENIX/BENNU]Things I need help with

Started by MisterN, July 09, 2011, 02:24:54 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

MisterN

So I got scrolling to work, Ill figure out eventually how to change levels but this sure lightens a whole load, you dont want to know how happy this makes me. However since the dawn of the engine theres always been a problem with the mask. For example, I meant for a specific color such as blue to represent what you colide with and red what you die with. That really isnt the case anymore. The game cant detect those specific colors thus they are all treated the same. Ive tried ways of improving that and changing code but it brakes the engine. So im leaving it as is and ill leave it as being a mask. Anyways Ive always noticed everything can rub up against a wall but when you jump slightly you can go in the wall. This is the code im talking about
       // Implementation of fall.    
       ii = fall;    
       if(ii > 0)    
           while(ii != 0)  
               pixel=map_get_pixel(0, levelmask, x, y + (fall-ii) +14);
               get_rgb (pixel, & red, & green, & blue);  
               if (blue<220)  
                   ii = ii + 1;
                   falling=false;  
                   break;  
               end


but in the map_get_pixel part if you look closely, you will see an X in the perameters. add either a +6 or -6 to that and that solves the problem. The next problem is you can do one or the other. I cant have both, that doesnt work. Do you know of a way I can make it so both will work? Thanks

Also, what might you do for adding a ceiling? That one has me stumped too. I guess I can look for a tutorial onlien if there are any. lol

also, when I type something on the forum the typing window does not like to scroll in fact when I type deep enough (like this line) I have to open up notepad and type it because its much easier to just copy and paste. When I type this deep, every type sends me to the top of the page. Ive tried different browsers, pc's, its all te same. Just thought you should know.
werg

handsource-dyko


MisterN

#2

which one?
werg

handsource-dyko

jack.prg That's the gut's of the engine. Historically there was only one file for the whole game, malvado.prg.
I splitted it up in smaller files when I started improving daniel navarro's orginal game.

MisterN

That code is way way way way way way way too confusing.
werg

handsource-dyko

C or C++ programs are confusing.

Tell me, what do you find confusing about it, then I can explain things about it.
Jack.prg is part of a larger whole, and it contains several processes/rountines.
The first process jack(x,y) is what you need. Form line 89 to  233 is where most of the
buisiness happens. It also makes a call to the processes on_screen and gravity, wich
can be found in engine.prg.

Things like "stage.fpgfile" or "stage.wall" refer to struct fields, wich are loaded from a
lev file. For the internal structure of a lev file you may refer to vars-global_struct_stage.prg.

In vars-global_struct_game.prg you find all stuff about references that start with "game."




MisterN

i just have a problem wit reading and that code looked all the same nice and spiffy. i couldnt even find a mask code, i ctrl+f for it and other terms that would mean levelmask but no dice. cant you just spruce up my code for a mask so that you dont sink in on one half (look at my first post, youll find that i was able to put in either a -6 or +6 so at least on one side you dont sink in, i want that for both sides but i dont know how). i will pm you my email and then i will email you my code.
werg

handsource-dyko

Does your game use a colorpalette? I see you use get_rgb, but that is guranteed to give you problems.
Levels masks should be 8 bit 256 color palette based images, so instead of using get_rgb you can check for
a color number. That's what malvado does too. (The color values are read from the lev files). You can use
8bit images in 16 bit mode, but all 8 bit images need to use the exact same color palette. With the gimp you
can convert them to "indexed images".

MisterN

#8
Ok ive done that already. Can you email me so i can email you the game to look at? One thing I should note is unlike most people my mind thinks very differently. And When it comes to something like game programming, all I can assure you is medium/difficult tutorials = help. Ive noticed that theres a line in programming, I am in the middle, and the middle does not exist. Youve got retards and youve got A+ programmers, no Average joe. If anyone recommends that I "go to the beginning", it doesn't work that way for me. Even at school I get things a little harder, a little more "meat to the bone". So I hope you udnerstand. + I am getting good enough but theres some retarded things about programming thats for sure.

EDIT: I now have another problem. I have it fully programmed in but its not displaying at all. Why is that? That makes no sense... If you want to see, ask for it and ill send you my email so that I can email it to you. Thank you.
werg

Moogster

Couple of things, not meant offensively:

I think that on this forum you'll find that most people will gladly help out if it comes to explaining code constructions and programming principles. That means that while we'll help with the layout of your book, the chapters and storyline, you'll have to learn the language yourself.

Programming is not a spectator sport, even the smartest people learn it by doing it, and just doing it a lot.

Dr Malvado was an example program that came with DIV, meant for people to study the more advanced techniques than your average space shooter game will need. That means it is precisely what you need for your engine/game, but it might take a couple of tries to 'get' the whole thing. It is one of the more advanced examples that came with DIV.

What I mean is, if you understand how the principle works then you can make it. The part about learning the language is part of the individual learning curve of the whole programming business. Then when you're worried about your chaptering and storylining we'll always see what we can do!

(Did you manage to get it working already?)

handsource-dyko

It took me several years to turn malvado into what it is now. 10 years ago, when I was a rooky, I only changed the sprites and added more levels. Around 2003, I started tweaking it as a basis for other games. Around 2005, I did my first attempt at a level editor (wich was fenix 0.84a with gui.dll), of course that project wasn't completed, so I left it to rest until 2010!  :o

By that time Bennu had proven to be a worthy replacement for fenix and my programming skills had also evolved. Now, all the pieces fitted together. I'd had done enough filosophical thinking about how a malvado editor could work. I started by putting all the data into (nested) structs. I figured that this was the most elegant way, and it matched my skill level (still not ready for dynamic data structures with pointers though).

At first my editor concentrated only on the maps (not the backgrounds an levelmasks because I wasn't sure how to do that in a technically sane way at that point).
But shortly after I started some experiments on an additional editor, wich is designed for the backgrounds and levelmasks. It is designed to generate fpg's in the format that even the old malvado game can use. At this point they are two seperate programs, because the data structures are different. Still, I find it can be developed further, but right now I focus on improving the gui routines by adding some stuff done in Freepascal/Lazarus.

Basically what I'm trying to say, is that you have to be patient and that certain projects require a certain degree of experience.
And that projects are never finished even when the goal is pretty much achieved. Anyway I approach a project as a if it where an architectural design, this means you work from a rough concept to a finer level of detail. Programming is a lot like building a building, it requires some engineering and planning. ;)



MisterN

I got the level fully working, ceiling and all. so it will work on the dreamcast, ive decided to convince the programmer who perted it just to give me what hes got at the moment so i can finish it or give it to you guys to turn into bennu for dreamcast. I need that soon for once my engine is complete then all I have to do is finish the levels and the cutscenes. anyways
werg