Forums

Sega Master System / Mark III / Game Gear
SG-1000 / SC-3000 / SF-7000 / OMV
Home - Forums - Games - Scans - Maps - Cheats - Credits
Music - Videos - Development - Hacks - Translations - Homebrew

View topic - Project Treasure SMS

Reply to topic Goto page Previous  1, 2
Author Message
  • Joined: 01 Feb 2014
  • Posts: 844
Reply with quote
Post Posted: Thu Mar 01, 2018 4:44 pm
Looks great. Not quite sure if the green palmtree bg pattern isn't a bit too busy for my taste, but that's being nitpicky.
  View user's profile Send private message
  • Joined: 28 May 2015
  • Posts: 118
Reply with quote
Post Posted: Thu Mar 01, 2018 9:08 pm
Kagesan wrote
Looks great. Not quite sure if the green palmtree bg pattern isn't a bit too busy for my taste, but that's being nitpicky.



Yeah, i was thinking i could get it into the borders, but that is not possible? So i might have to drop that. Lol
  View user's profile Send private message
  • Joined: 28 May 2015
  • Posts: 118
Reply with quote
Post Posted: Fri Mar 02, 2018 2:52 am
So i went back and took out the texture, and edited the bg color, so it's a little less dark. Much better now i think.
2018-03-01.png (29.9 KB)
2018-03-01.png
2018-03-01 (1).png (25.2 KB)
2018-03-01 (1).png

  View user's profile Send private message
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8644
  • Location: Paris, France
Reply with quote
Post Posted: Fri Mar 02, 2018 10:07 am
Nice. Me too, my first impression with the old bg pattern is that it was a glitch! I think it's neater to not have repeated backgrounds pattern with high constrasts/shapes in them.
  View user's profile Send private message Visit poster's website
  • Joined: 05 Sep 2013
  • Posts: 3758
  • Location: Stockholm, Sweden
Reply with quote
Post Posted: Fri Mar 02, 2018 12:42 pm
Orlan Rod wrote
Yeah, i was thinking i could get it into the borders, but that is not possible?


no, you can just show a solid color outside the central area (not even sure if you can change that color midframe, but anyway that would just give you horizontal solid colors areas)
  View user's profile Send private message Visit poster's website
  • Joined: 01 Feb 2014
  • Posts: 844
Reply with quote
Post Posted: Fri Mar 02, 2018 4:58 pm
Looks very good now. I really dig your visual style.
  View user's profile Send private message
  • Joined: 25 Dec 2005
  • Posts: 607
  • Location: São Paulo - Brazil
Reply with quote
Post Posted: Fri Mar 02, 2018 8:24 pm
Orlan Rod wrote
So i went back and took out the texture, and edited the bg color, so it's a little less dark. Much better now i think.


Heh the Brazilian avatar is a bit misleading :)
  View user's profile Send private message
  • Joined: 28 May 2015
  • Posts: 118
Reply with quote
Post Posted: Sat Mar 03, 2018 3:57 am
Niloct wrote
Orlan Rod wrote
So i went back and took out the texture, and edited the bg color, so it's a little less dark. Much better now i think.


Heh the Brazilian avatar is a bit misleading :)


I decided to depict a native Brazilian. Wanted to have a diverse set of characters. 8)
  View user's profile Send private message
  • Joined: 28 May 2015
  • Posts: 118
Reply with quote
Post Posted: Wed Mar 14, 2018 5:43 pm
Back with a video of progress.

So, i got a timeline and a dialog system going, which is a work in progress. Ideally for the timeline, i would like an editor just for that, but since i lack any coding knowledge that will not be possible. So i'm manually doing all the scenario scripting. The dialog system i'm going for is put on the map itself. I was debating if the phantasy star way was better, but because i want to animate the characters expressing and such and the extra artwork it would take for cutscene frames, i decided it be better to do it like a typical rpg. But what i might do is show the portrait of the character speaking, and perhaps animated too.

But anyways, here's the video. I botched the audio again though in the the recording. Going to adjust OBS settings to maximum performance next time.

https://www.youtube.com/watch?v=eJMH_NPQNpw&t=1s
  View user's profile Send private message
  • Joined: 29 Mar 2012
  • Posts: 879
  • Location: Spain
Reply with quote
Post Posted: Wed Mar 14, 2018 9:15 pm
You're really doing great progress there!! :-D Looks fantastic
  View user's profile Send private message
  • Joined: 28 Jan 2017
  • Posts: 540
  • Location: Málaga, Spain
