In The Line Of Fire Source Code Release

This forum is for the posting of new newsposts, and it stores the site's news and comments archives. Only newsposters have access to post new news in here; if you wish to submit news, please post it in the discussion section for your particular topic. We may choose to move it here as a newspost if we find that it's worthy for the front page.
Post Reply
User avatar
PH3NOM
DC Developer
DC Developer
Posts: 576
https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
Joined: Fri Jun 18, 2010 9:29 pm
Has thanked: 0
Been thanked: 5 times

In The Line Of Fire Source Code Release

Post by PH3NOM »

Image

Hi all, long time no see! I hope everyone is doing well, especially in these crazy times here. Myself, I have never been better. Over the past three years I have had amazing success in my career and in my personal life.

As you all know, I had been working on this project In The Line Of Fire, in the attempt to release a commercial full-blown game. Obviously that never panned out, and I was unsure if I would return to development on this project, or the Dreamcast in general. By now I am certain that I will not be returning to Dreamcast development. My career has progressed to development team lead for the company I work for, with a team of about 10 developers working under me. My salary has increased by over $50k since I started with the company, as so has my time commitment and responsibilities. My girlfriend and I, whom I met when I started with the company, have since moved into a house together and we have just got an Akita puppy who is now 8 weeks old. As such, my free time to work on these type of projects has been drastically reduced, and I can see that things are not going to slow down here.

Enough rambling on. Today I am releasing the complete source code, along with all of the assets created, for In The Line Of Fire. One unfortunate reality is that I have lost the SDK I had written to compile the assets used by the engine in its current form. I will continue to see if I can recover the Google Drive account I had the SDK saved on, and if I am able to recover them I will upload to the repository and update you all here. Without the tools to create assets for the engine, there is probably not much that can be done with this. But, here you go. https://github.com/PH3NOM-PRO/in-the-line-of-fire
These users thanked the author PH3NOM for the post:
BlueCrab
|darc|
DCEmu Webmaster
DCEmu Webmaster
Posts: 16389
Joined: Wed Mar 14, 2001 6:00 pm
Location: New Orleans, LA
Has thanked: 121 times
Been thanked: 92 times
Contact:

Re: In The Line Of Fire Source Code Release

Post by |darc| »

Glad to hear you're doing well these days! Bummer that we won't see you complete this project, but thank you for everything you have done for this community, and hopefully this code can be used in other projects!
It's thinking...
cube_b3
Ex-Newsposter
Ex-Newsposter
Posts: 4045
Joined: Tue May 28, 2002 6:51 am
Location: pakistan,karachi
Has thanked: 16 times
Been thanked: 7 times
Contact:

Re: In The Line Of Fire Source Code Release

Post by cube_b3 »

Glad to hear you are doing well in life, best of luck with everything.
Really hope you find the SDK.
User avatar
Ian Robinson
DC Developer
DC Developer
Posts: 126
Joined: Mon Mar 11, 2019 7:12 am
Has thanked: 224 times
Been thanked: 45 times

Re: In The Line Of Fire Source Code Release

Post by Ian Robinson »

Glad to see your doing well i love your work thanks for releasing this :)
User avatar
Nico0020
DCEmu User with No Life
DCEmu User with No Life
Posts: 3837
Joined: Wed Oct 17, 2001 7:44 pm
Location: Fukuoka, Japan
Has thanked: 0
Been thanked: 1 time

Re: In The Line Of Fire Source Code Release

Post by Nico0020 »

Glad to hear things are really working out for you.

Thanks for releasing what you had, it all looked very impressive. Shame to hear you will be leaving the scene, but everyone moves on eventually.
Here's hoping you can recover what's left, but if not I still thank you for the release. This scene always had a problem with devs taking their ball and going home, which was always quite toxic. Cheers and good luck to wherever life takes you next.
*The Cadillac of signatures*
mad_asylum
DCEmu Newbie
DCEmu Newbie
Posts: 1
Joined: Thu Nov 01, 2018 7:16 am
Has thanked: 0
Been thanked: 0

Re: In The Line Of Fire Source Code Release

Post by mad_asylum »

Hello Ph3nom! Glad to hear you're doing well these days, i wish you more and more good things to come on you. Well you leave the DC scene its something sad but i hope new programmers or coders follow your passion on DC in future. :) I wished to improve the DC media player :D
User avatar
Anthony817
Insane DCEmu
Insane DCEmu
Posts: 132
Joined: Wed Mar 10, 2010 1:29 am
Location: Fort Worth, Texas
Has thanked: 12 times
Been thanked: 4 times

