Previous Thread
Next Thread
Print Thread
Rate This Thread
Hop To
Page 2 of 3 1 2 3
#4497870 - 11/21/19 09:25 PM Re: 70 weeks of intense self-learning [Re: MarkG]  
Joined: Apr 2000
Posts: 1,123
Scott Elson Offline
Member
Scott Elson  Offline
Member

Joined: Apr 2000
Posts: 1,123
Hunt Valley, MD, USA
I learned how to do calculations with matrices in college but after I got out usually I'm calling existing functions/methods so I've forgotten most of what's under the hood. Quaternions didn't come onto my radar until well after college and the only time I usually need them is when some middleware call is expecting them. Again there's usually a call I can make to convert from what I'm used to them.

Here's a fun bit of math I've used a number of times. I'll give a summary of what, I did as opposed to full on formulas, but if you need more details let me know and I'll flesh it out more fully.

So often I've had AIs following a series of waypoints. These guys will have a velocity and a maximum standard turn rate. Generally when following waypoints you want to stay on the line between them, we'll call that a waypath. That means that when you start your turn this line will be tangent to the turning circle you'll be creating. We'll say the distance remaining to the waypoint you're heading to when you start this turn is X. So given a particular speed and a fixed turn rate you can compute the circumference of the circle by taking (360/(turn rate in deg/sec)) * (speed in units / sec). From there you can determine the radius (R) with the ever popular C= 2 * pi * R -> R = C / (2 * pi). As mentioned the point where you start this turn is tangential to your turning circle so the line from the center of the circle to this point, that has a distance of R, is perpendicular to the waypath so you can create a right triangle using the points of the center of the circle, the point where you start your turn and the waypoint the AI is heading towards. You also know the next waypoint you're heading to after this one so you can compute that angle. If you take half of that you get the angle from the waypath the AI is currently on and the line from the waypoint it's heading towards the center of the circle. So this means you have a right triangle where you know the distance of one side (R) and two of the angles of the triangle, one being 90 degrees. From there you can solve for X, at what distance the AI should be from its next waypoint before it starts its turn. Assuming no conditions change then you only need to calculate this once on your way to the next waypoint. The point at which the AI will intercept the next waypoint path will be the same distance from the waypoint (now the starting waypoint for this path) of X. If for some reason you need a smaller circle, for example the next waypath is short or there's an obstacle that would get in the way of your turn, you can always slow down (or turn faster if that's an option).

I hope this makes sense.

Elf

Inline advert (2nd and 3rd post)

#4497988 - 11/22/19 08:56 PM Re: 70 weeks of intense self-learning [Re: MarkG]  
Joined: Dec 2003
Posts: 11,220
MarkG Offline
Veteran
MarkG  Offline
Veteran

Joined: Dec 2003
Posts: 11,220
The Bayou
Scott, I understand your terminology and overall concept, but would have no clue how to code it. dizzy But just wait until next year at this time...

Hey man, I'm ecstatic that you're reading and even participating on my thread. cheers This is the way I wish I could have done it years ago, but didn't have the time and motivation.

++++++++++

I'm going to make a couple of schedule changes as I'm feeling confident right now that I can knock out those larger math books in one term each (10 weeks). The reason (besides a clear calender after the holidays) is that I'm going through the ACT math sections quicker than expected since I've recently covered the same math. In fact, those basic college math textbooks don't frighten me as much as they did just a couple of months ago (except the Physics book's final chapters on Quantum Mechanics and Nuclear Physics...lol...going to give it a shot anyway).

I want to be upfront about how I'm covering the math books...

I read each section completely and follow the examples on paper. At the end of each section I work out about half of the odd-numbered problems. I always do the first two (the easiest) and the last two (the hardest), then any in-between that I'm interested in. If I breeze through the four mandatory problems, I move on. If not, I continue with more odd-numbers until I get it, or I try the same type of problem in another textbook. I DO NOT skip any of the odd-numbered problems in the chapter review tests. For the high school math review, I'm only doing the chapter review tests (50 in total from 3 books). If I have difficulty, I'll cover the chapter.

Many of my books repeat the same material but from a different author's perspective. I've arranged each subject from easiest to hardest, as far as I can tell.

When the math and programming become really difficult I'm going to show some of my work and probably ask for help and opinions.



The rusty wire that holds the cork that keeps the anger in
Gives way and suddenly it’s day again
The sun is in the east
Even though the day is done
Two suns in the sunset, hmph
Could be the human race is run
#4527731 - 06/27/20 10:40 PM Re: 70 weeks of intense self-learning [Re: MarkG]  
Joined: Dec 2003
Posts: 11,220
MarkG Offline
Veteran
MarkG  Offline
Veteran