Reply with quote
Post Posted: Wed Mar 14, 2018 9:22 pm
Good work! Its my wifi router or It seems a bit slow? or its the intro which is intentionally done this way?
  View user's profile Send private message
  • Joined: 28 May 2015
  • Posts: 118
Reply with quote
Post Posted: Wed Mar 14, 2018 10:32 pm
eruiz00 wrote
Good work! Its my wifi router or It seems a bit slow? or its the intro which is intentionally done this way?


The recording might have slowed it down, but i think you mean the captain walking to the meeting? Yes, i forgot to edit the movement speed before recording. xD
  View user's profile Send private message
  • Joined: 28 May 2015
  • Posts: 118
Reply with quote
Post Posted: Wed Mar 14, 2018 10:33 pm
kusfo wrote
You're really doing great progress there!! :-D Looks fantastic


Thanks! ^_^
  View user's profile Send private message
  • Joined: 28 May 2015
  • Posts: 118
Reply with quote
Post Posted: Sat Mar 17, 2018 10:32 pm
So i been spending time figuring out sprites xy to map scrolling. Got that working, so that will be usual for things later on. I also realized that i need to align some map tiles, so it creates the meta tiles like i want it, so fixed that part of the map. Finally, now that i have a decent amount of code, i am spending time refactoring things, like draw source.
  View user's profile Send private message
  • Joined: 28 May 2015
  • Posts: 118
