Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

New Mode7 script / Neo Mode 7 script

Taylor

Sponsor

Jirbytaylor;199924 said:
Hmm... if the "standing up" objects have to be on the third layer that means packing trees together will be impossible. (Unless you created a packed together set in the tileset.)

But nice job! Alot better than the original, it was annoying that it rewrote basically everything- like how many frames in an autotile. x.x asdfjkl;
Scatch that. It still happens....
 
I like what you did there, MC... I was just as Mac expecting lag and maybe some improperly drawn tiles (saw three in the demo, though...), but it seems to be pretty much flawless... The only things I dislike so far are the setup (you should really do this in the script and apply the settings by the map name, e.g. if a map is called "Worldmap", apply effects [x, x, x]... ). This'd improve the game maker's overview and also keep this script from being present all the time in a game's creation progress ^_^

I'll test compatibility to my resolution script tomorrow... would be great if this'd just work without any further adjustments, wouldn't it? ^_^
 
Yeah they do

EDIT:...Now you just need to make rotation..Like doom..the original(where you can never see the other side of trees and stuff like that)....Maybe RMXP could handle that....You would just use..uh..Charasets of everything?

EDIT2: o.o The other thing i dont like is the small elevated land...It just looks flat..you need to make something to fix it

EDIT3: AND!!! (Sorry) I can't get the white line horizen to work o.o
 
Ok personally I think Mode 7 is overrated just another fluffy feature for games.

I don't really like the french variable names, pretty hard to understand for people not good in french. Note, that I don't care what the output of system is just how it is done. Maybe you could, comment your code more or translate the variable names (especially those that your abbreviated)

Code:
attr_accessor :M7
I don't really agree with this since Constants start with a capital letter and this may confuse the interpreter this also goes for the methods you created


Code:
$larg = @largeur

You aren't even using this variable, Also the use of globals are looked down upon, and you used quite a few of them. I'd give an alternative method but it will take a while because I can hardly read your code.

Code:
($1 == nil ? 0 : $1.to_i)

good but you could have just said $1.to_i :p since the value of nil.to_i is 0

Code:
(fichier.width > 96 ? true : false)
you could have just said fichier.width > 96

The above can also done with the line starting with
Code:
(dat.name2.include?("[M7]") ? true : false)

Code:
  $data_creation = [[27,28,33,34],[5,28,33,34],[27,6,33,34],[5,6,33,34],
  [27,28,33,12],[5,28,33,12],[27,6,33,12],[5,6,33,12],[27,28,11,34],
  [5,28,11,34],[27,6,11,34],[5,6,11,34],[27,28,11,12],[5,28,11,12],
  [27,6,11,12],[5,6,11,12],[25,26,31,32],[25,6,31,32],[25,26,31,12],
  [25,6,31,12],[15,16,21,22],[15,16,21,12],[15,16,11,22],[15,16,11,12],
  [29,30,35,36],[29,30,11,36],[5,30,35,36],[5,30,11,36],[39,40,45,46],
  [5,40,45,46],[39,6,45,46],[5,6,45,46],[25,30,31,36],[15,16,45,46],
  [13,14,19,20],[13,14,19,12],[17,18,23,24],[17,18,11,24],[41,42,47,48],
  [5,42,47,48],[37,38,43,44],[37,6,43,44],[13,18,19,24],[13,14,43,44],
  [37,42,43,48],[17,18,47,48],[13,18,43,48],[13,18,43,48]]

would have been better off as a constant.

Code:
  def creer_bitmap(i, deb, hauteur, largeur)
    bmp = Bitmap.new(32*(1+largeur), 32*(1+hauteur))
    rect = Rect.new(0, 0, 32, 32)
    @num_tiles.sort! {|a, b|  -(a[1] - b[1])}
    sprite = Sprite_C3.new(@viewport)
    sprite.anime = false
    sprite.liste_bmp = []
    for num in @num_tiles
      valeur = @data3[num[0], num[1]].to_i
      if valeur > 383
        bitmap = RPG::Cache.tile($game_map.tileset_name, valeur, 0)
      else
        file = (valeur / 48) - 1
        num_file = 4*file
        if !sprite.anime
          autotile_name = $game_map.autotile_names[file]
          fichier = RPG::Cache.autotile(autotile_name)
          sprite.anime = (fichier.width > 96 ? true : false)
        end
        bitmap = RPG::Cache.autotile_base(num_file, valeur)
      end
      bmp.blt(32*(num[0]-deb), 32*(num[1]-i), bitmap, rect)
    end
    sprite.liste_bmp.push(bmp)
    if sprite.anime
      for j in 1..3
        bmp = Bitmap.new(32*(1+largeur), 32*(1+hauteur))
        for num in @num_tiles
          valeur = @data3[num[0], num[1]].to_i
          if valeur > 383
            bitmap = RPG::Cache.tile($game_map.tileset_name, valeur, 0)
          else
            num_file = 4*((valeur / 48) - 1)
            bitmap = RPG::Cache.autotile_base(num_file + j, valeur)
          end
          bmp.blt(32*(num[0]-deb), 32*(num[1]-i), bitmap, rect)
        end
        sprite.liste_bmp.push(bmp)
      end
    end
    val = @data3[@num_tiles[0][0], @num_tiles[0][1]].to_i
    sprite.prio = $game_map.priorities[val]
    sprite.x_map = (deb.to_f) + bmp.width / 64
    sprite.x_map += 0.5 if largeur % 2 == 0
    sprite.y_map = (i + hauteur).to_f + 0.5
    sprite.case_y = sprite.y_map.to_i
    sprite.oy = bmp.height - 16
    sprite.ox = bmp.width / 2
    sprite.bitmap = sprite.liste_bmp[0]
    self.liste_sprites_C3.push(sprite)
    self.liste_sprites_C3_anime.push(sprite) if sprite.anime
  end