Joined: Dec 2003
Posts: 11,220
The Bayou
Well, the "70 weeks" got blown to hell, but I'm back on it with a better understanding of time requirements and exactly what I'm wanting to accomplish. A final Game Dev book should arrive on Monday (why I'm working from the second listing), along with an 1942: PAW Strategy Guide (the Fleet Defender one has been a fun read).

At the end of the year I want all "C"s (with maybe a couple more "H"s)...

[Linked Image]

[Linked Image]

[Linked Image]

[Linked Image]

Attached Files Course_01.jpgCourse_02.jpgCourse_03.jpgCourse_04.jpg


The rusty wire that holds the cork that keeps the anger in
Gives way and suddenly it’s day again
The sun is in the east
Even though the day is done
Two suns in the sunset, hmph
Could be the human race is run
#4527734 - 06/27/20 11:23 PM Re: 70 weeks of intense self-learning [Re: MarkG]  
Joined: Dec 2003
Posts: 11,220
MarkG Offline
Veteran
MarkG  Offline
Veteran

Joined: Dec 2003
Posts: 11,220
The Bayou
From Gunny Motivation, I'll go ahead and post this here as well as it shows the categories (each totaling 8 hours per week except electives)...

[Linked Image]

One thing I've learned is that it's best to cover the more difficult subjects such as math and programming accumulatively, with shorter daily study periods spanning over a week, not trying to cover a subject in one full day per week.

++++++++++

Any assembly programmers here, these are my admittedly puny notes thus far:



CPU Memory Address Bus Widths
=============================
16-bit -> 64KB (65,536 bytes).
20-bit -> 1MB (1,048,576 bytes).
32-bit -> 4GB (4,294,967,296 bytes).


CPU Memory Access Models for 80386+
===================================
Real Mode Flat Model: 64K using 16-bit registers.
Real Mode Segmented Model: 64K segments along 1MB using 2 16-bit registers for
20-bit addresses.
Protected Mode Flat Model: 4GB using 32-bit registers.


16-bit General Purpose and Stack Pointer Registers
==================================================
Registers AX, BX, CX and DX can be divided into two separate 8-bit registers:
AX -> [AH/AL], BX -> [BH/BL], CX -> [CH/CL], DX -> [DH,DL].

?H = Higher 8-bit (MSB or Most Significant Byte).
?L = Lower 8-bit (LSB or Least Significant Byte).

Note: Only BX may contain a segment address offset and address memory data [].

AX (AH/AL): General purposes and math results.
BX (BH/BL): General purposes and indexing. Upper half concatenation with CX for a
32-bit count value.
CX (CH/CL): General purposes and counting. Byte count value of loaded file. Lower
16-bit half concatenation of BX and CX for a 32-bit count value.
DX (DH/DL): General purposes.

BP: General purposes, holding offsets and indexing.
SI: General purposes, source in data-movement operations.
DI: General purposes, destination in data-movement operations.

SP: Stack Pointer (points to next push in stack).


16-Bit Segment and Instruction Pointer Registers
================================================
Note: Available only in Real Mode Segmented Model, otherwise controlled by OS. May
be loaded from general purpose registers only, not immediate data or memory.
Can not be used for bitwise logical instructions (AND, OR, XOR, NOT).

DS = Data Segment address.
ES = Extra (spare) Segment address (386+ may include alphabetical clones FS and GS).
SS = Stack Segment address: Defines beginning of stack. SS:SP starts at the opposite
(top) end of allocated stack space and moves downwards to SS (see SP above).
CS = Code Segment address. CS:IP points to next instruction (see IP below).

IP = Instruction Pointer: Points to next machine instruction to be executed.


Real Mode Segmented Model and Addresses
=======================================
Simulates the 64K-limited Real Mode Flat Model by accessing up to 1MB of memory in
64K-sized (max.) segments. There are 65,536 segment starting slots spaced 16 bytes
apart (65,536 x 16 = 1,048,576). 2 16-bit registers are combined (segment:offset) to
define a 20-bit address along a 32-bit address bus as shown in examples below:

CS:IP (code segment:instruction pointer): address of next machine instruction.
CS:BX (code segment:general purpose): optional code segment address offset.
DS:SI (data segment:source index]: data segment address offset.
ES:DI (extra [spare] segment:destination index): spare segment address offset.
SS:SP (stack segment:stack pointer): address of next push in stack (LIFO buffer).
SS:BP (stack segment:base pointer): optional stack segment address offset.

0002:000D = 0:002D (decimal equivalent of 32 [2 x 16] + 13 or byte location 45).
073F:00FD (decimal equivalent of 29,680 + 253 or byte location 29,933).


Segment and General Purpose Register Assumptions
================================================
Instruction MOV assumes segment DS, except for SP and BP which assume segment SS:
MOV AX,[BX] assumes MOV AX,DS:[BX].
MOV [SI],DX assumes MOV DS:[SI],DX.
MOV [SP],DX assumes MOV SS:[SP],DX (may not be overridden).

Assumptions when executing string (contiguous sequence of bytes) instructions:
Source: DS:SI (Source Index, may not be overridden).
Destination: ES:DI (Destination Index, may not be overridden).
Length: CX (Counter), length of string.
Data coming from source string to destination string must pass through AX.

To override segment register assumptions:
MOV CS:[SI],AX overrides DS:[SI], MOV AX,ES:[BX] overrides AX,DS:[BX].


8-bit Flags Register and MS-DOS' DEBUG Symbology
================================================
Flag Name Set Clear

OF Overflow flag OV NV
DF Direction flag DN UP
IE Interrupt enable flag EI DI
SF Sign flag NG PL
ZF Zero flag ZR NZ
AF Auxiliary carry flag AC NA
PF Parity flag PE PO
CF Carry flag CY NC

E* = Extended 32-bit register for 32-bit Protected Mode Flat Model
(i.e. AX = EAX, SP = ESP, FLAGS = EFLAGS).


Illegal MOV Instructions Corrected
=========================================================================
MOV 17,1 Only one operand may be immediate data. MOV AX,17
MOV 17,BX Only the source operand may be immediate data. MOV BX,17
MOV CX,DH The operands must be the same size. MOV BL,DH
MOV [DI],[SI] Only one operand may be memory data. MOV [DI],SI
MOV DI,DX:[BX] DX is not a segment register. MOV DI,ES:[BX]
MOV ES,0B800 Seg. reg. may not be loaded from immed. data. MOV ES,DX
MOV DS,CS Only one operand may be a segment register. MOV DS,AX
MOV [AX],BP AX, CX and DX may not address memory data. MOV [BX],BP
MOV SI,[CS] Segment registers may not address memory data. MOV SI,CS


DOS and BIOS Software Interrupts
================================
0:0000-0:03FF: Interrupt vector table (256 entries x 4 bytes ea., 1,024 bytes).
INT 21H: DOS services dispatcher. AH: Service function. INT/(automatic IRET[urn])
pushes/pops next instruction address to/from Stack, also with CALL/RET(urn).


DOS Interrupt Call (09H Print String)
=====================================
mov DX,Msg ; Mem data ref without [] loads ADDRESS of string!
mov AH,09H ; Function 09H displays text (address from DX) to standard output.
int 21H ; INT 21H makes the call into DOS.

mov AX,04C00H ; Exits program (load 4CH [terminate process] into AH, 0 into AL).
int 21H ; Returns control to DOS, places AL into ERRORLEVEL DOS variable).