Reply with quote
Post Posted: Sat May 19, 2018 8:32 pm
Hey everyone, i been busy having fun with my Arduboy (check out my game if you got one https://community.arduboy.com/t/surrog-runner-pre-release-beta/5680/20), so i haven't been working on this game for a while.

But i am picking it back up, with some changes to make it easier for me to work with. First of all, i'm simplifying the narrative for an island mystery, so i don't have to do the villages with the large amount of text. You can still find treasure in the game as you play, but i'm making it more focused on being a survival-rogue like.

Here is some screenshots. I redid the player sprite, so it's bigger. The body is streamed in, so i can have lots of animation and have the head independent for facial expressions.Also redid some island tiles.
2018-05-17.png (299.18 KB)
ss1
2018-05-17.png
2018-05-17 (1).png (268.56 KB)
ss2
2018-05-17 (1).png

  View user's profile Send private message
  • Joined: 30 Jun 2016
  • Posts: 194
  • Location: Melbourne, Australia
Reply with quote
Post Posted: Sun May 20, 2018 3:31 am
Admittedly, I personally feel that the sand texture used is a bit too rough to use. It's difficult to discern environmental objects from the sand itself.
As well as the fact it looks much rougher than sand should be.

If it's annoying to make out interactive objects from the ground texture, it's probably too rough for interactive objects to run over on!
  View user's profile Send private message Visit poster's website
  • Joined: 28 May 2015
  • Posts: 118
Reply with quote
Post Posted: Sun May 20, 2018 7:46 pm
Flygon wrote
Admittedly, I personally feel that the sand texture used is a bit too rough to use. It's difficult to discern environmental objects from the sand itself.
As well as the fact it looks much rougher than sand should be.

If it's annoying to make out interactive objects from the ground texture, it's probably too rough for interactive objects to run over on!


Sure, i can make the sand less rough if you're having trouble distinguishing it from none sand. But as for interactive objects, its up to the player to explore and find out what they can interact with, using the tools they brought with them in the bag. I'm not going to hold the player's hand.
  View user's profile Send private message
  • Joined: 28 Jan 2017
  • Posts: 540
  • Location: Málaga, Spain
Reply with quote
Post Posted: Mon May 21, 2018 5:58 am
Nice! It seems interesting... An island? Full of treasures? Wanting to check the Game!
  View user's profile Send private message
  • Joined: 28 May 2015
  • Posts: 118
Reply with quote
Post Posted: Tue May 29, 2018 8:12 pm
New video up on my Youtube. I'm testing collision in this one, but i have updated the size of their heads too, for facial expressions.

https://t.co/BgRzmoHBq4
  View user's profile Send private message
  • Joined: 05 Sep 2013
  • Posts: 3758
  • Location: Stockholm, Sweden
Reply with quote
Post Posted: Wed May 30, 2018 8:35 am
it's very nice! are you using preloaded animation tiles or are you loading them on-the-fly from ROM?
  View user's profile Send private message Visit poster's website
  • Joined: 28 Jan 2017
  • Posts: 540
  • Location: Málaga, Spain
Reply with quote
Post Posted: Wed May 30, 2018 5:32 pm
Nice graphics for sure!
  View user's profile Send private message
  • Joined: 28 May 2015
  • Posts: 118
Reply with quote
Post Posted: Wed May 30, 2018 9:54 pm
sverx wrote
it's very nice! are you using preloaded animation tiles or are you loading them on-the-fly from ROM?


The body animations are loaded on the fly, as i was planning to do a ton of animation for each action. Although, it's looking like i can't have too much code in the function, without exceeding memory when compiling. So effectually, i have to reduce my animation scope. 8P
  View user's profile Send private message
  • Joined: 05 Sep 2013
  • Posts: 3758
  • Location: Stockholm, Sweden
Reply with quote
Post Posted: Thu May 31, 2018 8:03 am
aren't you using paging?
animations can be stored on separate ROM banks than your code...
  View user's profile Send private message Visit poster's website
  • Joined: 28 May 2015
  • Posts: 118
Reply with quote
Post Posted: Thu May 31, 2018 7:17 pm
sverx wrote
aren't you using paging?
animations can be stored on separate ROM banks than your code...


This is the animation code.


    if (p1.pDir == 1){ //down

        SMS_mapROMBank(midledf1__tiles__bin_bank);
        if (PL_IDLE && p1.fIndex == 0) SMS_loadTiles(midledf1__tiles__bin,320,midledf1__tiles__bin_size);//idle
        if (PL_IDLE && p1.fIndex > 0) p1.fIndex = 0;
        if (PL_WALK && p1.fIndex == 0) SMS_loadTiles(mwalkdf1__tiles__bin,320,mwalkdf1__tiles__bin_size);//walk f1
        if (PL_WALK && p1.fIndex == 1) SMS_loadTiles(midledf1__tiles__bin,320,midledf1__tiles__bin_size);//f2
        if (PL_WALK && p1.fIndex == 2) SMS_loadTiles(mwalkdf2__tiles__bin,320,mwalkdf2__tiles__bin_size);//f3
        if (PL_WALK && p1.fIndex == 3) SMS_loadTiles(midledf1__tiles__bin,320,midledf1__tiles__bin_size);//f4
        if (PL_WALK && p1.fIndex > 3) p1.fIndex = 0;
        if (PL_REST && p1.fIndex == 0) SMS_loadTiles(mpickupdf1__tiles__bin,320,mpickupdf1__tiles__bin_size);//rest
        if (PL_SLEEP && p1.fIndex == 0) SMS_loadTiles(msleepupf1__tiles__bin,320,msleepupf1__tiles__bin_size);//sleep
        if (PL_SLEEP && p1.fIndex > 0) p1.fIndex = 0;
        if (PL_STRIKE && p1.fIndex < 2) SMS_loadTiles(mstrikedf1__tiles__bin,320,mstrikedf1__tiles__bin_size);//strike
        if (PL_STRIKE && p1.fIndex == 2){

          p1.pAct = 1;
          p1.pBAnim = 1;
          p1.fIndex = 0;

        }

        if (p1.pBAnim == 12) SMS_addSprite(p1.pX, p1.pY+16,352);




    }else if (p1.pDir == 2){//left

        SMS_mapROMBank(midlelf1__tiles__bin_bank);
     
        if (PLAYER_IDLE && p1.fIndex == 0) SMS_loadTiles(midlelf1__tiles__bin,320,midlelf1__tiles__bin_size);//idle
        if (PLAYER_IDLE && p1.fIndex > 0) p1.fIndex = 0;
        if (PLAYER_WALK && p1.fIndex == 0) SMS_loadTiles(mwalklf1__tiles__bin,320,mwalklf1__tiles__bin_size);//walk f1
        if (PLAYER_WALK && p1.fIndex == 1) SMS_loadTiles(midlelf1__tiles__bin,320,midlelf1__tiles__bin_size);//f2
        if (PLAYER_WALK && p1.fIndex == 2) SMS_loadTiles(mwalklf2__tiles__bin,320,mwalklf2__tiles__bin_size);//f3
        if (PLAYER_WALK && p1.fIndex == 3) SMS_loadTiles(midlelf1__tiles__bin,320,midlelf1__tiles__bin_size);//f4
        if (PLAYER_WALK && p1.fIndex > 3) p1.fIndex = 0;
        if (PLAYER_REST && p1.fIndex == 0) SMS_loadTiles(mpickuplf1__tiles__bin,320,mpickuplf1__tiles__bin_size);//rest
        if (PLAYER_SLEEP && p1.fIndex == 0) SMS_loadTiles(msleepupf1__tiles__bin,320,msleepupf1__tiles__bin_size);//sleep
        if (PLAYER_SLEEP && p1.fIndex > 0) p1.fIndex = 0;
        if (PLAYER_STRIKE && p1.fIndex < 2) SMS_loadTiles(mstrikelf1__tiles__bin,320,mstrikelf1__tiles__bin_size);//strike
        if (PLAYER_STRIKE && p1.fIndex >= 2){
           
        if (p1.pBAnim == 12) SMS_addSprite(p1.pX-8, p1.pY,353);

    }else if (p1.pDir == 3){//up

        SMS_mapROMBank(midleuf1__tiles__bin_bank);
        if (PLAYER_IDLE && p1.fIndex == 0) SMS_loadTiles(midleuf1__tiles__bin,320,midleuf1__tiles__bin_size);//idle
        if (PLAYER_IDLE && p1.fIndex > 0) p1.fIndex = 0;
        if (PLAYER_WALK && p1.fIndex == 0) SMS_loadTiles(mwalkuf1__tiles__bin,320,mwalkuf1__tiles__bin_size);//walk f1
        if (PLAYER_WALK && p1.fIndex == 1) SMS_loadTiles(midleuf1__tiles__bin,320,midleuf1__tiles__bin_size);//f2
        if (PLAYER_WALK && p1.fIndex == 2) SMS_loadTiles(mwalkuf2__tiles__bin,320,mwalkuf2__tiles__bin_size);//f3
        if (PLAYER_WALK && p1.fIndex == 3) SMS_loadTiles(midleuf1__tiles__bin,320,midleuf1__tiles__bin_size);//f4
        if (PLAYER_WALK && p1.fIndex > 3) p1.fIndex = 0;
        if (PLAYER_REST && p1.fIndex == 0) SMS_loadTiles(mpickupuf1__tiles__bin,320,mpickupuf1__tiles__bin_size);//rest
        if (PLAYER_SLEEP && p1.fIndex == 0) SMS_loadTiles(msleepupf1__tiles__bin,320,msleepupf1__tiles__bin_size);//sleep
        if (PLAYER_SLEEP && p1.fIndex > 0) p1.fIndex = 0;
        if (PLAYER_STRIKE && p1.fIndex < 2) SMS_loadTiles(mstrikeuf1__tiles__bin,320,mstrikeuf1__tiles__bin_size);//strike
        if (PLAYER_STRIKE && p1.fIndex >= 2){

          p1.pAct = 1;
          p1.pBAnim = 1;
          p1.fIndex = 0;

        }

        if (p1.pBAnim == 12) SMS_addSprite(p1.pX+8, p1.pY-8,355);

    }else if (p1.pDir == 0){//right

        SMS_mapROMBank(midlerf1__tiles__bin_bank);
        if (PLAYER_IDLE && p1.fIndex == 0) SMS_loadTiles(midlerf1__tiles__bin,320,midlerf1__tiles__bin_size);//idle
        if (PLAYER_IDLE && p1.fIndex > 0) p1.fIndex = 0;
        if (PLAYER_WALK && p1.fIndex == 0) SMS_loadTiles(mwalkrf1__tiles__bin,320,mwalkrf1__tiles__bin_size);//walk f1
        if (PLAYER_WALK && p1.fIndex == 1) SMS_loadTiles(midlerf1__tiles__bin,320,midlerf1__tiles__bin_size);//f2
        if (PLAYER_WALK && p1.fIndex == 2) SMS_loadTiles(mwalkrf2__tiles__bin,320,mwalkrf2__tiles__bin_size);//f3
        if (PLAYER_WALK && p1.fIndex == 3) SMS_loadTiles(midlerf1__tiles__bin,320,midlerf1__tiles__bin_size);//f4
        if (PLAYER_WALK && p1.fIndex > 3) p1.fIndex = 0;
        if (PLAYER_REST && p1.fIndex == 0) SMS_loadTiles(mpickuprf1__tiles__bin,320,mpickuprf1__tiles__bin_size);//rest
        if (PLAYER_SLEEP && p1.fIndex == 0) SMS_loadTiles(msleepupf1__tiles__bin,320,msleepupf1__tiles__bin_size);//sleep
        if (PLAYER_SLEEP && p1.fIndex > 0) p1.fIndex = 0;
        if (PLAYER_STRIKE && p1.fIndex < 2) SMS_loadTiles(mstrikerf1__tiles__bin,320,mstrikerf1__tiles__bin_size);//strike
        if (PLAYER_STRIKE && p1.fIndex >= 2){

          p1.pAct = 1;
          p1.pBAnim = 1;
          p1.fIndex = 0;

        }

        if (p1.pBAnim == 12) SMS_addSprite(p1.pX+16, p1.pY,354);

    }


And here is the bat file

@echo off
assets2banks assets --compile
@if %errorlevel% NEQ 0 goto :EOF

echo Build Main
sdcc -c -mz80 main.c
@if %errorlevel% NEQ 0 goto :EOF

echo Linking
sdcc -o output.ihx -mz80 --data-loc 0xC000 -Wl-b_BANK2=0x8000 -Wl-b_BANK3=0x8000 --no-std-crt0 crt0_sms.rel main.rel SMSlib.lib PSGlib.rel bank2.rel bank3.rel

@if %errorlevel% NEQ 0 goto :EOF
ihx2sms output.ihx output.sms
  View user's profile Send private message
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14685
  • Location: London
Reply with quote
Post Posted: Thu May 31, 2018 8:05 pm
You need to make it driven by data, not code. Make a structure holding the data pointers and animation information for each state, and then the code just needs to work with that data instead of using all the conditions.

Also it will probably produce smaller, faster code to avoid the redundant checks. Switch on the player state, then in each case switch again on the frame index. But having it be data driven will be fastest and smallest.
  View user's profile Send private message Visit poster's website
  • Joined: 28 May 2015
  • Posts: 118
Reply with quote
Post Posted: Thu May 31, 2018 11:20 pm
Maxim wrote
You need to make it driven by data, not code. Make a structure holding the data pointers and animation information for each state, and then the code just needs to work with that data instead of using all the conditions.

Also it will probably produce smaller, faster code to avoid the redundant checks. Switch on the player state, then in each case switch again on the frame index. But having it be data driven will be fastest and smallest.


I'm not sure how it would replace the conditions. What would be an small example of doing this in data driven fashion? I tried using switches to replace my if-else statements, but it increases my code size.
  View user's profile Send private message
  • Joined: 05 Sep 2013
  • Posts: 3758
  • Location: Stockholm, Sweden
Reply with quote
Post Posted: Fri Jun 01, 2018 8:07 am
first of all: you're using ROM banking, good! :)

about what Maxim said, the point is that your code would be much shorter and smaller if you use some variable (for example p1.fIndex) as an index of arrays instead of testing its value with a bunch of 'if' statements.

for instance, you can make your hero walk down using something like

SMS_loadTiles(walkdownframe[p1.fIndex], 320, walkdownframe_size[p1.fIndex]);


walkdownframe and walkdownframe_size would be the (constant) arrays that contains the data you need to pass to SMS_loadTiles() function.

then, expanding on this, you'll see that you would probably have 4 pair of arrays, one for each of the 4 directions, and that you could instead have a single array with two indices, something like

walkframe[direction, frame]
walkframe_size[direction, frame]


(also, if your animation frames are all the same size, you can replace completely walkframe_size[] array with a single constant, but that's something only you know...)
  View user's profile Send private message Visit poster's website
  • Joined: 28 May 2015
  • Posts: 118
Reply with quote
Post Posted: Fri Jun 01, 2018 4:13 pm
sverx wrote
first of all: you're using ROM banking, good! :)

about what Maxim said, the point is that your code would be much shorter and smaller if you use some variable (for example p1.fIndex) as an index of arrays instead of testing its value with a bunch of 'if' statements.

for instance, you can make your hero walk down using something like

SMS_loadTiles(walkdownframe[p1.fIndex], 320, walkdownframe_size[p1.fIndex]);


walkdownframe and walkdownframe_size would be the (constant) arrays that contains the data you need to pass to SMS_loadTiles() function.

then, expanding on this, you'll see that you would probably have 4 pair of arrays, one for each of the 4 directions, and that you could instead have a single array with two indices, something like

walkframe[direction, frame]
walkframe_size[direction, frame]


(also, if your animation frames are all the same size, you can replace completely walkframe_size[] array with a single constant, but that's something only you know...)


Oh yeah, i see how that can work. Awesome. I'll get to doing those changes then. Thanks!
  View user's profile Send private message
  • Joined: 28 May 2015
  • Posts: 118
Reply with quote
Post Posted: Sun Jul 29, 2018 8:39 pm
Hey all, i'm back with an update.

Testing the swim action. Yet to apply variation to all char based on their stats.

https://youtu.be/zrsSh18PBEc
  View user's profile Send private message
  • Joined: 29 Mar 2012
  • Posts: 879
  • Location: Spain
Reply with quote
Post Posted: Mon Jul 30, 2018 7:30 am
Progress is looking amazing!
  View user's profile Send private message
Reply to topic Goto page Previous  1, 2



Back to the top of this page

Back to SMS Power!