Show off your graphics!
Moderators: Bob the Hamster, marionline, SDHawk
- Bob the Hamster
- Liquid Metal King Slime
- Posts: 7460
- Joined: Tue Oct 16, 2007 2:34 pm
- Location: Hamster Republic (Ontario Enclave)
- Contact:
Here is what I am working on at the moment
<object width="500" height="313"><param name="allowfullscreen" value="true"><param name="allowscriptaccess" value="always"><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id= ... =0"><embed src="http://vimeo.com/moogaloop.swf?clip_id= ... y=0&loop=0" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="500" height="313"></embed></object>
I am re-using some of the scripts from Bell of Chaos for this. I wanted to work on a platformer with more traditional combat, since after re-playing Bell of Chaos, I remembered how frustrating it is to try and kill enemies.
This is still very much a work in progress.
Also, I am reminded of how much i hate doing maptiles. :P
<object width="500" height="313"><param name="allowfullscreen" value="true"><param name="allowscriptaccess" value="always"><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id= ... =0"><embed src="http://vimeo.com/moogaloop.swf?clip_id= ... y=0&loop=0" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="500" height="313"></embed></object>
I am re-using some of the scripts from Bell of Chaos for this. I wanted to work on a platformer with more traditional combat, since after re-playing Bell of Chaos, I remembered how frustrating it is to try and kill enemies.
This is still very much a work in progress.
Also, I am reminded of how much i hate doing maptiles. :P
- Meowskivich
- Blubber Bloat
- Posts: 2199
- Joined: Tue Mar 06, 2012 12:38 am
- Location: Earth
- Contact:
- sheamkennedy
- Liquid Metal Slime
- Posts: 1110
- Joined: Mon Sep 16, 2013 9:29 pm
- Location: Tama-shi, Tokyo, Japan
- Contact:
That's so awesome! How did you do the parallax? Is it just a background slice that moves along with the screen focus as the maptiles slide by?Bob the Hamster wrote:Here is what I am working on at the moment
⊕ P E R S O N A L M U S I C: https://open.spotify.com/album/6fEo3fCm5C3XhtFRflfANr
â� C O L L A B M U S I C: https://dustpuppets.bandcamp.com/releases
â� C O L L A B M U S I C: https://dustpuppets.bandcamp.com/releases
- Bob the Hamster
- Liquid Metal King Slime
- Posts: 7460
- Joined: Tue Oct 16, 2007 2:34 pm
- Location: Hamster Republic (Ontario Enclave)
- Contact:
Thanks!
I designated map layer 0 and 1 to be parallax layers on every map.
When the map first loads, I loop through the maptiles and find the bottom-most right-most non-zero tile. I use that to calculate how big the parallax layer will be.
Then in my script that runs every tick to update the camera, I get the slice handles for those two map layers and adjust their x and y position based on the camera position.
Here is the script that I use to detect the size of a parallax layer
I store the size in the width and height of an invisible slice container.
here is the camera updating script:
Note that if you wanted to do this just for one map, and didn't mind hard-coding the size of the parallax layers, you could eliminate the first script entirely, and make the second script noticeably simpler.
I designated map layer 0 and 1 to be parallax layers on every map.
When the map first loads, I loop through the maptiles and find the bottom-most right-most non-zero tile. I use that to calculate how big the parallax layer will be.
Then in my script that runs every tick to update the camera, I get the slice handles for those two map layers and adjust their x and y position based on the camera position.
Here is the script that I use to detect the size of a parallax layer
Code: Select all
script, get parallax size, para, layer, begin
variable(x, y, tile, found, fy)
found := false
for(y, map height -- 1, 0, -1) do(
for(x, 0, map width -- 1) do(
tile := read map block(x, y, layer)
if(tile <> 0) then(
fy := y
set slice height(para, (y + 1) * 20)
found := true
break
)
)
if(found) then(break)
)
found := false
for(x, map width -- 1, 0, -1) do(
for(y, 0, fy) do(
tile := read map block(x, y, layer)
if(tile <> 0) then(
set slice width(para, (x + 1) * 20)
found := true
break
)
)
if(found) then(break)
)
end
here is the camera updating script:
Code: Select all
script, update camera, sl, begin
variable(x, y)
x := slice edge x(sl, edge:center)
y := slice edge y(sl, edge:bottom) -- 20
put camera(x -- 160, y -- 100)
# Update parallax layers
variable(i, layer, para, layer sl, mapw, maph, screenw, screenh)
screenw := slice width(sprite layer)
screenh := slice height(sprite layer)
for(i, 0, 1) do(
para := slice child(parallaxen, i)
if(i == 0) then(layer sl := lookup slice(sl:map layer 0))
else if(i == 1) then(layer sl := lookup slice(sl:map layer 1))
mapw := map width * 20
maph := map height * 20
set slice x(layer sl, (camera pixel x * (mapw -- slice width(para)) / large(1, mapw -- screenw)))
set slice y(layer sl, (camera pixel y * (maph -- slice height(para)) / large(1, maph -- screenh)))
)
end
While I like these new graphics, I did prefer the previous ones, because I really liked the details. However, if you can draw these much faster than the previous ones and that leads to greater variety, then I suppose that for me personally the net effect will be better.sheamkennedy wrote:After watching some inspiring videos I decided to go for a much more minimal graphical style. It's taking me way less time to draw maptiles now and I think it's surprisingly better looking than what I was doing prior to this. Thoughts?
Cool; I know that I can look forward to this.Bob the Hamster wrote:Here is what I am working on at the moment
The high walking speed and animation is the most noticeable thing for me. At least I thought it reminded me of Super Metroid, but I see its mechanics are a bit different. Actually, the walking animation doesn't match the walking speed (which I'm sure is actually very common), and that's why it stuck out at me.
You can use "break(2)" to jump out of two nested loops. "continue(x)" also works. (Previously I even allowed jumping out of a variable number of loops, but since realised what a terrible idea that was). Also, I'm amused to see that your script is resolution independent.Bob the Hamster wrote:Here is the script that I use to detect the size of a parallax layer
Last edited by TMC on Sat Jan 04, 2014 1:10 pm, edited 1 time in total.
- Bob the Hamster
- Liquid Metal King Slime
- Posts: 7460
- Joined: Tue Oct 16, 2007 2:34 pm
- Location: Hamster Republic (Ontario Enclave)
- Contact:
Oh, awesome! This feature is undocumented. I remember wondering if that feature existed, but after examining the entries in the plotscripting dictionary, decided it didn't.TMC wrote:You can use "break(2)" to jump out of two nested loops. "continue(x)" also works. (Previously I even allowed jumping out of a variable number of loops, but since realised what a terrible idea that was). Also, I'm amused to see that your script is resolution independent.Bob the Hamster wrote:Here is the script that I use to detect the size of a parallax layer
The walking speed is probably a little too high right now, but it is nice for getting around while I am debugging things but have not implemented save/load yet.
I'll probably lower the default walking speed a bit, but add some kind of Boots of Speed equipable item for faster movement. I might even draw separate running animation sprites
Don't hold out any hope for getting the walking animation to synch with actual movement speed. If that happens it will just be luck :)
Last edited by Bob the Hamster on Sat Jan 04, 2014 2:07 pm, edited 1 time in total.
Opps.
I think that acceleration in platformers work well when you don't notice it, because there is a separate "starting to run" "animation" (which might just be differing frame times). Which implies that accelerating to full speed takes only the length of the animation, usually a few ticks. Sonic is the only commercial platformer I can think of where your character looks like its sliding around.
I think that acceleration in platformers work well when you don't notice it, because there is a separate "starting to run" "animation" (which might just be differing frame times). Which implies that accelerating to full speed takes only the length of the animation, usually a few ticks. Sonic is the only commercial platformer I can think of where your character looks like its sliding around.
- Bob the Hamster
- Liquid Metal King Slime
- Posts: 7460
- Joined: Tue Oct 16, 2007 2:34 pm
- Location: Hamster Republic (Ontario Enclave)
- Contact:
<object width="500" height="313"><param name="allowfullscreen" value="true"><param name="allowscriptaccess" value="always"><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id= ... =0"><embed src="http://vimeo.com/moogaloop.swf?clip_id= ... y=0&loop=0" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="500" height="313"></embed></object>
I love making enemy ai. I think it is probably my favorite thing about this project so far.
Making those damn ladder-ramps work correctly? My least favorite thing. Thank goodness they are done, and I shouldn't have to mess with them anymore!
I love making enemy ai. I think it is probably my favorite thing about this project so far.
Making those damn ladder-ramps work correctly? My least favorite thing. Thank goodness they are done, and I shouldn't have to mess with them anymore!
Last edited by Bob the Hamster on Thu Jan 09, 2014 5:05 am, edited 1 time in total.
- Meowskivich
- Blubber Bloat
- Posts: 2199
- Joined: Tue Mar 06, 2012 12:38 am
- Location: Earth
- Contact:
Shootin' petals, reminds me of those flowers from Yoshi's Island (which I used to know the names of, but I forget. I guess I'll look next time I play Tetris Attack)Bob the Hamster wrote:<object width="500" height="313"><param name="allowfullscreen" value="true"><param name="allowscriptaccess" value="always"><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id= ... =0"><embed src="http://vimeo.com/moogaloop.swf?clip_id= ... y=0&loop=0" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="500" height="313"></embed></object>
I love making enemy ai. I think it is probably my favorite thing about this project so far.
Making those damn ladder-ramps work correctly? My least favorite thing. Thank goodness they are done, and I shouldn't have to mess with them anymore!
Thanks! ^.^BMR wrote:That's not a bad idea actually.SparElric wrote:Maybe there should be a "show off your scripts" thread. XD
Piranha plant?Meowskivich wrote:Shootin' petals, reminds me of those flowers from Yoshi's Island (which I used to know the names of, but I forget. I guess I'll look next time I play Tetris Attack)
EDIT: Oh wait! Do you mean those flowers with the yellow balls for petals that Yoshi can eat and make eggs out of?!
Last edited by Sparoku on Thu Jan 09, 2014 10:42 am, edited 1 time in total.
"One can never improve enough nor should one stop trying to improve."
- Meowskivich
- Blubber Bloat
- Posts: 2199
- Joined: Tue Mar 06, 2012 12:38 am
- Location: Earth
- Contact:
- sheamkennedy
- Liquid Metal Slime
- Posts: 1110
- Joined: Mon Sep 16, 2013 9:29 pm
- Location: Tama-shi, Tokyo, Japan
- Contact:
Last edited by sheamkennedy on Thu Jan 09, 2014 9:25 pm, edited 1 time in total.
⊕ P E R S O N A L M U S I C: https://open.spotify.com/album/6fEo3fCm5C3XhtFRflfANr
â� C O L L A B M U S I C: https://dustpuppets.bandcamp.com/releases
â� C O L L A B M U S I C: https://dustpuppets.bandcamp.com/releases
- Bob the Hamster
- Liquid Metal King Slime
- Posts: 7460
- Joined: Tue Oct 16, 2007 2:34 pm
- Location: Hamster Republic (Ontario Enclave)
- Contact: