Looking for someone who is gifted in 2D graphics
I have developed a strategy game like Civ II but I have
no idea how to access graphic card memory
My current game runs in 320x200 MCGA and looks very dated
It is entirly written in C and I am hoping to convert to C++
Please visit my website to see screenshots and brief history
http://members.westnet.com.au/dbradshaw
or
http://www.geocities.com/suremapper
suremapper
I've made several Mods for Civ 2 and Civ 3, If you just want some simple 2D graphics to fit your spots.. then sure.. I have them,.. I'd be more than willing to give them to you, if you add my name to your credits.
Only problem I can see.. most of my graphics are 20x20 and 28x28.. and If yours is 320 x 200.,. then your squares are 8x8?
Two questions
How do you access graphics memory ?
need Address of start of memory (location of address of a 64Mb graphics card)
Any interrupts that need to be initalized for plotting
Any Assembler code like
asm{
mov colour,23 ;colour to plot
mov di,StartofVideoMemory ;plot here
mov [di],colour ;perform plot
}
or
asm{
mov cx,x ;get x coord
mov dx,y ;get y coord
mov ax,PlotMe ;set up interupt for plot
int ax ;perform plot
}
or
the following function
Plot(int x,int y,int color);
How do you access the mouse ?
the following functions
HideMouse();
ShowMouse();
GetXY(int x,int y);
This below is how I currently access 320x200 graphic memory
#include
#include
#include
#include
// address of graphic memory
#define SCREENADDR 0xa0000000L
// point to the start
char far * SCREENPTR = (char far *) SCREENADDR;
int map[8][8]={{1,1,1,1,1,1,1,1},
{1,1,1,1,1,1,1,1},
{1,3,1,1,1,1,5,1},
{1,3,1,4,4,4,5,1},
{1,3,1,1,1,1,5,1},
{1,1,1,1,1,1,5,1},
{1,1,1,6,6,6,6,1},
{1,1,1,1,1,1,1,1}};
int main(void)
{
struct REGPACK reg;
long int x,y,offset;
int i,j,color,k,m;
// change to graphic memory
reg.r_ax = 0x13;
intr(0x10, ®);
while(1){
for (i=0;i<8;i++){
for (j=0;j<8;j++){
color=map[i][j];
x=i*10;
y=j*10;
for (k=0;k<10;k++){
for (m=0;m<10;m++){
// work out postion of plot
offset=(y+m)*320+x+k;
// copy color to postion
SCREENPTR[offset]=color;
}
}
}
}
}
getch();
// return to normal
reg.r_ax = 0x2;
intr(0x10, ®);
}
Erm, you're developing for a 64MB video card and you're using assembly - bah, sorry to tell you this but you'll end up rewriting the operating systema nd all of its drivers if you do that. Each graphics card really has its own way of interacting with the video memory, and add to that the different addresses that people have on each system, the different amounts of cache, different AGP speeds. You're in for one hell of a task.
I'd suggest you use something like SDL, or if you want to go lower level try OpenGL or DirectX. There's really no need to go this low level anymore!
As Abrash has said (and I now believe it to be wholeheartedly true) you'll see further if you stand on the shoulders of giants. Which means use tools and libraries that other people have made to increase your productivity.
- Sorry for the rambling, I'm sure someone else will clarify/ramble some more. :-)
Suremapper - if you don't want to rewrite everything, you will need to use the VESA bios extensions (VBE). This will only allow you to access 4MB of video memory, which will be more than enough for what you'll be doing.
The VESA specs are available from [url]http://www.vesa.org/Public/VBE/vbe3.pdf[/url]
If you need any more help, just pm me.
Alternatively, you could follow Daemin's advice, but that wouldn't be much fun [;)]
C++ and DirectX. Unlike the Amiga and other machines,
PCs aren't closed-architecture. You'd have to support
a plethora of sound/graphics cards and even then the
code you write might not be optimal depending on the
processor. You're best off with compiled C/C++ - you
can always have a look through the generated code to
see if there is any room for optimisation.
Its has been a long time since I visited SUMEA
In fact over 6 months
I did buy BlitzPlus and spent 4 nights converting 30,000 lines of C code into Basic and then spent another few days making new sprites in 32x32 size (during 2004 Xmas holiday)
I have posted the game on BlitzCoder and waited for some response but it seems that turn based games are not really popular anymore
(or the fact my game wasnt 100% complete)
I just got into an argument about 2D pathfinding
My game used a different method to A-star
I am waiting for Civilization IV now (due November)
Hi again
I dont think I will carry on and finish the game
Reason why
Civ IV has over 30 programmers and they are working full time
Me
I am a school cleaner for Cyril Jackson High school
Perhaps if I stay at Curtin University back in 1995 and not drop out the game might of been completed
It seems that todays youth like 3D games in which they shoot at each other (quick thrill's with no strategy)
quote:Hi again
I dont think I will carry on and finish the game
Reason why
Civ IV has over 30 programmers and they are working full time
Me
I am a school cleaner for Cyril Jackson High school
Perhaps if I stay at Curtin University back in 1995 and not drop out the game might of been completed
It seems that todays youth like 3D games in which they shoot at each other (quick thrill's with no strategy)
I don't know about that! I'm a TBS fantatic also. Jagged Alliance 2 (hell yeah), HOMM, Civ, Silent Storm (New favourite)... I love these games.
Sure, Civ4 may have 30 programmers, and you'd be foolish perhaps to try and match them in scope.
Have you ever considered though that with your low level experience and tiny team (of one [:P])that platforms such as Palms, phones and portable devices might be an area in which you could excel?
Art is something that can often be slotted in at a later date.
I'd be interested to play your game (especially since I'm looking forward to doing a little TB game of my own once my overtime here ends).
Scott.
i reckon you should carry on, if you really want to break into the industry as a programmer something like this game is great for your portfolio, get your foot in the door learn the industry then maybe start off your own company, or even start a mod get a few guys together and work your way from there, dont give up because of the size and the standards of already established companies, most of them started off like you did. Keep goin hard and dedicated
hi.. (another team of 1 here)
i'd be willing to do some work with you if interested? (i've played civ3, alpha centauri, etc so i dig that scene also but mostly prefer rpg's)
i use a development tool called GAME MAKER 6.1 (full version) you may want to have a look at it if the video memory thing is a pest for you? ..i recommend it :)
Welcome Suremapper! [:D]
I like what youve done with that little game and the website etc. There should be a few people that would be willing to help you out with the 2d graphics !! Id love to, but we are pretty busy here!
Good Luck!