BIOS VIDEO Interrupt Call (10H), Service 2
==========================================
mov DX,[TextPos] ; TextPos contains X,Y (DL/DH) cursor position values.
call GotoXY ; Position cursor.
mov DX,Msg ; Load offset of Msg string into DX
call Write ; and display it.

GotoXY:
mov AH,02H ; Select VIDEO service 2: Position cursor.
mov BH,0 ; Stay with display page 0.
int 10H ; Call VIDEO.
ret ; Return to the caller.


BIOS VIDEO Interrupt Call (10H), Service 6
==========================================
Example 1:
mov CX,0422H ; Set upper-left corner to X=22H; Y=04H (CL/CH).
mov DX,093AH ; Set lower-right corner to X=3AH; Y=09H (DL/DH).
call ClrWin ; Call the ClrWin procedure, bypassing ClrScr.

Example 2:
mov CX,0422H ; Set upper-left corner to X=22H; Y=04H (CL/CH).
mov DX,093AH ; Set lower-right corner to X=3AH; Y=09H (DL/DH).
mov AL,01H ; Set to scroll window by one line.
call ScrlWin ; Call the ScrlWin procedure, bypassing ClrScr and ClrWin.

ClrScr:
mov CX,0 ; Upper left corner of full screen.
mov DX,LRXY ; Load lower-right XY coordinates (max. 79x24 [184FH]).
ClrWin:
mov AL,0 ; # of lines to scroll window (0 clears entire region).
ScrlWin:
mov BH,07H ; Specify "normal" attribute for blanked line(s).
VIDEO6:
mov AH,06H ; Select VIDEO service 6: Initialize/Scroll.
int 10H ; Call VIDEO.
ret ; Return to the caller.


Base-Indexed-Displacement Addressing
====================================
Addressing memory using three-part sum for serving two-level lookup tables such as:

MOV AX, [BX+DI+27]

BX (Base): Address of larger table.
DI (Index): Offset of sub-table within larger table.
27 (Displacement): Fixed distance between start of sub-table and addressed data.

Base register may be only BP or BX, index register may be only SI or DI.


IMUL (Integer Multiplication)
=============================
One operand must be in AL (for 8-bit) or AX (for 16-bit).
Product destination is AX (16-bit [+/- 32767]) or AX:DX (32-bit [+/- 2147483648])
with higher-order 16-bits in DX. Product larger than operands sets CF and OF.

==========

80x86 Integer Opcodes (alphabetical)
====================================
AAA - ASCII adjust after addition
AAD - ASCII adjust AX before division
AAM - ASCII adjust AX after multiplication
AAS - ASCII adjust AL after subtraction
ADC - Add with carry
ADD - Integer addition
AND - Logical AND
ARPL - Adjusted Requested Privilege Level of selector
BOUND - Array index bound check
BSF - Bit scan forward
BSR - Bit scan reverse
BSWAP - Byte swap
BT - Bit test
BTC - Bit test with compliment
BTR - Bit test with reset
BTS - Bit test and set
CALL - Call subroutine
CBW - Convert byte to word
CDQ - Convert double to quad
CLC - Clear carry
CLD - Clear direction flag
CLI - Clear interrupt flag
CLTS - Clear task switched flag
CMC - Complement carry flag
CMP - Compare
CMPS - Compare string (byte, word or doubleword)
CMPXCHG - Compare and exchange
CPUID - CPU identification
CWD - Convert word to doubleword
CWDE - Convert word to extended doubleword
DAA - Decimal adjust AL after addition
DAS - Decimal adjust AL after subtraction
DEC - Decrement
DIV - Unsigned divide
ENTER - Make stack frame for procedure parameters
ESC - Escape
HLT - Halt CPU
IDIV - Signed integer division
IMUL - Signed multiply
IN - Input byte or word from port
INC - Increment
INS - Input string from port (byte, word or doubleword)
INT - Interrupt
INTO - Interrupt on overflow
INVD - Invalidate data cache
INVLPG - Invalidate translation look-aside buffer (TLB) entry
IRET - Interrupt return
IRETD - Interrupt return
Jcc - Jump on condition code (Jump Instructions Table below)
JMP - Unconditional jump
LAHF - Load register flags into AH
LAR - Load access rights
LDS - Load far pointer
LEA - Load effective address
LEAVE - Restore stack for procedure exit
LES - Load far pointer
LFS - Load far pointer
LGDT - Load Global Descriptor Table
LGS - Load far pointer
LLDT - Load Local Descriptor Table
LOCK - Lock bus
LODS - Load string (byte, word or doubleword)
LOOP - Decrement CX and loop if CX not zero
LOOPE/LOOPZ - Loop while equal / loop while zero
LOOPNZ/LOOPNE - Loop while not zero / loop while not equal
LIDT - Load Interrupt Descriptor Table
LMSW - Load Machine Status Word
LSL - Load segment limit
LSS - Load far pointer
LTR - Load task register
MOV - Move data
MOVS - Move string (byte, word or doubleword)
MOVSX - Move with sign extend
MOVZX - Move with zero extend
MUL - Unsigned multiply
NEG - Two's complement negation
NOP - No operation
NOT - One's compliment negation (Logical NOT)
OR - Inclusive logical OR
OUT - Output data to port
OUTS - Output string to port (byte, word or doubleword)
POP - Pop word off stack
POPA/POPAD - Pop all registers onto stack
POPF/POPFD - Pop flags off stack
PUSH - Push word onto stack
PUSHA/PUSHAD - Push all registers onto stack
PUSHF/PUSHFD - Push flags onto stack
RCL - Rotate through carry left
RCR - Rotate through carry right
REP - Repeat string operation
REPE/REPZ - Repeat while equal / repeat while zero
REPNE/REPNZ - Repeat while not equal / repeat while not zero
RET/RETF - Return from procedure
ROL - Rotate left
ROR - Rotate right
SAHF - Store AH register into flags
SAL - Shift arithmetic left
SAR - Shift arithmetic right
SBB - Subtract with borrow / carry
SCAS - Scan string (byte, word or doubleword)
SETCC - Set byte on condition
SGDT - Store Global Descriptor Table
SHL - Shift logical left
SHLD - Double precision shift left
SHR - Shift logical right
SHRD - Double precision shift right
SIDT - Store Interrupt Descriptor Table
SLDT - Store Local Descriptor Table
SMSW - Store Machine Status Word
STC - Set carry flag
STD - Set direction flag
STI - Set interrupt flag (enable interrupts)
STOS [opt. B,W,D] - Store string (byte, word or doubleword)
STR - Store task register
SUB - Subtract
TEST - Test for bit pattern (logical compare)
UD2 - Undefined instruction
VERR - Verify read
VERW - Verify write
WAIT - Wait for coprocessor
WBINVD - Write-back and invalidate data cache
XADD - Exchange and add
XCHG - Exchange
XLAT/XLATB - Translate
XOR - Exclusive OR


Jump Instructions Table
=======================
Mnemonic Meaning Jump Condition
-------- ------- --------------
JA Jump if Above CF=0 and ZF=0
JAE Jump if Above or Equal CF=0
JB Jump if Below CF=1
JBE Jump if Below or Equal CF=1 or ZF=1
JC Jump if Carry CF=1
JCXZ Jump if CX Zero CX=0
JE Jump if Equal ZF=1
JG Jump if Greater (signed) ZF=0 and SF=OF
JGE Jump if Greater or Equal (signed) SF=OF
JL Jump if Less (signed) SF != OF
JLE Jump if Less or Equal (signed) ZF=1 or SF != OF
JMP Unconditional Jump unconditional
JNA Jump if Not Above CF=1 or ZF=1
JNAE Jump if Not Above or Equal CF=1
JNB Jump if Not Below CF=0
JNBE Jump if Not Below or Equal CF=0 and ZF=0
JN Jump if Not Carry CF=0
JNE Jump if Not Equal ZF=0
JNG Jump if Not Greater (signed) ZF=1 or SF != OF
JNGE Jump if Not Greater or Equal (signed) SF != OF
JNL Jump if Not Less (signed) SF=OF
JNLE Jump if Not Less or Equal (signed) ZF=0 and SF=OF
JNO Jump if Not Overflow (signed) OF=0
JNP Jump if No Parity PF=0
JNS Jump if Not Signed (signed) SF=0
JNZ Jump if Not Zero ZF=0
JO Jump if Overflow (signed) OF=1
JP Jump if Parity PF=1
JPE Jump if Parity Even PF=1
JPO Jump if Parity Odd PF=0
JS Jump if Signed (signed) SF=1
JZ Jump if Zero ZF=1


I never thought I'd appreciate how much higher-level C programming really is! dizzy



The rusty wire that holds the cork that keeps the anger in
Gives way and suddenly it’s day again
The sun is in the east
Even though the day is done
Two suns in the sunset, hmph
Could be the human race is run
#4527737 - 06/27/20 11:28 PM Re: 70 weeks of intense self-learning [Re: MarkG]  
Joined: Mar 2001
Posts: 16,208
Nixer Offline
Scaliwag and Survivor
Nixer  Offline
Scaliwag and Survivor
Veteran

Joined: Mar 2001
Posts: 16,208
Living with the Trees
More power to ya Mark.

I got a headache just looking at the POI.



"There's a sucker born every minute."
Phineas Taylor Barnum

#4528278 - 07/01/20 05:50 PM Re: 70 weeks of intense self-learning [Re: MarkG]  
Joined: Dec 2003
Posts: 11,220
MarkG Offline
Veteran
MarkG  Offline
Veteran

Joined: Dec 2003
Posts: 11,220
The Bayou
Maybe Unity/Blender is in my future (nothing Autodesk post-2000), but old-school nostalgia gives me the warm fuzzies...

XOR'ing out a register to clear it because it's somehow faster than simply assigning a value of zero, using bit-shifting to multiply (or divide) by powers of two because actual math functions are too slow without a math coprocessor, always using integers vs. floats when possible. Lol.



The rusty wire that holds the cork that keeps the anger in
Gives way and suddenly it’s day again
The sun is in the east
Even though the day is done
Two suns in the sunset, hmph
Could be the human race is run
#4536171 - 09/07/20 06:16 PM Re: 70 weeks of intense self-learning [Re: MarkG]  
Joined: Dec 2003
Posts: 11,220
MarkG Offline
Veteran
MarkG  Offline
Veteran

Joined: Dec 2003
Posts: 11,220
The Bayou
I feel like, in some small way, that I'm reliving game dev history (1990 to 1995). My material covers the transition from ASM to C to C++, at the same time from DOS to Windows.

I've completed all but one of my DOS-based game dev books. Although I haven't been able to compile most of the code examples (usually Borland), executables are always supplied so it's still possible to follow and run the example code. It's been fascinating how games are constructed, especially the timeline of my books (from pure ASM [insanely difficult and nerve-racking] to a little inline ASM in C [mostly for speedier pixel and math functions], to all C/C++).

This week I'll finish my last C book which includes a nice intro to C++ at the end of each chapter, and then it's all C++. I've been typing the exercises in plain DOS EDIT (under DOSBox) and compiling with Open Watcom for DOS (vs. using a dedicated IDE w/auto features and correction). This forces me not to get careless and to understand what I'm doing, especially for exercises with multiple source files. My only debugging is rudimentary warning and error messages when linking/compiling, but so far it's been enough. Thankfully, all examples and exercises in my C/C++ books have complied fine under Open Watcom for DOS.

Just my opinion, but for anyone wanting to learn C/C++ fundamentals without any heavy studio/IDE overhead, try Open Watcom (DOS version) under DOSBox. I've had no problem compiling C/C++ 16-bit and 32-bit DOS programs under current Win10, or even with using the 32-bit Windows IDE version of Open Watcom.



The rusty wire that holds the cork that keeps the anger in
Gives way and suddenly it’s day again
The sun is in the east
Even though the day is done
Two suns in the sunset, hmph
Could be the human race is run
#4536209 - 09/08/20 12:55 AM Re: 70 weeks of intense self-learning [Re: MarkG]  
Joined: Dec 2003
Posts: 11,220
MarkG Offline
Veteran
MarkG  Offline
Veteran

Joined: Dec 2003
Posts: 11,220
The Bayou
Final thought as my vacation comes to an end (was mending from multiple dental procedures)...

Nov 1, F-19 begins. And this time I know what I'm doing.
Will once again get web hosting to post regular progress/source.
Failure not an option.



The rusty wire that holds the cork that keeps the anger in
Gives way and suddenly it’s day again
The sun is in the east
Even though the day is done
Two suns in the sunset, hmph
Could be the human race is run
#4536213 - 09/08/20 01:37 AM Re: 70 weeks of intense self-learning [Re: MarkG]  
Joined: Mar 2001
Posts: 16,208
Nixer Offline
Scaliwag and Survivor
Nixer  Offline
Scaliwag and Survivor
Veteran

Joined: Mar 2001
Posts: 16,208
Living with the Trees
Way to hang in there mark.



"There's a sucker born every minute."
Phineas Taylor Barnum

#4536253 - 09/08/20 12:06 PM Re: 70 weeks of intense self-learning [Re: MarkG]  
Joined: Feb 2001
Posts: 2,620
mikew Offline
Senior Member
mikew  Offline
Senior Member

Joined: Feb 2001
Posts: 2,620
UK
I love these updates as I'd like to do something like this if I didn't have to work.

While I totally get the retro angle in using Open Watcom on Dosbox, you could get a similar effect with Notepad and the Windows SDK.

#4536255 - 09/08/20 12:12 PM Re: 70 weeks of intense self-learning [Re: mikew]  
Joined: Apr 2001
Posts: 112,628
PanzerMeyer Offline
Pro-Consul of Florida
PanzerMeyer  Offline
Pro-Consul of Florida
King Crimson - SimHQ's Top Poster

Joined: Apr 2001
Posts: 112,628
Miami, FL USA
Originally Posted by mikew
if I didn't have to work.

.



Yup. That's a big advantage Mark has that most of us here don't. wink


“Whoever fights monsters should see to it that in the process he does not become a monster. And if you gaze long enough into an abyss, the abyss will gaze back into you.”
#4536302 - 09/08/20 06:24 PM Re: 70 weeks of intense self-learning [Re: MarkG]  
Joined: Dec 2003
Posts: 11,220
MarkG Offline
Veteran
MarkG  Offline
Veteran

Joined: Dec 2003
Posts: 11,220
The Bayou
Nixer, no one inspires me on this board like you do! cheers

++++++++++

mikew, I prefer an emulated DOS environment because my books, until now, have assumed pure DOS (with the last two introducing the unpopular WinG). DOS compiling has so little overhead and CPU registers are named/function as expected using the segment:offset memory model. Most C/C++ exercises are single-page source, so after compiling on the C-prompt you have only 3 files (source .C/.CPP, .OBJ and .EXE). Even game dev exercises don't include any Windows baggage.

But from here on out it's C++/DirectX which unfortunately assumes VS6 (which I have), although I'm going to try to complete with Watcom Win32 first (without MFC). For game math and standalone AI exercises (all in C++), I'm sticking with Watcom DOS.

++++++++++

PM, you make a good point, although I thought half of SimHQ posters were already retired old_simmer. I owe my wife a debt of gratitude for, once again, sponsoring my dreams. When your own mother is constantly reminding you to appreciate just how lucky you are... I do, mom. I do. yep



The rusty wire that holds the cork that keeps the anger in
Gives way and suddenly it’s day again
The sun is in the east
Even though the day is done
Two suns in the sunset, hmph
Could be the human race is run
#4536445 - 09/09/20 06:09 PM Re: 70 weeks of intense self-learning [Re: MarkG]  
Joined: Feb 2001
Posts: 2,620
mikew Offline
Senior Member
mikew  Offline
Senior Member

