Nebula X Worklog
- t0rxe
- C Programming Expert
- Posts: 139
- Joined: Dec 19, 2012
- Motto: /\OX[]
- PlayStation Model: SCPH-5502
- Location: Australia
Nebula X Worklog
[center]Nebula X - Worklog[/center]
Hi. I thought I would start a worklog on my game that I'm working on and the problems I encounter.
My previous topic can be seen here: http://www.psxdev.net/forum/viewtopic.php?f=61&t=308
Do not bother trying to play the releases after R1 in an emulator. They wont work. Use REAL hardware.
Release 1 Download (01/JUNE/2013): http://www.psxdev.net/forum/download/file.php?id=138
Here is a YouTube video showing proof of concept of the game running (Release 1).
In this old version, I used VAG audio for the title theme. Now however, I'm using a mix of XA, VAG and VB/VH.
There is a bug on the title screen in the video that shows a blue underline under the 'Press any button' image. This was because I accidentally used a background with the image still on it and not blanked out
[youtube]http://www.youtube.com/watch?v=QEOMc6hSRMA[/youtube]
I have recently coded in the use of 'malloc3'. This means that all files are pulled off of the CD-ROM and stored with a pointer in RAM. This way, once an image is copied to VRAM and initalised, I can free it from RAM, thus freeing a lot of memory for other things.
One problem I found was that I was using math based rotation for the ship sprite. A single 22x26 pixel sprite was loaded into the framebuffer and rotated every ten degrees. The problem with this was that the ship would become 'distorted' at odd angles due to the nature of software based rotation. It was decent as you can see in the video, but far from perfect. The new approach to this I thought was to use 36 sprites hand drawn from scratch and rendered in 3D software. I would like to use a 3D engine to animate and move my ships, but I think 2D will do fine for now, though I may look into it anyhow
Another difficult problem that I had to face was programming the use of a MULTITAP for support of up to 4-players. While I got it all working, you can only have two DUALSHOCK controllers vibrating at once time due to the limits of the PlayStation hardware. If you make a DUALSHOCK controller vibrate, the two motors inside draw a certain amount of current (the larger motor on the right drawing more of course). The limitation is that the PlayStation hardware can only put out a certain amount of current until a fuse blows. How much it is, I'm not sure, but a multimeter on the controller voltage line in series would find out.
I will keep this topic updated with images, problems and information as I progress
Hi. I thought I would start a worklog on my game that I'm working on and the problems I encounter.
My previous topic can be seen here: http://www.psxdev.net/forum/viewtopic.php?f=61&t=308
Do not bother trying to play the releases after R1 in an emulator. They wont work. Use REAL hardware.
Release 1 Download (01/JUNE/2013): http://www.psxdev.net/forum/download/file.php?id=138
Here is a YouTube video showing proof of concept of the game running (Release 1).
In this old version, I used VAG audio for the title theme. Now however, I'm using a mix of XA, VAG and VB/VH.
There is a bug on the title screen in the video that shows a blue underline under the 'Press any button' image. This was because I accidentally used a background with the image still on it and not blanked out
[youtube]http://www.youtube.com/watch?v=QEOMc6hSRMA[/youtube]
I have recently coded in the use of 'malloc3'. This means that all files are pulled off of the CD-ROM and stored with a pointer in RAM. This way, once an image is copied to VRAM and initalised, I can free it from RAM, thus freeing a lot of memory for other things.
One problem I found was that I was using math based rotation for the ship sprite. A single 22x26 pixel sprite was loaded into the framebuffer and rotated every ten degrees. The problem with this was that the ship would become 'distorted' at odd angles due to the nature of software based rotation. It was decent as you can see in the video, but far from perfect. The new approach to this I thought was to use 36 sprites hand drawn from scratch and rendered in 3D software. I would like to use a 3D engine to animate and move my ships, but I think 2D will do fine for now, though I may look into it anyhow
Another difficult problem that I had to face was programming the use of a MULTITAP for support of up to 4-players. While I got it all working, you can only have two DUALSHOCK controllers vibrating at once time due to the limits of the PlayStation hardware. If you make a DUALSHOCK controller vibrate, the two motors inside draw a certain amount of current (the larger motor on the right drawing more of course). The limitation is that the PlayStation hardware can only put out a certain amount of current until a fuse blows. How much it is, I'm not sure, but a multimeter on the controller voltage line in series would find out.
I will keep this topic updated with images, problems and information as I progress
"Nostalgia isn't a big enough word to describe the PlayStation from my eyes"
Hey, I like that ship
Good luck with your project.
Good luck with your project.
- CosmoGuy
- Serious PSXDEV User
- Posts: 91
- Joined: May 30, 2012
- I am a: Hell knows who I am
- PlayStation Model: SCPH-7502
- Location: Polska, Wroclaw
- Contact:
Damn nice
Very nice sketches, i love to see artwork, the more it is, the better .
This site is slowly becoming next gamedev.net but directed to psx .
Likes x 1000
Very nice sketches, i love to see artwork, the more it is, the better .
This site is slowly becoming next gamedev.net but directed to psx .
Likes x 1000
- t0rxe
- C Programming Expert
- Posts: 139
- Joined: Dec 19, 2012
- Motto: /\OX[]
- PlayStation Model: SCPH-5502
- Location: Australia
I'm just having trouble at the moment with the sprite sheet u and v coordinates.
GsSPRITE in LIBGS.H is part of a defined structure that contains u_char u, v. It is assigned to an unsigned char (u_char). A signed char gives me the -128 to 127 value, and unsigned 0 to 255, so I can't use an image greater than 255x255. I have tried to make it an integer, but it just messes the sprite up. For now, I will have to go ahead and make a 256x256 image sheet and make sure my 30x30 sprite doesn't exceed 256
GsSPRITE in LIBGS.H is part of a defined structure that contains u_char u, v. It is assigned to an unsigned char (u_char). A signed char gives me the -128 to 127 value, and unsigned 0 to 255, so I can't use an image greater than 255x255. I have tried to make it an integer, but it just messes the sprite up. For now, I will have to go ahead and make a 256x256 image sheet and make sure my 30x30 sprite doesn't exceed 256
"Nostalgia isn't a big enough word to describe the PlayStation from my eyes"
- t0rxe
- C Programming Expert
- Posts: 139
- Joined: Dec 19, 2012
- Motto: /\OX[]
- PlayStation Model: SCPH-5502
- Location: Australia
Here is the test sprite sheet. 256x256 image with 36 frames in a 30x30 grid array.
The left over room can be used for explosion animations, bullets, weapons, etc.
I have plenty of room in the framebuffer for more textures as I plan to make this game full out AWESOME
The left over room can be used for explosion animations, bullets, weapons, etc.
I have plenty of room in the framebuffer for more textures as I plan to make this game full out AWESOME
"Nostalgia isn't a big enough word to describe the PlayStation from my eyes"
-
Shendo Verified
- C Programming Expert
- Posts: 250
- Joined: Mar 21, 2012
- I am a: Programmer
- Motto: Never settle
- PlayStation Model: SCPH-7502
- Discord: ShendoXT
- Location: Croatia, EU
Nice, keep us posted. Really looking forward to seeing that ship you drew ingame.
Also, If you need a true black on your .tim files you can use bmp2tim utility from PSXSDK.
It has an option to use magic pink (255, 0, 255) as transparent so your true blacks (0, 0, 0) are preserved.
I've been using it to convert my .bmps to .tim.
Also, If you need a true black on your .tim files you can use bmp2tim utility from PSXSDK.
It has an option to use magic pink (255, 0, 255) as transparent so your true blacks (0, 0, 0) are preserved.
I've been using it to convert my .bmps to .tim.
Dev console: SCPH-7502, FreePSXBoot, CH340 serial cable.
Perhaps you mean a 10x10 grid or did I miss something?t0rxe wrote:Here is the test sprite sheet. 256x256 image with 36 frames on a 30x30 grid.
The left over room can be used for explosion animations, bullets, weapons, etc.
However, good idea of putting as many sprites as possible into a 256x256 image.
-
Shendo Verified
- C Programming Expert
- Posts: 250
- Joined: Mar 21, 2012
- I am a: Programmer
- Motto: Never settle
- PlayStation Model: SCPH-7502
- Discord: ShendoXT
- Location: Croatia, EU
I believe he meant that his sprite consists of 30x30 pixel textures.
Dev console: SCPH-7502, FreePSXBoot, CH340 serial cable.
By the way I have the same issue. I have to use a "fake" black - not less than [8,8,8] - in order to be able to "pierce" and discard the background once importing the file into TIMTOOL. Not always I am able to do an effective work, often I generate "dirty" sprites.Shendo wrote: Also, If you need a true black on your .tim files you can use bmp2tim utility from PSXSDK.
It has an option to use magic pink (255, 0, 255) as transparent so your true blacks (0, 0, 0) are preserved.
I've been using it to convert my .bmps to .tim.
I'll try using bmp2tim: it would be much easier to edit the image changing the background [0,0,0] into magenta where it must be discarded.
-
Verified
- Legendary Programmer
- Posts: 240
- Joined: Aug 13, 2012
- I am a: Programmer
- PlayStation Model: Net Yaroze
- Location: France
- Contact:
The psx can't handle texture and sprite bigger than 256x256 so you will have to deal with it.
Also, why not use the rotation feature of the sprite on the psx ? instead of making each rotation in your texture file ?
I know the rotation is not very clean on the psx, but still, it will save you a lots of vram space
Also, why not use the rotation feature of the sprite on the psx ? instead of making each rotation in your texture file ?
I know the rotation is not very clean on the psx, but still, it will save you a lots of vram space
Retro game development on Playstation and other consoles http://orionsoft.free.fr/
- t0rxe
- C Programming Expert
- Posts: 139
- Joined: Dec 19, 2012
- Motto: /\OX[]
- PlayStation Model: SCPH-5502
- Location: Australia
I was using the rotation feature in R1 (see the first YouTube video). I didn't like how it drew the ship.
Besides, I need hard sprites because how else will I animate the ship exploding
For now I have lots of free VRAM (let's hope I didn't type so soon, lol).
Besides, I need hard sprites because how else will I animate the ship exploding
For now I have lots of free VRAM (let's hope I didn't type so soon, lol).
"Nostalgia isn't a big enough word to describe the PlayStation from my eyes"
Upon collision you could make the ship start spinning fast and faster and then make it disappear (just kidding)t0rxe wrote: Besides, I need hard sprites because how else will I animate the ship exploding
-
inc^lightforce Verified
- Psy-Q Enthusiast
- Posts: 248
- Joined: Mar 07, 2013
- I am a: Programmer Windows+PS1, GFX Artist
- PlayStation Model: Black
- Location: Germany
@t0rxe
this " stand alone " Win Based Tool creates animated Explosions and other good things if you know how to use.
http://www.saschawillems.de/?page_id=253
support:
dds files and transparent png files.
many dds files can be found in DOOM 3 or QUAKE 4. open the gamefiles called .PAK with winrar and find some good DDS.
also nice playing with png files.
SHORT OVERVIEW by Sascha Willems:
So here is a quick list of the application’s features :
° Create countless different explosions. Each explosion is randomized and all important parameters can be changed
° Exports to PNG complete with an alpha channel. No more black backgrounds and additive blending for your explosions anymore. ° The result texture inlcudes a full alpha channel
° Different texture sizes (from 256×256 up to 4096×4096, depending on wether your graphics card can manage that)
° Different grid sizes for setting the number of animation frames on a texture (4×4, 8×8, 16×16)
° Use your own particle textures. Either use the included ones I made from scratch or create your own particle textures and use them
° Change the parameters. All parameters used to calculate the explosion animation can be changed to make each animation unique
° Watch your explosion within the application. After generating a texture, it’s shown in realtime together with a preview of the animation
cheers
this " stand alone " Win Based Tool creates animated Explosions and other good things if you know how to use.
http://www.saschawillems.de/?page_id=253
support:
dds files and transparent png files.
many dds files can be found in DOOM 3 or QUAKE 4. open the gamefiles called .PAK with winrar and find some good DDS.
also nice playing with png files.
SHORT OVERVIEW by Sascha Willems:
So here is a quick list of the application’s features :
° Create countless different explosions. Each explosion is randomized and all important parameters can be changed
° Exports to PNG complete with an alpha channel. No more black backgrounds and additive blending for your explosions anymore. ° The result texture inlcudes a full alpha channel
° Different texture sizes (from 256×256 up to 4096×4096, depending on wether your graphics card can manage that)
° Different grid sizes for setting the number of animation frames on a texture (4×4, 8×8, 16×16)
° Use your own particle textures. Either use the included ones I made from scratch or create your own particle textures and use them
° Change the parameters. All parameters used to calculate the explosion animation can be changed to make each animation unique
° Watch your explosion within the application. After generating a texture, it’s shown in realtime together with a preview of the animation
cheers
- t0rxe
- C Programming Expert
- Posts: 139
- Joined: Dec 19, 2012
- Motto: /\OX[]
- PlayStation Model: SCPH-5502
- Location: Australia
Thanks for the suggestions!
Currently I am having trouble with the 'freezing' of the game sprites. What I mean by that is, when I remove the controller from port 1, the game should freeze. No sprites should move whilst a message is displayed telling the user to re-connect the controller. How to freeze the sprites (all objects being drawn) I'm having trouble with. While I can get them to freeze, they slowly continue to move because eventually the drawing happens. I have tried to disable the updating of the sprites in the ordering table, but it isn't working.
Any help is appreciated (C, pseudocode... whatever)
Currently I am having trouble with the 'freezing' of the game sprites. What I mean by that is, when I remove the controller from port 1, the game should freeze. No sprites should move whilst a message is displayed telling the user to re-connect the controller. How to freeze the sprites (all objects being drawn) I'm having trouble with. While I can get them to freeze, they slowly continue to move because eventually the drawing happens. I have tried to disable the updating of the sprites in the ordering table, but it isn't working.
Any help is appreciated (C, pseudocode... whatever)
"Nostalgia isn't a big enough word to describe the PlayStation from my eyes"
-
Verified
- Extreme PSXDEV User
- Posts: 131
- Joined: Jul 17, 2013
what about BreakDraw and ContinueDraw?
-
Shendo Verified
- C Programming Expert
- Posts: 250
- Joined: Mar 21, 2012
- I am a: Programmer
- Motto: Never settle
- PlayStation Model: SCPH-7502
- Discord: ShendoXT
- Location: Croatia, EU
In your main loop segment each part like this:
If you do it like that, game will appear frozen because input and moving logic isn't running.
Code: Select all
DrawBackground();
DrawEnemies();
DrawPlayer();
if(ValidController)
{
HandleInput();
MovingCollisionEtc();
}
else
{
ConnectControllerMessage();
}
Dev console: SCPH-7502, FreePSXBoot, CH340 serial cable.
-
Verified
- Extreme PSXDEV User
- Posts: 131
- Joined: Jul 17, 2013
I've added this on inc's stars demo to test:
X freezes the screen, O resumes it... works like a charm. You can adapt it to your needs quite easily I guess
EDIT: disregard that... it works even without BreakDraw and ContinueDraw, it freezes just because it enters in a loop without executing updating functions. shendo is right
Code: Select all
PadStatus = PadRead(0);
if (PadStatus & PADRdown){
breakdraw_return_value = BreakDraw();
for(;;)
{
PadStatus = PadRead(0);
if (PadStatus & PADRright)
break;
}
ContinueDraw(breakdraw_return_value, breakdraw_return_value);
}
EDIT: disregard that... it works even without BreakDraw and ContinueDraw, it freezes just because it enters in a loop without executing updating functions. shendo is right
-
inc^lightforce Verified
- Psy-Q Enthusiast
- Posts: 248
- Joined: Mar 07, 2013
- I am a: Programmer Windows+PS1, GFX Artist
- PlayStation Model: Black
- Location: Germany
i have to check my code. i made similar like t0rxe, long time ago and had never freezing-problems with a removed and replaced Game PAD.
update soon
EDIT:
just a quick IDEA. not tested yet...
do you have a correct PAD Definition for "Pad 1" and "Pad 2" in your Source Code and have verified it?
Definition like this:
taken out from my Source Code:
update soon
EDIT:
just a quick IDEA. not tested yet...
do you have a correct PAD Definition for "Pad 1" and "Pad 2" in your Source Code and have verified it?
Definition like this:
taken out from my Source Code:
Code: Select all
if (PADstatus & Pad1x) // ---> Pad1x is "Pad 1" in Slot 1 and get noticed when "X" is pressed on PAD 1
Who is online
Users browsing this forum: Bing [Bot] and 4 guests