Remember to dispose of bitmaps you aren't going to need anymore for instance in that method above bmp isn't used anymore dispose it so that it can be cleared from memory.

But overall you coding style is pretty inconsistant most of the time (sometimes you use [] other times you used Array.new)

more later....
(note posting just to say good script is now spamming the topic it has been stated like 20 times already please see the archives, rules, and templates for a list of rules about posting in this forum)
 

PoLLyO

Member

has anyone else tried using the following:
Code:
$game_system.reset

i tried using it from an event and i got an error at this line of code (around line 775 i think):
Code:
@tilemap.ox = $game_map.display_x / 4

the error was:
NoMethodError occurred
undefined method "ox="

don't know if it's just me; can someone else check it out?
 
PoLLyO -> this command was completely buggy. I edited the script, so it should work now.

Trickster -> You are right. This script is awful. One reason is that some parts were written one year ago, and even for me it is difficult to understand how those parts exactly work. But I will try to rewrite the script with your advices (and with my poor english).

Cheese -> Are you sure that you can see the horizon (the $game_system.horizon's value is perhaps too high or the slant angle too small) ? I don't know how to handle small elevated lands... That's no 3D, just another way to draw the map.

BlueScope -> If I put the settings in the script, I think there will be less freedom for an user. I can perhaps combine the two systems. (My script is surely not compliant with a resolution different from 640*480, but you can modify it)
 
Dargor;200359 said:

I just tried eventing a battle system like that, and it looked incredible. Just use the change camera angle and scroll map up 5 frames fastest and it'll go right into the player's graphic. This inspired me to try out something like pokemon stadium, but that'll require a script that changes the four choice options into the top four skills. Can any one do that for me and I'll make a demo that truly shows how amazing this script can be.
I was thinking, it starts off zoomed out, and when it's your attack turn it zooms into the player, they select the attack and it zooms too the person with the fastest agility, they attack and the camera moves quickly to the victim and the animation shows. You can guess the rest ;)
This is one of the greatest scripts ever. I can now make an rmxp game that gets your adrenalin up @_@

I found one problem. If you use camera angle of 150 and walk into some trees, so they're right up against the screen, you'll see the trees in the distance over the top of the closer trees.
 

TMG07

Member

hmmmm maybe a rmxp version of Doom would be nice with this script if only you can zoom in on the character in 1st person mode.
just a thought
 
Your script just saved my ass.

I was testing the beta version of my updated shadow script, and wondered if it would be compatible with your script. I copied my script into the demo, added an event to cast the shadows, and started the game.
Well, it was working, except that I could see the light caster had a bloody shadow !
Turns out that I screwed something in my regexps, but I couldn't see it as the shadows were cast right under the source. However, your modified tileset revealed those shadows.
It wouldn't have changed a lot but would have been a source of lag.

So thanks a lot. Funnily enough, we seem to have gone through the same paths (an unknown frenchman delivering a nice script to the people here).

Keep up the good work.
 
Wonderful script, I just found one bug: I only noticed at near-horizontal angles, but the characters' display coordinates don't quite match the tiles. And the trees in the demo posted for the first version of the script disappeared / appeared incorrectly near the edge of the screen when it was set for looping.
 
MGCaladtogel;200608 said:
Trickster -> You are right. This script is awful. One reason is that some parts were written one year ago, and even for me it is difficult to understand how those parts exactly work. But I will try to rewrite the script with your advices (and with my poor english).

Heh, one of the reasons to do it right the first time. but well I know how it feels I've even looked at some of my earlier and thought what was I thinking when I did this, take a look at my signature at my Scripting Conventions Tutorial.
 
What would make this script even awesomer is if the terrain tag or something made tiles appear at different heights. That would make stuff like cliffs look really cool.
 
EmuMaster2002;201005 said:
What would make this script even awesomer is if the terrain tag or something made tiles appear at different heights. That would make stuff like cliffs look really cool.

Agreed, it would also allow for roofing on the buildings instead of just the building face; also the ability to slant tiles at different heights would be awesome.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top