Joined: Feb 2001
Posts: 2,620
UK
As it was a bit of a quiet day, I downloaded the DOS Open Watcom package to see what the fuss was about.
Works great! All the DOS and Win32 examples I tried compiled and ran OK.
In the Win32 case, it was compiled on Dosbox and run in Wine.

I couldn't get the DirectX examples to compile apart from the DINPUT one, but they were written in 2004 and I had the June 2010 DirectX SDK.
That's the only downside really. You may not be able to harness the full power of a GTX3090 from DOS due to planned obsolescence by Microsoft and Nvidia. wink

#4536462 - 09/10/20 01:37 AM Re: 70 weeks of intense self-learning [Re: MarkG]  
Joined: Dec 2003
Posts: 11,220
MarkG Offline
Veteran
MarkG  Offline
Veteran

Joined: Dec 2003
Posts: 11,220
The Bayou
cool

BTW, I'm still a fan of Blitz3D (now free and open source)...

BLEAK BETA 1.0 - ATMOSPHERICS - STAMINA - Blitz3D...


https://www.youtube.com/watch?v=FG7L9XO6ae4

...and I'll be using it for prototyping and initial stages, porting to C++ as I go.



The rusty wire that holds the cork that keeps the anger in
Gives way and suddenly it’s day again
The sun is in the east
Even though the day is done
Two suns in the sunset, hmph
Could be the human race is run
#4536465 - 09/10/20 02:31 AM Re: 70 weeks of intense self-learning [Re: MarkG]  
Joined: Oct 2012
Posts: 573
Fittop Offline
Member
Fittop  Offline
Member

Joined: Oct 2012
Posts: 573
US
Congratulations, MarkG! I am impressed.
As an old man, permit me to remind you in those dark nights when frustration over a math problem hits, that math is just another language and learning it main mission is that it teaches you to think better.
Enjoy the learning! it will always come in handy.
Again, Congratulations and Good Luck!

#4536488 - 09/10/20 11:20 AM Re: 70 weeks of intense self-learning [Re: MarkG]  
Joined: Apr 2001
Posts: 112,628
PanzerMeyer Offline
Pro-Consul of Florida
PanzerMeyer  Offline
Pro-Consul of Florida
King Crimson - SimHQ's Top Poster

Joined: Apr 2001
Posts: 112,628
Miami, FL USA
Originally Posted by MarkG

PM, you make a good point, although I thought half of SimHQ posters were already retired :


It's certainly an older demographic here at SimHQ but not that much older! biggrin


“Whoever fights monsters should see to it that in the process he does not become a monster. And if you gaze long enough into an abyss, the abyss will gaze back into you.”
#4536511 - 09/10/20 02:22 PM Re: 70 weeks of intense self-learning [Re: MarkG]  
Joined: Dec 2003
Posts: 11,220
MarkG Offline
Veteran
MarkG  Offline
Veteran

Joined: Dec 2003
Posts: 11,220
The Bayou
No no, PM. Not so much older age, but early retirement from smarter living. smile

What I have going for me is that I'm simple, as I often remind my Mrs... "All's I need is an old PC, a stash of Costco sardines, and some occasional lovin's." biggrin I don't care about not having my neighbor's toys, except that I still drive a 2008 Honda Element (purchased new and paid off early, so many years ago). I usually don't replace/upgrade anything until it breaks, including my flip phone and a couple of 20" tube televisions with VCRs. smile

++++++++++

Thanks, Fittop. Other than lots of trigonometry, the trickiest math so far has been multiplying matrices (4x4...x,y,z + 1), iterating groups of vertices (translating, scaling, rotating) around each object's origin (so dealing with multiple coordinate systems). But that's what middleware engines make much easier (Unity, Unreal, AGK, etc.).

And I still love using Blitz3D (DX7) because it runs so smoothly on my Win 2000 and XP desktops, and it's so small and fast. Although the entire engine runtime gets compiled into a game executable, it zips to less than half the size of a 3.5" 1.4MB floppy!

In fact, this complete demo...

Blitz3D Water Demo (DirectX7)...


https://www.youtube.com/watch?v=qIfPHC3tisE

...compressed using Win10's built-in zipping (1.97MB -> 995KB) fits on a single floppy disk!

But somewhere along the line I'm probably going to have to purchase a new desktop and choose a more modern 3D engine, which is why from the start I'm making my game as portable as possible (Blitz Basic functions prototyped and then re-written to external Watcom C++ libraries). As long as you stay away from inlining ASM (not required these days), ANSI C is totally portable, even across operating systems. Just something I'm keeping in mind for the future.