Re: In The Line Of Fire Source Code Release

Post by Anthony817 »

Wow, super happy to see you are doing better than ever old friend! I am really happy for you! :mrgreen:

Damn sucks that I am only now seeing this 2 months later! I am glad you decided to at least release the source! This is pretty fantastic! That is really unfortunate about not having the SDK. Please, keep trying to recover that old account to the Google Drive. This engine would seriously help out the community in so many levels! We could all make retail quality mods. Any chance that the game could be expanded at all with the source?
User avatar
bbmario
DCEmu Freak
DCEmu Freak
Posts: 88
Joined: Wed Feb 05, 2014 5:58 am
Has thanked: 9 times
Been thanked: 3 times

Re: In The Line Of Fire Source Code Release

Post by bbmario »

I'm learning so much from this. Thank you PH3NOM for sharing this with us and helping keep the DC homebrew spirit alive.
User avatar
RyoDC
Mental DCEmu
Mental DCEmu
Posts: 366
Joined: Wed Mar 30, 2011 12:13 pm
Has thanked: 2 times
Been thanked: 0

Re: In The Line Of Fire Source Code Release

Post by RyoDC »

I want to point out few thing with your code.
First of all, please don't take my remarks personally, this is only for your improvement.

1. General project structure.
You mixed concers everywhere project structure can be improved much.
For example, you should split concers between different modules of the game.
You should put everything related to engine in the engine folder, like low level modules related to rendering, video playback, audio, input, memory, your funny string library and whatsoever, and everything, related to the high-level stuff like the gameplay, page display, in the gameplay folder.
I'm also surprised, that all gameplay related stuff is just put into a single code file named dce-main.c, you should've splitted the concerns into modules or classes, or separate files at least.

Main.c typically should contain stuff like
int main()
{
   while(true)
  {
       initMemory();
       readInput();
       runEngine();
  }
}
and not much bigger then that.

2. Architecture.
I would suggest reading books like GoF, Game Programing Patterns and Game Engine Architecture by jason gregory at first.
http://gameprogrammingpatterns.com/contents.html
https://en.wikipedia.org/wiki/Design_Patterns
https://www.amazon.com/Engine-Architect ... 1138035459

I'm not advocating OOP, as much as I grew to dislike this approach in software engineering later these days, nevertheless, it's still a domineering approach.

Then I heavily recomment to take a look at what Entity Component system is.
https://medium.com/ingeniouslysimple/en ... c31464240d


Basically you have an Entity which is a simple integer Id and it has associated data and code containers to it, which you inject the data and code components at runtime based of the desciption in some DSL language (xml or whatever).

Basically it means you'll have different entites in your game, like MainPlayer, Enemy, MainMenu, SoundManager, GameStateManager.
You assign (dependecny inject) data containers to them, like what data would they have at runtime - for example, SoundManager will have string array with all four CDDA track paths linked to it. Enemy will have 3d model, animation graph.
Then you add code components to it - like CollisionChecker3D, EnemyAI, whatever, and of course gameplay logic script, which will read the input, state of the level, and do some appropriate actions based on it - move enemies, shoew screens, will launch music (or better delegate this call to MainLevelState component), and etc.

I also dislike code parts like:
 sprintf(str, "O\n");
		    DCE_PrintString(str, 312, 232);
		    
		    sprintf(str, "%i / %i\n", player->clip, player->ammo);					
				    
		    DCE_RenderCompileAndSubmitHeader(NULL);
		    DCE_RenderTexturedQuad2D(500, 480-32, 500 + strlen(str) * 8, 480-16, 0, 0, 0, 0, 0xD0505050);
		       
		    DCE_PrintString(str, 500, 480 - 32);
		}
		else
		{
			float x = 572,  y;
			
			if(index == 0)
			{
				y = 224 - 56;
				
                sprintf(str, "O\n");		
				DCE_PrintString(str, 312, 104);				
			}
			else
			{
				y = 480 - 56;
				
                sprintf(str, "O\n");		
				DCE_PrintString(str, 312, 344);				
			}
I understand, that it's related to UI, but it has a lot of magic constants and stuff like this should go into "data" part as much as possible, into .xml files or whatever format, which can be edited with level editor or just code-editor, whatever.

Variable naming also can be improved.

What also makes thing messy is how rendering, audio, and all systems are basically mixed into one file and one function call, concerns should really be separated.

I understand it was your hobby project, just in case you wish to imrove at craft of making games.
How do I try to build a Dreamcast toolchain:
Image
Post Reply