The rusty wire that holds the cork that keeps the anger in
Gives way and suddenly it’s day again
The sun is in the east
Even though the day is done
Two suns in the sunset, hmph
Could be the human race is run
#4536585 - 09/11/20 04:26 AM Re: 70 weeks of intense self-learning [Re: MarkG]  
Joined: Dec 2003
Posts: 11,220
MarkG Offline
Veteran
MarkG  Offline
Veteran

Joined: Dec 2003
Posts: 11,220
The Bayou
mikew, in case you're interested in this... smile

I've been reading about the Blitz3D SDK which I believe was meant to bypass Blitz Basic (C/BASIC hybrid for the Amiga...ported to Windows in 2000) and do all coding in C++.

My biggest hurdle is that everything I keep coming across that's recent (within last 3 years) is in freaking Russian and I've been a total slacker (still in the flash card stage...no more false starts)!


Blitz3D SDK C++ первое знакомство...


https://www.youtube.com/watch?v=4zpJ9JdepMo&list=PL0jO4UklAOf6YMBOgKIeX7577gWVVscc6&index=1


I like his IDE...

Свой Minecraft на Blitz3D - Часть 1...


https://www.youtube.com/watch?v=DJucmkSLKsM



The rusty wire that holds the cork that keeps the anger in
Gives way and suddenly it’s day again
The sun is in the east
Even though the day is done
Two suns in the sunset, hmph
Could be the human race is run
#4536589 - 09/11/20 05:27 AM Re: 70 weeks of intense self-learning [Re: MarkG]  
Joined: Dec 2003
Posts: 11,220
MarkG Offline
Veteran
MarkG  Offline
Veteran

Joined: Dec 2003
Posts: 11,220
The Bayou
One more thing, mikew (then I have to put this away because I'm screwing up now)...

I haven't been keeping up, but apparently my favorite little game engine is getting upgraded (read text under file listing)...
https://github.com/blitz3d-ng/blitz3d-ng

I'll try the 64-bit Linux version at the end of the year, then check on the progress of Open Watcom for Linux. I'd love to drop Microsoft completely, except for compiling and testing my executables.


EDIT: The appeal of Blitz, I think, (besides the very modest requirement of Win9x/2k...I use Win2k/XP/10) is that it includes no point-and-click GUI interface w/auto-code generation. The IDE is simply a text-based editor (interchangeable), debugger and compiler.



The rusty wire that holds the cork that keeps the anger in
Gives way and suddenly it’s day again
The sun is in the east
Even though the day is done
Two suns in the sunset, hmph
Could be the human race is run
#4536637 - 09/11/20 02:51 PM Re: 70 weeks of intense self-learning [Re: MarkG]  
Joined: Feb 2001
Posts: 2,620
mikew Offline
Senior Member
mikew  Offline
Senior Member

Joined: Feb 2001
Posts: 2,620
UK
Always interested in retro games and software. smile
I've thrown out all my retro PC hardware though as I can run anything I'm interested in with a VM, and modern hardware is just so powerful.
With a 4" square Intel NUC with Win10 I can run 3dFX EF2000 at 4k resolution using DosBox.
I use a similar machine running Linux for >90% of my hobby computing and that's what was used for the Open Watcom test.
The Watcom compiler works fine in DosBox, and all the non-DirectX Win32 samples I tried ran perfectly in Wine.
Any code editing or file handling is handled is done on the main OS though, and Microsoft's VS Code (oh, the irony) is a great free editor.

Anyway, I've waffled on enough probably because I don't want to admit that I haven't tried to set up the Blitz3D SDK. frown
Looks interesting, but a step too far right now. smile

Page 2 of 3 1 2 3

Moderated by  RacerGT 

Quick Search
Recent Articles
Support SimHQ

If you shop on Amazon use this Amazon link to support SimHQ
.
Social


Recent Topics
White Helmets entrance trials
by Chucky. 11/30/20 02:02 PM
Unbelievable crash in F1 today
by semmern. 11/29/20 10:12 PM
Can 2020 please end now? Pretty please??
by JohnnyChemo. 11/29/20 04:25 PM
A cowboy from Texas walks into a bar in Montana
by semmern. 11/28/20 01:46 PM
Kung Fury
by Chucky. 11/26/20 08:12 PM
Need a laugh ?
by WangoTango. 11/26/20 07:02 PM
Fantasy NHL League
by WangoTango. 11/26/20 06:36 PM
Thanksgiving In America!
by Blade_Meister. 11/26/20 03:00 PM
Thanksgiving
by NoFlyBoy. 11/25/20 07:16 PM
Copyright 1997-2016, SimHQ Inc. All Rights Reserved.

Powered by UBB.threads™ PHP Forum Software 7.6.0